diff --git a/lstm/lstmrecognizer.h b/lstm/lstmrecognizer.h index d99439dbdb8491b80f1675fec4738e9e749878a5..d5724537ad7f1abefa54f2abc9f96302845fa3f3 100644 --- a/lstm/lstmrecognizer.h +++ b/lstm/lstmrecognizer.h @@ -209,7 +209,7 @@ class LSTMRecognizer { // If label_threshold is positive, uses it for making the labels, otherwise // uses standard ctc. Returned in scale_factor is the reduction factor // between the image and the output coords, for computing bounding boxes. - // If re_invert is true, the input is inverted back to its orginal + // If re_invert is true, the input is inverted back to its original // photometric interpretation if inversion is attempted but fails to // improve the results. This ensures that outputs contains the correct // forward outputs for the best photometric interpretation. @@ -351,7 +351,7 @@ class LSTMRecognizer { // The unicharset. Only the unicharset element is serialized. // Has to be a CCUtil, so Dict can point to it. CCUtil ccutil_; - // For backward compatability, recoder_ is serialized iff + // For backward compatibility, recoder_ is serialized iff // training_flags_ & TF_COMPRESS_UNICHARSET. // Further encode/decode ccutil_.unicharset's ids to simplify the unicharset. UnicharCompress recoder_; diff --git a/lstm/recodebeam.h b/lstm/recodebeam.h index df56ae0714a58f95cf0b7f721e3160d98d742385..cc0ced2690ebd77896e8223c7f09156715327f86 100644 --- a/lstm/recodebeam.h +++ b/lstm/recodebeam.h @@ -91,7 +91,7 @@ struct RecodeNode { bool start_of_word; // True if this represents a valid candidate end of word position. Does not // necessarily mark the end of a word, since a word can be extended beyond a - // candidiate end by a continuation, eg 'the' continues to 'these'. + // candidate end by a continuation, eg 'the' continues to 'these'. bool end_of_word; // True if this is a duplicate of prev in all respects. Some training modes // allow the network to output duplicate characters and crush them with CTC, diff --git a/lstm/series.cpp b/lstm/series.cpp index df7bcbddaf4774d3fe6065c9af359ca5ed0dd7af..96ff4704db0b7a716818830d5a41af8dc6d5add7 100644 --- a/lstm/series.cpp +++ b/lstm/series.cpp @@ -142,7 +142,7 @@ bool Series::Backward(bool debug, const NetworkIO& fwd_deltas, } // Splits the series after the given index, returning the two parts and -// deletes itself. The first part, upto network with index last_start, goes +// deletes itself. The first part, up to network with index last_start, goes // into start, and the rest goes into end. void Series::SplitAt(int last_start, Series** start, Series** end) { *start = NULL; diff --git a/lstm/series.h b/lstm/series.h index cea1d828744fa258a16411d5b3629d89dab825fe..04799359e1569c3f015ca236e1c8619dc8951362 100644 --- a/lstm/series.h +++ b/lstm/series.h @@ -77,7 +77,7 @@ class Series : public Plumbing { NetworkIO* back_deltas); // Splits the series after the given index, returning the two parts and - // deletes itself. The first part, upto network with index last_start, goes + // deletes itself. The first part, up to network with index last_start, goes // into start, and the rest goes into end. void SplitAt(int last_start, Series** start, Series** end); diff --git a/lstm/static_shape.h b/lstm/static_shape.h index 25b8f03bab1a398c4f9c5ffda45182d5aba01e0e..4822a5af3b1dec4ababb68aa858a9760275386b4 100644 --- a/lstm/static_shape.h +++ b/lstm/static_shape.h @@ -32,7 +32,7 @@ enum LossType { }; // Simple class to hold the tensor shape that is known at network build time -// and the LossType of the loss funtion. +// and the LossType of the loss function. class StaticShape { public: StaticShape() diff --git a/lstm/stridemap.cpp b/lstm/stridemap.cpp index 3d95907ea0b9aa4cc3aee9eb1b06b1c97c799e0e..b3e70bca9e18990f1ec435c22e1d354fa01829c1 100644 --- a/lstm/stridemap.cpp +++ b/lstm/stridemap.cpp @@ -38,7 +38,7 @@ bool StrideMap::Index::IsLast(FlexDimensions dimension) const { return MaxIndexOfDim(dimension) == indices_[dimension]; } -// Given that the dimensions upto and including dim-1 are valid, returns the +// Given that the dimensions up to and including dim-1 are valid, returns the // maximum index for dimension dim. int StrideMap::Index::MaxIndexOfDim(FlexDimensions dim) const { int max_index = stride_map_->shape_[dim] - 1; diff --git a/lstm/stridemap.h b/lstm/stridemap.h index 60dd855b4f00564658c65cac9a644fa09c8ecd3f..cd7d17a7d8a714a6e08c8d579344ffabce2b1a68 100644 --- a/lstm/stridemap.h +++ b/lstm/stridemap.h @@ -69,7 +69,7 @@ class StrideMap { bool IsValid() const; // Returns true if the index of the given dimension is the last. bool IsLast(FlexDimensions dimension) const; - // Given that the dimensions upto and including dim-1 are valid, returns the + // Given that the dimensions up to and including dim-1 are valid, returns the // maximum index for dimension dim. int MaxIndexOfDim(FlexDimensions dim) const; // Adds the given offset to the given dimension. Returns true if the result diff --git a/lstm/weightmatrix.cpp b/lstm/weightmatrix.cpp index c596fcac5986d0c20e8d6a74beee198ad6de5092..d3bf35b9616b5ce77cfd769b29be740b7131475a 100644 --- a/lstm/weightmatrix.cpp +++ b/lstm/weightmatrix.cpp @@ -163,7 +163,7 @@ const int kDoubleFlag = 128; // Writes to the given file. Returns false in case of error. bool WeightMatrix::Serialize(bool training, TFile* fp) const { - // For backward compatability, add kDoubleFlag to mode to indicate the doubles + // For backward compatibility, add kDoubleFlag to mode to indicate the doubles // format, without errs, so we can detect and read old format weight matrices. uinT8 mode = (int_mode_ ? kInt8Flag : 0) | (use_ada_grad_ ? kAdaGradFlag : 0) | kDoubleFlag; @@ -202,7 +202,7 @@ bool WeightMatrix::DeSerialize(bool training, bool swap, TFile* fp) { } // As DeSerialize, but reads an old (float) format WeightMatrix for -// backward compatability. +// backward compatibility. bool WeightMatrix::DeSerializeOld(bool training, bool swap, TFile* fp) { GENERIC_2D_ARRAY float_array; if (int_mode_) { diff --git a/lstm/weightmatrix.h b/lstm/weightmatrix.h index bf533ac04329d4d026dd4ab17363292f04c6e843..24fd5c10e3e6d2fe2201b1e129706f19b2ac11db 100644 --- a/lstm/weightmatrix.h +++ b/lstm/weightmatrix.h @@ -100,7 +100,7 @@ class WeightMatrix { // If swap is true, assumes a big/little-endian swap is needed. bool DeSerialize(bool training, bool swap, TFile* fp); // As DeSerialize, but reads an old (float) format WeightMatrix for - // backward compatability. + // backward compatibility. bool DeSerializeOld(bool training, bool swap, TFile* fp); // Computes matrix.vector v = Wu.