torch.tensordot — PyTorch 1.10.1 documentation
pytorch.org › docs › stabledims (int or Tuple[List, List] or List[List] containing two lists or Tensor) – number of dimensions to contract or explicit lists of dimensions for a and b respectively When called with a non-negative integer argument dims = d d d , and the number of dimensions of a and b is m m m and n n n , respectively, tensordot() computes
torch.tensor_split — PyTorch 1.10.1 documentation
pytorch.org › docs › stabletorch.tensor_split. Splits a tensor into multiple sub-tensors, all of which are views of input , along dimension dim according to the indices or number of sections specified by indices_or_sections. This function is based on NumPy’s numpy.array_split (). If indices_or_sections is an integer n or a zero dimensional long tensor with value n ...
torch.as_tensor — PyTorch 1.10.1 documentation
pytorch.org › generated › torchtorch.as_tensor(data, dtype=None, device=None) → Tensor. Convert the data into a torch.Tensor. If the data is already a Tensor with the same dtype and device , no copy will be performed, otherwise a new Tensor will be returned with computational graph retained if data Tensor has requires_grad=True. Similarly, if the data is an ndarray of the ...