Learn practical skills, build real-world projects, and advance your career
Created 5 years ago
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.])
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.])