returnn.torch.data.tensor_utils#

Tensor utils.

returnn.torch.data.tensor_utils.tensor_dict_numpy_to_torch_(x: TensorDict)[source]#

tensor_numpy_to_torch_() on all values

returnn.torch.data.tensor_utils.tensor_numpy_to_torch_(x: Tensor[ndarray])[source]#

torch.from_numpy() on Tensor, including dims

returnn.torch.data.tensor_utils.tensor_dict_torch_to_numpy_(x: TensorDict)[source]#

tensor_torch_to_numpy_() on all values

returnn.torch.data.tensor_utils.tensor_torch_to_numpy_(x: Tensor[Tensor])[source]#

.numpy() on Tensor, including dims