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
I've been trying out the nb::ndarray feature with PyTorch and it works great. However, I noticed for torch parameters it does not seem to work with the ndarray interface.
Now parameters are a subclass of torch.Tensor and are used to hold the model state/weights.
I was wondering if it would be possible to extend the type check in ndarray. And if it would be possible to add a isinstance check? I understand the type check is done with strings to remove the dependency. But it would be great to have this feature as under the hood parameters will also have a DLPack implementation.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I've been trying out the
nb::ndarray
feature with PyTorch and it works great. However, I noticed for torch parameters it does not seem to work with the ndarray interface.Now parameters are a subclass of
torch.Tensor
and are used to hold the model state/weights.I was wondering if it would be possible to extend the type check in ndarray. And if it would be possible to add a isinstance check? I understand the type check is done with strings to remove the dependency. But it would be great to have this feature as under the hood parameters will also have a DLPack implementation.
What does everyone think?
Beta Was this translation helpful? Give feedback.
All reactions