if torch.cuda.is_available():tensor = tensor.to('cuda')
tensor.ones_like(x_data, dtype=torch.float)
tensor.rand_like(x_data)
tensor.dtype
tensor.shape
tensor.device
torch.rand(2,3)
tensor[1:2,4]
torch.cat([tensor, tensor], dim=1)
mat
matmul
x.add_(5)
x.copy_(y)
x = torch.rand(5)
z = numpy()
y = torch.from_numpy(z)
y = torch([1, 2])
