-
Notifications
You must be signed in to change notification settings - Fork 74
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
nn_loss is not exported #1281
Comments
@tdhock I don't think you need to inheirt from
There's nothing really special about the |
Thanks! |
Yes, the only difference is that it doesn't need
Lines 374 to 384 in abd2a09
|
ok great thanks |
Hi! First of all, thanks very much for maintaining torch, which I find very useful in my machine learning research.
I'm trying to define a nn_module based on my own custom loss function.
I looked in nn-loss.R and adapted the code therein to get
but when running the code above I get the error below
I expected that the code above should work without error, so the user could be able to define their own loss modules.
The error above indicates that nn_loss is not exported.
Can nn_loss be exported please?
If not, what is the recommended method to define our own loss modules?
A work-around is below,
inherit=nn_mse_loss
(which is exported, but are we supposed to inherit from nn_mse_loss?)The text was updated successfully, but these errors were encountered: