the abstract class for a decode
More...
|
def | __init__ (self, conf, model) |
| Decoder constructor. More...
|
|
def | __call__ (self, inputs, input_seq_length) |
| decode a batch of data More...
|
|
def | write (self, outputs, directory, names) |
| write the output of the decoder to disk More...
|
|
def | update_evaluation_loss (self, loss, outputs, references, reference_seq_length) |
| update the evaluation loss More...
|
|
the abstract class for a decode
§ __init__()
def nabu.neuralnetworks.decoders.decoder.Decoder.__init__ |
( |
|
self, |
|
|
|
conf, |
|
|
|
model |
|
) |
| |
Decoder constructor.
- Parameters
-
conf | the decoder config |
model | the model that will be used for decoding |
§ __call__()
def nabu.neuralnetworks.decoders.decoder.Decoder.__call__ |
( |
|
self, |
|
|
|
inputs, |
|
|
|
input_seq_length |
|
) |
| |
decode a batch of data
- Parameters
-
inputs | the inputs as a dictionary of [batch_size x ...] tensors |
input_seq_length | the input sequence lengths as a dictionary of [batch_size] vectors |
- Returns
- the decoded sequences as a dictionary of outputs
§ update_evaluation_loss()
def nabu.neuralnetworks.decoders.decoder.Decoder.update_evaluation_loss |
( |
|
self, |
|
|
|
loss, |
|
|
|
outputs, |
|
|
|
references, |
|
|
|
reference_seq_length |
|
) |
| |
update the evaluation loss
- Parameters
-
loss | the current evaluation loss |
outputs | the outputs of the decoder as a dictionary |
references | the references as a dictionary |
reference_seq_length | the sequence lengths of the references |
- Returns
- an op to update the evalution loss
§ write()
def nabu.neuralnetworks.decoders.decoder.Decoder.write |
( |
|
self, |
|
|
|
outputs, |
|
|
|
directory, |
|
|
|
names |
|
) |
| |
write the output of the decoder to disk
- Parameters
-
outputs | the outputs of the decoder as a dictionary |
directory | the directory where the results should be written |
names | the names of the utterances in outputs |
The documentation for this class was generated from the following file: