Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for LSTM Diplopia issue #3476

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Prev Previous commit
Merge branch 'main' into JDWDIPLOPIA
  • Loading branch information
woodjohndavid committed Jan 30, 2022
commit 4035a7f3cd327adbfa239c29fcdb8b0a74aacc47
8 changes: 5 additions & 3 deletions src/lstm/recodebeam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,12 @@ RecodeBeamSearch::combineSegmentedTimesteps(
return combined_timesteps;
}

void RecodeBeamSearch::calculateCharBoundaries(std::vector<int> *starts, std::vector<int> *ends,
std::vector<int> *char_bounds_, int maxWidth) {
void RecodeBeamSearch::calculateCharBoundaries(std::vector<int> *starts,
std::vector<int> *ends,
std::vector<int> *char_bounds_,
int maxWidth) {
char_bounds_->push_back((*starts)[0]);
for (int i = 0; i < ends->size(); ++i) {
for (unsigned i = 0; i < ends->size(); ++i) {
int middle = ((*starts)[i + 1] - (*ends)[i]) / 2;
char_bounds_->push_back((*ends)[i] + middle);
}
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.