struct Index is intended to represent the various indexes by which we number the rows of the matrices that the Components process: mainly 'n', the index of the member of the minibatch, 't', used for the frame index in speech recognition, and 'x', which is a catch-all extra index which we might use in convolutional setups or for other reasons. More...
#include <nnet-common.h>
Public Member Functions | |
Index () | |
Index (int32 n, int32 t, int32 x=0) | |
bool | operator== (const Index &a) const |
bool | operator!= (const Index &a) const |
bool | operator< (const Index &a) const |
Index | operator+ (const Index &other) const |
Index & | operator+= (const Index &other) |
void | Write (std::ostream &os, bool binary) const |
void | Read (std::istream &os, bool binary) |
Public Attributes | |
int32 | n |
int32 | t |
int32 | x |
struct Index is intended to represent the various indexes by which we number the rows of the matrices that the Components process: mainly 'n', the index of the member of the minibatch, 't', used for the frame index in speech recognition, and 'x', which is a catch-all extra index which we might use in convolutional setups or for other reasons.
It is possible to extend this by adding new indexes if needed.
Definition at line 44 of file nnet-common.h.
|
inline |
Definition at line 50 of file nnet-common.h.
Definition at line 65 of file nnet-common.h.
References Index::Index(), Index::n, Index::t, and Index::x.
Definition at line 68 of file nnet-common.h.
References kaldi::nnet3::kNoTime, Index::n, Index::Read(), Index::t, Index::Write(), and Index::x.
void Read | ( | std::istream & | os, |
bool | binary | ||
) |
Definition at line 37 of file nnet-common.cc.
References kaldi::nnet3::ExpectToken(), Index::n, kaldi::ReadBasicType(), Index::t, and Index::x.
Referenced by Index::operator+=().
void Write | ( | std::ostream & | os, |
bool | binary | ||
) | const |
Definition at line 27 of file nnet-common.cc.
References Index::n, Index::t, kaldi::WriteBasicType(), kaldi::WriteToken(), and Index::x.
Referenced by Index::operator+=(), and kaldi::nnet3::WriteIndexVector().
int32 n |
Definition at line 45 of file nnet-common.h.
Referenced by BatchedXvectorComputer::BatchedXvectorComputer(), kaldi::nnet3::ConvertNumNValues(), kaldi::nnet3::time_height_convolution::CreateIndexes(), kaldi::nnet3::FindNStride(), RestrictedAttentionComponent::GetInputIndexes(), TimeHeightConvolutionComponent::GetInputIndexes(), TdnnComponent::GetInputIndexes(), kaldi::nnet3::time_height_convolution::GetRandomConvolutionIndexes(), Index::operator!=(), IndexLessNxt::operator()(), Index::operator+(), Index::operator+=(), Index::operator<(), kaldi::nnet3::operator<<(), Index::operator==(), kaldi::nnet3::PrintIndexes(), Index::Read(), kaldi::nnet3::ReadCindexVectorElementBinary(), kaldi::nnet3::ReadIndexVectorElementBinary(), kaldi::nnet3::UnitTestCindexIo(), Index::Write(), kaldi::nnet3::WriteCindexVectorElementBinary(), and kaldi::nnet3::WriteIndexVectorElementBinary().
int32 t |
Definition at line 46 of file nnet-common.h.
Referenced by BatchedXvectorComputer::BatchedXvectorComputer(), Compiler::ComputeInputLocationsList(), kaldi::nnet3::time_height_convolution::ConvolveForwardSimple(), kaldi::nnet3::GenRandForwardingDescriptor(), RestrictedAttentionComponent::GetInputIndexes(), StatisticsExtractionComponent::GetInputIndexes(), TimeHeightConvolutionComponent::GetInputIndexes(), StatisticsPoolingComponent::GetInputIndexes(), TdnnComponent::GetInputIndexes(), kaldi::nnet3::time_height_convolution::GetRandomConvolutionIndexes(), RestrictedAttentionComponent::IsComputable(), StatisticsExtractionComponent::IsComputable(), TimeHeightConvolutionComponent::IsComputable(), StatisticsPoolingComponent::IsComputable(), TdnnComponent::IsComputable(), SwitchingForwardingDescriptor::MapToInput(), RoundingForwardingDescriptor::MapToInput(), ReplaceIndexForwardingDescriptor::MapToInput(), Index::operator!=(), IndexLessNxt::operator()(), Index::operator+(), Index::operator+=(), Index::operator<(), kaldi::nnet3::operator<<(), Index::operator==(), StatisticsExtractionComponent::PrecomputeIndexes(), StatisticsPoolingComponent::PrecomputeIndexes(), kaldi::nnet3::PrintIndexes(), Index::Read(), kaldi::nnet3::ReadCindexVectorElementBinary(), kaldi::nnet3::ReadIndexVectorElementBinary(), kaldi::nnet3::UnitTestCindexIo(), Index::Write(), kaldi::nnet3::WriteCindexVectorElementBinary(), and kaldi::nnet3::WriteIndexVectorElementBinary().
int32 x |
Definition at line 47 of file nnet-common.h.
Referenced by DistributeComponent::ComputeInputIndexAndBlock(), kaldi::nnet3::GenRandForwardingDescriptor(), RestrictedAttentionComponent::GetInputIndexes(), TimeHeightConvolutionComponent::GetInputIndexes(), TdnnComponent::GetInputIndexes(), kaldi::nnet3::time_height_convolution::GetRandomConvolutionIndexes(), ReplaceIndexForwardingDescriptor::MapToInput(), Index::operator!=(), IndexLessNxt::operator()(), Index::operator+(), Index::operator+=(), Index::operator<(), kaldi::nnet3::operator<<(), Index::operator==(), kaldi::nnet3::PrintIndexes(), Index::Read(), kaldi::nnet3::ReadCindexVectorElementBinary(), kaldi::nnet3::ReadIndexVectorElementBinary(), kaldi::nnet3::UnitTestCindexIo(), Index::Write(), kaldi::nnet3::WriteCindexVectorElementBinary(), and kaldi::nnet3::WriteIndexVectorElementBinary().