Learn practical skills, build real-world projects, and advance your career
x = 1 + 1import numpy as np
import torch
print (x)
2
import torch
t1 = torch.tensor(4.)
t1
tensor(4.)
t1.dtype
torch.float32
t2 = torch.tensor([1., 2, 3, 4])
t2
tensor([1., 2., 3., 4.])