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

Pytorch Lightning Integration #569

Merged
merged 39 commits into from Jan 30, 2021
Merged

Pytorch Lightning Integration #569

merged 39 commits into from Jan 30, 2021

Conversation

SeanNaren
Copy link
Owner

@SeanNaren SeanNaren commented Aug 18, 2020

Closes #568

@SeanNaren
Copy link
Owner Author

Next steps are to integrate saving/loading of the model from training to eval.

README.md Outdated Show resolved Hide resolved
@stale stale bot added the stale label Oct 3, 2020
Repository owner deleted a comment from stale bot Oct 3, 2020
@stale stale bot removed the stale label Oct 7, 2020
@stale
Copy link

stale bot commented Nov 23, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added stale and removed stale labels Nov 23, 2020
Sean Narenthiran and others added 18 commits December 12, 2020 14:49
…ity, integrated checkpoint support, fixed validation support
…x for adam Trains support, removed autocast since this is handled via lightning
)
self.fc = nn.Sequential(
SequenceWise(fully_connected),
)
self.inference_softmax = InferenceBatchSoftmax()
self.criterion = CTCLoss(reduction='sum', zero_infinity=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm currently using reduction='mean' and zero_infinity=False (the defaults)
What's the reason for these parameters?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reduction sum means do not average the loss/gradients. This is reflecting the behaviour of warp-ctc. Zero infinity means if we get an inf gradient, we zero instead of returning infinite. Another behaviour copying warp-ctc!

Co-authored-by: Anas Abou Allaban <aabouallaban@protonmail.com>
@SeanNaren
Copy link
Owner Author

I've run into some strange convergence issues with librispeech on this branch. Going to investigate and have a look (might just be the batch size needs to be small).

@piraka9011
Copy link
Contributor

piraka9011 commented Dec 28, 2020

FYI, I had to install omegaconf from source (specifically from this commit) in order to get DeepSpeech.load_from_checkpoint() to work when performing inference.

Otherwise, I would get an error when the model tried to parse the spect_cfg.sample_rate (or any spect_cfg) from the checkpoint.

TypeError: issubclass() arg 1 must be a class

where the type of sample_rate for example is inferred as Any.

My assumption is that this is the relevant issue.

Maybe this is also an upstream issue w/ PTL?

@SeanNaren
Copy link
Owner Author

Builds will fail due to lack of pre-trained models, but that should be solved once i make the release! I think we're there

@SeanNaren SeanNaren merged commit d9790d9 into master Jan 30, 2021
@SeanNaren SeanNaren deleted the feature/lightning branch January 30, 2021 12:52
@ritwikmishra
Copy link
Contributor

ritwikmishra commented Mar 9, 2021

TypeError: issubclass() arg 1 must be a class

I solved this by reinstalling omegaconf to this version omegaconf==2.1.0.dev9.

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.

Integrate PyTorch Lightning
4 participants