All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 ( LossOptions opts)
inline

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

References LossItf::opts_.

53  {
54  opts_ = opts;
55  }
LossOptions opts_
Definition: nnet-loss.h:77
virtual ~LossItf ( )
inlinevirtual

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

56 { }

Member Function Documentation

virtual BaseFloat AvgLoss ( )
pure virtual

Get loss value (frame average),.

Implemented in MultiTaskLoss, Mse, and Xent.

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.

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.

virtual std::string Report ( )
pure virtual

Generate string with error report,.

Implemented in MultiTaskLoss, Mse, and Xent.

Member Data Documentation

LossOptions opts_
protected

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

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

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: