Nabu-asr
Public Member Functions | Public Attributes | List of all members
nabu.neuralnetworks.decoders.decoder.Decoder Class Reference

the abstract class for a decode More...

Inheritance diagram for nabu.neuralnetworks.decoders.decoder.Decoder:
nabu.neuralnetworks.decoders.alignment_decoder.AlignmentDecoder nabu.neuralnetworks.decoders.beam_search_decoder.BeamSearchDecoder nabu.neuralnetworks.decoders.ctc_decoder.CTCDecoder nabu.neuralnetworks.decoders.feature_decoder.FeatureDecoder nabu.neuralnetworks.decoders.max_decoder.MaxDecoder nabu.neuralnetworks.decoders.random_decoder.RandomDecoder nabu.neuralnetworks.decoders.threshold_decoder.ThresholdDecoder

Public Member Functions

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...
 

Public Attributes

 conf
 
 model
 

Detailed Description

the abstract class for a decode

Constructor & Destructor Documentation

§ __init__()

def nabu.neuralnetworks.decoders.decoder.Decoder.__init__ (   self,
  conf,
  model 
)

Decoder constructor.

Parameters
confthe decoder config
modelthe model that will be used for decoding

Member Function Documentation

§ __call__()

def nabu.neuralnetworks.decoders.decoder.Decoder.__call__ (   self,
  inputs,
  input_seq_length 
)

decode a batch of data

Parameters
inputsthe inputs as a dictionary of [batch_size x ...] tensors
input_seq_lengththe 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
lossthe current evaluation loss
outputsthe outputs of the decoder as a dictionary
referencesthe references as a dictionary
reference_seq_lengththe 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
outputsthe outputs of the decoder as a dictionary
directorythe directory where the results should be written
namesthe names of the utterances in outputs

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