torch.unsqueeze — PyTorch 1.10.1 documentation
pytorch.org › generated › torchtorch.unsqueeze — PyTorch 1.10.0 documentation torch.unsqueeze torch.unsqueeze(input, dim) → Tensor Returns a new tensor with a dimension of size one inserted at the specified position. The returned tensor shares the same underlying data with this tensor. A dim value within the range [-input.dim () - 1, input.dim () + 1) can be used.
torch.Tensor.unsqueeze — PyTorch 1.10.1 documentation
pytorch.org › torchLearn about PyTorch’s features and capabilities. Community. Join the PyTorch developer community to contribute, learn, and get your questions answered. Developer Resources. Find resources and get questions answered. Forums. A place to discuss PyTorch code, issues, install, research. Models (Beta) Discover, publish, and reuse pre-trained models