LossItf Class Referenceabstract

#include <nnet-loss.h>

Inheritance diagram for LossItf:
Collaboration diagram for LossItf:

Public Member Functions

 LossItf (LossOptions &opts)
 
virtual ~LossItf ()
 
virtual void Eval (const VectorBase< BaseFloat > &frame_weights, const CuMatrixBase< BaseFloat > &net_out, const CuMatrixBase< BaseFloat > &target, CuMatrix< BaseFloat > *diff)=0
 Evaluate cross entropy using target-matrix (supports soft labels),. More...
 
virtual void Eval (const VectorBase< BaseFloat > &frame_weights, const CuMatrixBase< BaseFloat > &net_out, const Posterior &target, CuMatrix< BaseFloat > *diff)=0
 Evaluate cross entropy using target-posteriors (supports soft labels),. More...
 
virtual std::string Report ()=0
 Generate string with error report,. More...
 
virtual BaseFloat AvgLoss ()=0
 Get loss value (frame average),. More...
 

Protected Attributes

LossOptions opts_
 
Timer timer_
 

Detailed Description

Definition at line 51 of file nnet-loss.h.

Constructor & Destructor Documentation

◆ LossItf()

LossItf ( LossOptions opts)
inline

Definition at line 53 of file nnet-loss.h.

53  {
54  opts_ = opts;
55  }
LossOptions opts_
Definition: nnet-loss.h:77

◆ ~LossItf()

virtual ~LossItf ( )
inlinevirtual

Definition at line 56 of file nnet-loss.h.

56 { }

Member Function Documentation

◆ AvgLoss()

virtual BaseFloat AvgLoss ( )
pure virtual

Get loss value (frame average),.

Implemented in MultiTaskLoss, Mse, and Xent.

◆ Eval() [1/2]

virtual void Eval ( const VectorBase< BaseFloat > &  frame_weights,
const CuMatrixBase< BaseFloat > &  net_out,
const CuMatrixBase< BaseFloat > &  target,
CuMatrix< BaseFloat > *  diff 
)
pure virtual

Evaluate cross entropy using target-matrix (supports soft labels),.

Implemented in MultiTaskLoss, Mse, and Xent.

◆ Eval() [2/2]

virtual void Eval ( const VectorBase< BaseFloat > &  frame_weights,
const CuMatrixBase< BaseFloat > &  net_out,
const Posterior target,
CuMatrix< BaseFloat > *  diff 
)
pure virtual

Evaluate cross entropy using target-posteriors (supports soft labels),.

Implemented in MultiTaskLoss, Mse, and Xent.

◆ Report()

virtual std::string Report ( )
pure virtual

Generate string with error report,.

Implemented in MultiTaskLoss, Mse, and Xent.

Member Data Documentation

◆ opts_

LossOptions opts_
protected

Definition at line 77 of file nnet-loss.h.

Referenced by Xent::Eval(), Mse::Eval(), and MultiTaskLoss::InitFromString().

◆ timer_

Timer timer_
protected

Definition at line 78 of file nnet-loss.h.

Referenced by Xent::Eval().


The documentation for this class was generated from the following file: