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

In Decoder::decode : predicted transition has to be appliable

parent bbb847ee
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,7 @@ void Decoder::decode(BaseConfig & config, std::size_t beamSize, bool debug)
int chosenTransition = -1;
for (unsigned int i = 0; i < prediction.size(0); i++)
if ((chosenTransition == -1 or prediction[i].item<float>() > prediction[chosenTransition].item<float>()) and machine.getTransitionSet().getTransition(i))
if ((chosenTransition == -1 or prediction[i].item<float>() > prediction[chosenTransition].item<float>()) and machine.getTransitionSet().getTransition(i)->appliable(config))
chosenTransition = i;
if (chosenTransition == -1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment