-
Notifications
You must be signed in to change notification settings - Fork 16
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
Generic Seq2Seq Decoder LabelScorer #51
base: master
Are you sure you want to change the base?
Conversation
Remove author line.
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.
Not finished yet. Only started with the LabelHistoryManager, but have to go to meeting now.
} | ||
|
||
bool isEqualSequence(const LabelHistoryHandle lhd, const LabelHistoryHandle rhd) const { | ||
return label_sequence_hash(lhd->labelSeq) == label_sequence_hash(rhd->labelSeq); |
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.
Comparing hashes for equality is not the same thing as equality. Why is it ok to only check the hashes here?
|
||
// Note: all history have to inherit from LabelHistoryBase | ||
struct LabelHistoryBase { | ||
size_t ref_count, cacheHash; |
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.
size_t ref_count, cacheHash; | |
size_t refCount; | |
size_t cacheHash; |
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.
Also needs to be changed everywhere else
}; | ||
|
||
typedef LabelHistoryBase* LabelHistoryHandle; | ||
typedef std::unordered_map<size_t, LabelHistoryHandle> HistoryCache; |
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.
size_t here is a manually computed hash and we never test for equality correctly. Ideally we use something like: https://github.com/rwth-i6/rasr/blob/master/src/Lm/NNHistoryManager.hh#L69 for this. And even better: refactor this class and use a common class for this.
@@ -16,12 +16,300 @@ | |||
#ifndef TF_LABEL_SCORER_HH |
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.
This file should be inside the Tensorflow module
Co-authored-by: Eugen Beck <curufinwe@users.noreply.github.com>
Co-authored-by: Eugen Beck <curufinwe@users.noreply.github.com>
Co-authored-by: Eugen Beck <curufinwe@users.noreply.github.com>
Co-authored-by: Eugen Beck <curufinwe@users.noreply.github.com>
This PR contains a subset of changes from #45.
These are the changes that introduce the new LabelScorer and TFLabelScorer classes and subclasses.
The code in this PR can be compiled successfully but the new label-scorers are not actually used at this stage.