18 #ifndef TESSERACT_LSTM_STRIDEMAP_H_ 19 #define TESSERACT_LSTM_STRIDEMAP_H_ 59 int t()
const {
return t_; }
108 void SetStride(
const std::vector<std::pair<int, int>>& h_w_pairs);
110 void ScaleXY(
int x_factor,
int y_factor);
137 #endif // TESSERACT_LSTM_STRIDEMAP_H_ int index(FlexDimensions dimension) const
Definition: stridemap.h:60
void ComputeTIncrements()
Definition: stridemap.cpp:168
void InitToLastOfBatch(int batch)
Definition: stridemap.cpp:110
std::vector< int > heights_
Definition: stridemap.h:130
Index(const StrideMap &stride_map, int batch, int y, int x)
Definition: stridemap.h:51
int indices_[FD_DIMSIZE]
Definition: stridemap.h:98
const StrideMap * stride_map_
Definition: stridemap.h:94
int Size(FlexDimensions dimension) const
Definition: stridemap.h:116
FlexDimensions
Definition: stridemap.h:34
Definition: stridemap.h:36
Definition: stridemap.h:35
void SetTFromIndices()
Definition: stridemap.cpp:119
Definition: baseapi.cpp:94
std::vector< int > widths_
Definition: stridemap.h:132
void ScaleXY(int x_factor, int y_factor)
Definition: stridemap.cpp:145
int Width() const
Definition: stridemap.h:118
Definition: stridemap.h:37
void SetStride(const std::vector< std::pair< int, int >> &h_w_pairs)
Definition: stridemap.cpp:127
int MaxIndexOfDim(FlexDimensions dim) const
Definition: stridemap.cpp:44
bool IsValid() const
Definition: stridemap.cpp:25
StrideMap()
Definition: stridemap.h:101
void InitToLast()
Definition: stridemap.h:67
int t_increments_[FD_DIMSIZE]
Definition: stridemap.h:128
Definition: stridemap.h:38
void InitToFirst()
Definition: stridemap.h:62
Index(const StrideMap &stride_map)
Definition: stridemap.h:48
void TransposeXY()
Definition: stridemap.cpp:161
int t_
Definition: stridemap.h:96
bool Increment()
Definition: stridemap.cpp:71
int t() const
Definition: stridemap.h:59
Definition: stridemap.h:43
bool IsLast(FlexDimensions dimension) const
Definition: stridemap.cpp:38
int shape_[FD_DIMSIZE]
Definition: stridemap.h:125
void ReduceWidthTo1()
Definition: stridemap.cpp:154
bool AddOffset(int offset, FlexDimensions dimension)
Definition: stridemap.cpp:63
bool Decrement()
Definition: stridemap.cpp:88
Definition: stridemap.h:46