-
Notifications
You must be signed in to change notification settings - Fork 16
Update Nn::TransitionLabelScorer: remove wrapped LabelScorer #155
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
Conversation
| result->score += transitionScores_[request.transitionType]; | ||
| } | ||
| LabelScorer::ScoreWithTime result; | ||
| result.score = transitionScores_[request.transitionType]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the timeframe initialized with 0?
Should it be for example currentStep of StepScoringContext class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't really use a scoring context in this label scorer and therefore have no information about the current timestep. LabelScorer::ScoreWithTime however needs a timeframe. Therefore I just set it to 0 because it is not used anyways. When using the TransitionLabelScorer in combination with another label scorer in the CombineLabelScorer, the maximum of both timesteps will be used for the result, so 0 won't break anything.
# Conflicts: # src/Nn/LabelScorer/CombineLabelScorer.hh # src/Nn/LabelScorer/EncoderDecoderLabelScorer.hh # src/Nn/LabelScorer/FixedContextOnnxLabelScorer.hh # src/Nn/LabelScorer/LabelScorer.cc # src/Nn/LabelScorer/LabelScorer.hh # src/Nn/LabelScorer/NoContextOnnxLabelScorer.hh # src/Nn/LabelScorer/NoOpLabelScorer.hh # src/Nn/LabelScorer/StatefulOnnxLabelScorer.hh # src/Nn/LabelScorer/TransitionLabelScorer.cc # src/Nn/LabelScorer/TransitionLabelScorer.hh
The TransitionLabelScorer was used with a base label scorer. However, we find it more intuitive to have it standalone such that it can be used together with another label scorer in the CombineLabelScorer.
Most function are just no op now and a dummy scoring context was needed.
Depends on #148.