Learn practical skills, build real-world projects, and advance your career
Updated 2 years ago
Pytorch Functions
- tensor
- zeros
- range
- cat
- tensor_split
Before we begin, let's install and import PyTorch
# Import torch and other required modules
import torch
Function 1 - torch.tensor (change this)
# Example 1 - working (change this)
torch.tensor([[1, 2], [3, 4.]])
tensor([[1., 2.],
[3., 4.]])
Explanation about example