Nabu-asr
Public Member Functions | Public Attributes | List of all members
nabu.neuralnetworks.evaluators.evaluator.Evaluator Class Reference

the general evaluator class More...

Inheritance diagram for nabu.neuralnetworks.evaluators.evaluator.Evaluator:
nabu.neuralnetworks.evaluators.decoder_evaluator.DecoderEvaluator nabu.neuralnetworks.evaluators.loss_evaluator.LossEvaluator

Public Member Functions

def __init__ (self, conf, dataconf, model)
 Evaluator constructor. More...
 
def evaluate (self)
 evaluate the performance of the model More...
 
def update_loss (self, loss, inputs, input_seq_length, targets, target_seq_length)
 update the validation loss for a batch of data More...
 

Public Attributes

 conf
 
 model
 
 input_dataconfs
 
 target_dataconfs
 

Detailed Description

the general evaluator class

an evaluator is used to evaluate the performance of a model

Constructor & Destructor Documentation

§ __init__()

def nabu.neuralnetworks.evaluators.evaluator.Evaluator.__init__ (   self,
  conf,
  dataconf,
  model 
)

Evaluator constructor.

Parameters
confthe evaluator configuration as a ConfigParser
dataconfthe database configuration
modelthe model to be evaluated

Member Function Documentation

§ evaluate()

def nabu.neuralnetworks.evaluators.evaluator.Evaluator.evaluate (   self)

evaluate the performance of the model

Returns
  • the loss as a scalar tensor
  • an operation to update the loss
  • the number of batches in the validation set as an integer

§ update_loss()

def nabu.neuralnetworks.evaluators.evaluator.Evaluator.update_loss (   self,
  loss,
  inputs,
  input_seq_length,
  targets,
  target_seq_length 
)

update the validation loss for a batch of data

Parameters
lossthe current loss
inputsthe inputs to the neural network, this is a list of [batch_size x ...] tensors
input_seq_lengthThe sequence lengths of the input utterances, this is a list of [batch_size] vectors
targetsthe targets to the neural network, this is a list of [batch_size x max_output_length] tensors.
target_seq_lengthThe sequence lengths of the target utterances, this is a list of [batch_size] vectors
Returns
an operation to update the loss

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