Replies: 3 comments
-
Thanks for raising this, I appreciate the comment! Before changing the code, may I ask in which contexts you are encountering this issue? I.e., when/why are your data loaders empty? Instead of the However, thinking about that more, isn't a loss of 0.0 misleading when your data loaders are empty? I.e., a loss of 0.0 implies that the model makes perfect predictions. However, since there is no data loader, we can't say anything about that. Or, in other words, isn't it preferred if there is a division by zero error, which implies there's something not right with the data loader? Let me know your thoughts. |
Beta Was this translation helpful? Give feedback.
-
Thanks Sebastian, for you feedback. Your point about the potential confusion when 0.0 loss is reported is absolutely right. Perhaps, in order to avoid zero divisions for a smother experience, a print info could be displayed and NaN returned when DataLoader is empty.
(A validation) DataLoader could be empty if you setup I hope it is helpful. |
Beta Was this translation helpful? Give feedback.
-
Just implemented it here in #124 |
Beta Was this translation helpful? Give feedback.
-
Hi folks !
I notice an issue in the calc_loss_loader def when model evaluation batch are empty (but not None); it attempts to divide by zero, resulting in an exception.
I suggest to adding a guard clause into calc_loss_loader to handle this simple scenario.
Hope this help improve the code and learning experience.
Beta Was this translation helpful? Give feedback.
All reactions