-
-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for conversion to torch.Tensor
#196
Comments
Thank you for reporting! Will fix it as soon as possible. |
I created a pull request with the fix #197. It was a small bug but I also added a unit test to avoid regressions. @samvanstroud can you please test it out with lightning and maybe review the pull request? You can install directly from the branch as:
|
Thanks a lot @mauvilsa! That is working perfectly for me, I don't have any comments on the implementation - looks clean. |
🐛 Bug report
I am encountering a problem using the package with Lightning.
When trying to specify an
init_args
which expects atorch.Tensor
(for example when specifying the weights of a loss function), an error occurs because torch module expects a tensor, not a list.It should be possible to register pytorch tensors using
However, doing so results in an error:
Since a list is specified in the yaml and the namespace shows a
tensor([...])
, it looks like the deserializer is working correctly, but something is going wrong.Expected behavior
The list should be converted to a tensor without error.
Environment
The text was updated successfully, but these errors were encountered: