torch.matmul — PyTorch 1.10.1 documentation
pytorch.org › docs › stabletorch.matmul(input, other, *, out=None) → Tensor. Matrix product of two tensors. The behavior depends on the dimensionality of the tensors as follows: If both tensors are 1-dimensional, the dot product (scalar) is returned. If both arguments are 2-dimensional, the matrix-matrix product is returned.
torch.transpose — PyTorch 1.10.1 documentation
pytorch.org › generated › torchtorch.transpose. torch.transpose(input, dim0, dim1) → Tensor. Returns a tensor that is a transposed version of input . The given dimensions dim0 and dim1 are swapped. The resulting out tensor shares its underlying storage with the input tensor, so changing the content of one would change the content of the other.
torch.sparse — PyTorch 1.10.1 documentation
https://pytorch.org/docs/stable/sparse.htmlConstruction¶. A sparse COO tensor can be constructed by providing the two tensors of indices and values, as well as the size of the sparse tensor (when it cannot be inferred from the indices and values tensors) to a function torch.sparse_coo_tensor(). Suppose we want to define a sparse tensor with the entry 3 at location (0, 2), entry 4 at location (1, 0), and entry 5 at location (1, 2).