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
If you attempt to do trialwise decoding, criterion=CrossEntropyLoss will work.
If you attempt to do cropped decoding, set criterion=CroppedLoss and criterion__loss_function=torch.nn.functional.cross_entropy).
as the error indicates, your loss function needs to return a single value (hence the "scalar outputs" error). May be your loss function creates a value per example? then you still need to call torch.mean on it before returning, e.g., maybe return torch.mean(ret) would work?
Hi, I want to pass custom criterion to the EEGClassifier.
but its seems to support only torch.nn.NLLLoss.
I even tried criterion=torch.nn.CrossEntropyLoss() but it does not work.
Is their any way to pass our custom loss instead of NLLLoss.
looking forward to your answer,
Bokey
The text was updated successfully, but these errors were encountered: