Learn practical skills, build real-world projects, and advance your career

My Fav 5 function in torch

An short introduction about PyTorch and about the chosen functions.

  • Usage of tensor
  • Usage of numpy in tensor
  • Reuse of Tensor
  • Usage of Stride
  • Random / pinverse etc
# Import torch and other required modules
import torch

Function 1 - torch.tensor n dimention

# single number
torch.tensor(6.)
tensor(6.)

In torch we can give single number