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

5 Interesting Functions Related to PyTorch Tensors

PyTorch is an open source machine learning library based on the Torch library, used for applications such as computer vision and natural language processing, primarily developed by Facebook's AI Research lab.(source:wiki)

  • function 1
  • function 2
  • function 3
  • function 4
  • function 5
# Import torch and other required modules
import torch

Function 1 - torch.tensor (change this)

Add some explanations

# Example 1 - working (change this)
torch.tensor([[1, 2], [3, 4.]])
tensor([[1., 2.],
        [3., 4.]])

Explanation about example