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

Beam search decode. More...

Inheritance diagram for nabu.neuralnetworks.decoders.beam_search_decoder.BeamSearchDecoder:
nabu.neuralnetworks.decoders.decoder.Decoder

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 Member Functions inherited from nabu.neuralnetworks.decoders.decoder.Decoder
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

 alphabet
 
- Public Attributes inherited from nabu.neuralnetworks.decoders.decoder.Decoder
 conf
 
 model
 

Detailed Description

Beam search decode.

Constructor & Destructor Documentation

§ __init__()

def nabu.neuralnetworks.decoders.beam_search_decoder.BeamSearchDecoder.__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.beam_search_decoder.BeamSearchDecoder.__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.beam_search_decoder.BeamSearchDecoder.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.beam_search_decoder.BeamSearchDecoder.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: