Deep Learning Algorithm Implementations 1.0.0
C++ implementations of fundamental deep learning algorithms
|
Base class for autograd-compatible loss functions. More...
#include <losses.hpp>
Public Member Functions | |
virtual | ~AutogradLoss ()=default |
virtual Variable< T > | forward (const Variable< T > &predictions, const Variable< T > &targets)=0 |
Compute loss between predictions and targets. | |
Variable< T > | operator() (const Variable< T > &predictions, const Variable< T > &targets) |
Convenience operator for computing loss. | |
Base class for autograd-compatible loss functions.
Definition at line 27 of file losses.hpp.
|
virtualdefault |
|
pure virtual |
Compute loss between predictions and targets.
predictions | Model predictions |
targets | Ground truth targets |
Implemented in dl::loss::MSELoss< T >, dl::loss::CrossEntropyLoss< T >, dl::loss::BCELoss< T >, dl::loss::BCEWithLogitsLoss< T >, dl::loss::HingeLoss< T >, and dl::loss::HuberLoss< T >.
|
inline |
Convenience operator for computing loss.
Definition at line 42 of file losses.hpp.