Learn practical skills, build real-world projects, and advance your career
 
import torch
import jovian
# tensors torch is used to process tensors
# tensors store numbers and can be integers, vectors, matrices
t1 = torch.tensor(4.)
t1
tensor(4.)
t2 = torch.tensor([1., 2, 3, 4])
t2
tensor([1., 2., 3., 4.])
t3 = torch.tensor([[2, 3], [4, 5], [7, 8]])
t3
tensor([[2, 3],
        [4, 5],
        [7, 8]])