-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add context-extension capability and merged-eg support to nnet3-chain-copy-egs #62
Conversation
…eg support; truncate still only supports single egs.
@@ -224,41 +267,33 @@ void CalculateFrameSubsamplingFactor(const NnetChainExample &eg, | |||
void ModifyChainExampleContext(int32 left_context, | |||
int32 right_context, | |||
const int32 frame_subsampling_factor, | |||
NnetChainExample *eg) { | |||
static bool warned_left = false, warned_right = false; | |||
NnetChainExample *eg, |
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.
It's not clear to me what this function is supposed to do (or, actually, what it originally did). Please add documentation!
It seems to me that the mechanism for extending the left-context is quite different than the mechanism for removing left-context, and maybe it would be more elegant if the same code did all the context modification. But I haven't read the code recently so maybe there are reasons why this might be hard to do. Also I might in principle be OK with moving some code to the library dir. But I don't have super strong opinions about any of this. |
Yes, they are quite different. I think it's more clear if the codes for addition/removal of context are separate. |
OK. If you could try to run it on some egs on disk and inspect the result to make sure it's doing the right thing, that would be great. |
Will do. |
I looked at the result and they seem good. |
Thanks. Merging. |
The only thing remaining is to change the "truncate" code to support meged-egs.
I thought you might have comments regarding how I'm doing the context extension, so I created the work-in-progress PR.