Skip to content
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

Merged
merged 2 commits into from
Jan 3, 2019

Conversation

hhadian
Copy link

@hhadian hhadian commented Jan 1, 2019

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.

…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,
Copy link
Owner

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!

@danpovey
Copy link
Owner

danpovey commented Jan 1, 2019

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.

@hhadian
Copy link
Author

hhadian commented Jan 2, 2019

Yes, they are quite different. I think it's more clear if the codes for addition/removal of context are separate.

@danpovey
Copy link
Owner

danpovey commented Jan 2, 2019

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.

@hhadian
Copy link
Author

hhadian commented Jan 2, 2019

Will do.

@hhadian hhadian changed the title [WIP] Add context-extension capability and merged-eg support to nnet3-chain-copy-egs Add context-extension capability and merged-eg support to nnet3-chain-copy-egs Jan 3, 2019
@hhadian
Copy link
Author

hhadian commented Jan 3, 2019

I looked at the result and they seem good.
I also tested this by comparing the output of copy-egs | merge-egs with that of merge-egs | copy-egs while changing the contexts and the outputs were identical.

@danpovey
Copy link
Owner

danpovey commented Jan 3, 2019

Thanks. Merging.

@danpovey danpovey merged commit 0f13be7 into danpovey:svd_draft Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants