Nabu-asr
|
some operations More...
Functions | |
def | nabu.neuralnetworks.components.ops.pyramid_stack (inputs, sequence_lengths, numsteps, axis=2, scope=None) |
concatenate each two consecutive elements More... | |
def | nabu.neuralnetworks.components.ops.stack_seq (sequential, sequence_lengths, name=None) |
remove padding and stack sequences More... | |
def | nabu.neuralnetworks.components.ops.unstack_seq (nonseq, sequence_lengths, name=None) |
unstack sequences and add padding More... | |
def | nabu.neuralnetworks.components.ops.dense_sequence_to_sparse (sequences, sequence_lengths) |
convert sequence dense representations to sparse representations More... | |
def | nabu.neuralnetworks.components.ops.get_indices (sequence_length) |
get the indices corresponding to sequences (and not padding) More... | |
def | nabu.neuralnetworks.components.ops.pad_to (tensor, length, axis=0, name=None) |
pad the tensor to a certain length More... | |
def | nabu.neuralnetworks.components.ops.map_ta (fn, ta) |
apply fn to each element in tensorarray More... | |
some operations
def nabu.neuralnetworks.components.ops.dense_sequence_to_sparse | ( | sequences, | |
sequence_lengths | |||
) |
convert sequence dense representations to sparse representations
sequences | the dense sequences as a [batch_size x max_length] tensor |
sequence_lengths | the sequence lengths as a [batch_size] vector |
def nabu.neuralnetworks.components.ops.get_indices | ( | sequence_length | ) |
get the indices corresponding to sequences (and not padding)
sequence_length | the sequence_lengths as a N-D tensor |
def nabu.neuralnetworks.components.ops.map_ta | ( | fn, | |
ta | |||
) |
apply fn to each element in tensorarray
fn | the function to apply |
ta | the tensorarray |
def nabu.neuralnetworks.components.ops.pad_to | ( | tensor, | |
length, | |||
axis = 0 , |
|||
name = None |
|||
) |
pad the tensor to a certain length
def nabu.neuralnetworks.components.ops.pyramid_stack | ( | inputs, | |
sequence_lengths, | |||
numsteps, | |||
axis = 2 , |
|||
scope = None |
|||
) |
concatenate each two consecutive elements
inputs | A time minor tensor [batch_size, time, input_size] |
sequence_lengths | the length of the input sequences |
numsteps | number of time steps to concatenate |
axis | the axis where the inputs should be stacked |
scope | the current scope |
def nabu.neuralnetworks.components.ops.stack_seq | ( | sequential, | |
sequence_lengths, | |||
name = None |
|||
) |
remove padding and stack sequences
sequential | the sequential data which is a [batch_size, max_length, dim] |
tensor | |
sequence_lengths | a [batch_size] vector containing the sequence lengths |
name | [optional] the name of the operation |
def nabu.neuralnetworks.components.ops.unstack_seq | ( | nonseq, | |
sequence_lengths, | |||
name = None |
|||
) |
unstack sequences and add padding
nonseq | the non sequential data which is a [sum(sequence_lengths) x dim] tensor |
sequence_lengths | a [batch_size] vector containing the sequence lengths |
name | [optional] the name of the operation |