You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How do I convert back to a Torch Tensor or numpy ndarray with a particular dimension ordering? What I've done so far is look at ._tensor and see what the shape is and rearrange as necessary, but I'm sure there's a better way.
E.g., like:
namedtensor.numpy(('dim1', 'dim2'))
which would output a numpy array with dimensions along the requested. The same thing for back to regular torch.
Thanks,
Miles
The text was updated successfully, but these errors were encountered:
Hi,
Great package.
How do I convert back to a Torch Tensor or numpy ndarray with a particular dimension ordering? What I've done so far is look at ._tensor and see what the shape is and rearrange as necessary, but I'm sure there's a better way.
E.g., like:
which would output a numpy array with dimensions along the requested. The same thing for back to regular torch.
Thanks,
Miles
The text was updated successfully, but these errors were encountered: