the general evaluator class
More...
|
| conf |
|
| model |
|
| input_dataconfs |
|
| target_dataconfs |
|
the general evaluator class
an evaluator is used to evaluate the performance of a model
§ __init__()
def nabu.neuralnetworks.evaluators.evaluator.Evaluator.__init__ |
( |
|
self, |
|
|
|
conf, |
|
|
|
dataconf, |
|
|
|
model |
|
) |
| |
Evaluator constructor.
- Parameters
-
conf | the evaluator configuration as a ConfigParser |
dataconf | the database configuration |
model | the model to be evaluated |
§ 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
-
loss | the current loss |
inputs | the inputs to the neural network, this is a list of [batch_size x ...] tensors |
input_seq_length | The sequence lengths of the input utterances, this is a list of [batch_size] vectors |
targets | the targets to the neural network, this is a list of [batch_size x max_output_length] tensors. |
target_seq_length | The 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: