Closed artidoro closed 5 years ago
I am thinking about providing an additional method to the loss class whereby you can specify parameters for the loss function you want to use and a lambda function is returned (instead of an object). Do you think that this could work?
This is the only way we can actually implement loss(prediction, target)
in C#
Yes, I think that should work!
In Pytorch loss functions in torch.nn work as follows:
We should match the behavior where once initialized the loss can be applied to the prediction and the target tensors.