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
The NLL loss function in the newsvendor task is wrongly used.
NLLLoss() (in PyTorch) expects a log-probability as input. But your code sends the raw probability into it. So it is actually minimizing -sum pi. instead of minimizing - sum log(pi). Though this weird loss can still kind of maximize the likelihood, it is different from your description.
This happens in your task_net and mle_net.
Another bug: your main.py for "# Nonlinear MLE net" actually is doing linear MLE net. You need to send the parameter "is_nonlinear=True".
The text was updated successfully, but these errors were encountered:
The NLL loss function in the newsvendor task is wrongly used.
NLLLoss() (in PyTorch) expects a log-probability as input. But your code sends the raw probability into it. So it is actually minimizing -sum pi. instead of minimizing - sum log(pi). Though this weird loss can still kind of maximize the likelihood, it is different from your description.
This happens in your task_net and mle_net.
Another bug: your main.py for "# Nonlinear MLE net" actually is doing linear MLE net. You need to send the parameter "is_nonlinear=True".
The text was updated successfully, but these errors were encountered: