22 #ifndef SINGA_NEURALNET_LOSS_LAYER_H_
23 #define SINGA_NEURALNET_LOSS_LAYER_H_
25 #include "neuralnet/layer.h"
46 void Setup(
const LayerProto& proto,
int npartitions)
override;
68 #endif // SINGA_NEURALNET_LOSS_LAYER_H_
void ComputeFeature(int flag, Metric *perf) override
Compute features of this layer based on connected layers.
void ComputeGradient(int flag, Metric *perf) override
Compute gradients for parameters and connected layers.
void ComputeGradient(int flag, Metric *perf) override
Compute gradients for parameters and connected layers.
Squared Euclidean loss as 0.5 ||predict - ground_truth||^2.
Definition: loss_layer.h:35
ConnectionType src_neuron_connection(int k) const override
softmax is not recommendeded for partition because it requires the whole src layer for normalization...
Definition: loss_layer.h:54
Base layer for calculating loss and other metrics, e.g., precison.
Definition: layer.h:213
void ComputeFeature(int flag, Metric *perf) override
Compute features of this layer based on connected layers.
void Setup(const LayerProto &proto, int npartitions) override
Setup layer properties.
Cross-entropy loss applied to the probabilities after Softmax.
Definition: loss_layer.h:44
Performance mtrics.
Definition: common.h:85