Learn practical skills, build real-world projects, and advance your career
Created 4 years ago
5 pytorch functions
torch.squeeze()
torch.flatten()
torch.split()
torch.where()
torch.cat()
#importing required library
import torch
Function: torch.squeeze()
torch.squeeze(input, dim=None, out=None)
Squeezing a tensor removes the dimensions or axes that have a length of one