Skip to content
Snippets Groups Projects
Commit 5f5386de authored by Franck Dary's avatar Franck Dary
Browse files

Added print of transitions scores during decoding in debug mode

parent 66560e71
No related branches found
No related tags found
No related merge requests found
...@@ -44,6 +44,10 @@ void Decoder::decode(BaseConfig & config, std::size_t beamSize, bool debug, bool ...@@ -44,6 +44,10 @@ void Decoder::decode(BaseConfig & config, std::size_t beamSize, bool debug, bool
chosenTransition = i; chosenTransition = i;
bestScore = score; bestScore = score;
} }
if (debug)
{
fmt::print(stderr, "{} {:7.2f} {}\n", machine.getTransitionSet().getTransition(i)->appliable(config) ? "*" : " ", score, machine.getTransitionSet().getTransition(i)->getName());
}
} }
} catch(std::exception & e) {util::myThrow(e.what());} } catch(std::exception & e) {util::myThrow(e.what());}
......
...@@ -212,6 +212,8 @@ void Config::printForDebug(FILE * dest) const ...@@ -212,6 +212,8 @@ void Config::printForDebug(FILE * dest) const
if (toPrint[line].back() == EOSSymbol1) if (toPrint[line].back() == EOSSymbol1)
fmt::print(dest, "\n"); fmt::print(dest, "\n");
} }
fmt::print(dest, "{}\n", longLine);
} }
Config::String & Config::getLastNotEmpty(int colIndex, int lineIndex) Config::String & Config::getLastNotEmpty(int colIndex, int lineIndex)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment