tenzr::nn::CrossEntropyLoss¶
Callable wrapper around the cross-entropy loss over logits.
#include <loss.h>
Public Functions¶
| Name | |
|---|---|
| CrossEntropyLoss(double eps =1.0e-7, std::string reduction ="mean") | |
| Tensor | operator()(const Tensor & logits, const Tensor & targets) const |
| Tensor | Forward(const Tensor & logits, const Tensor & targets) const |
Public Functions Documentation¶
function CrossEntropyLoss¶
function operator()¶
function Forward¶
Return: Same as operator().