torch.ShortTensor(data)
paddle.to_tensor(data, dtype='int16', place='cpu')
Paddle 比 PyTorch 支持更多参数,具体如下: