-
Notifications
You must be signed in to change notification settings - Fork 248
adding nvidia models #22
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
adding nvidia models #22
Conversation
scripts/run_pytorch.sh
Outdated
| # FIXME: GAN models checkpoints are on cuda. | ||
| if [[ $f = $GANs* ]]; then | ||
| # FIXME: GAN and NVIDIA models checkpoints are on cuda. | ||
| if [[ $f = $GANs* ]] || [[ $f = $CUDAs* ]]; then |
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.
Adding a cuda checkpoint will require user have a cuda pytorch installed to load it. Would it possible to convert them to cpu in hubconf entrypoints and relax it here?
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.
considering this is NVIDIA, i think it's okay
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.
thx. I had to revive the above condition in run_pytorch.sh to pass your CI
|
Deploy preview for pytorch-hub-preview ready! Built with commit 4bdea5b |
|
@nv-kkudrynski Also I'm not sure why this didn't trigger the circleCi check. See #23 as an example, maybe try rebasing? |
|
@soumith -- are we going to be able to accept this whole pull request? I believe from side conversation you had some concerns with the NCF. Have those been addressed? If we can't accept the NCF part would it make sense to split this so that we could get the waveglow and tacotron2 models up first then address the NCF issues? |
|
yes, there are a few changes needed.
|
| hub_model = torch.hub.load(github='nvidia/DeepLearningExamples', model='nvidia_tacotron2') | ||
| hub_model = hub_model.cuda() | ||
| hub_model.eval() | ||
| inp = torch.randint(low=0, high=148, size=(1,140), dtype=torch.long) |
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.
describe what this input is supposed to be, for example see https://pytorch.org/hub/facebookresearch_pytorch-gan-zoo_dcgan/
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.
changed strategy of this example to go from plain text to sound using the two torch.hub models in series
| hub_model = torch.hub.load(github='nvidia/DeepLearningExamples', model='nvidia_waveglow') | ||
| ``` | ||
| will load the WaveGlow model pre-trained on [LJ Speech dataset](https://keithito.com/LJ-Speech-Dataset/) | ||
|
|
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.
same thoughts as above. Add details on what the model takes as input and gives as output.
For example see: https://pytorch.org/hub/facebookresearch_pytorch-gan-zoo_dcgan/
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.
changed strategy of this example to go from plain text to sound using the two torch.hub models in series
| print('\nWaveglow model test output:') | ||
| print(out.size()) | ||
| ``` | ||
|
|
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.
add a visualization of the test output, or some other way to interpret the output
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.
changed strategy of this example to go from plain text to sound using the two torch.hub models in series
scripts/run_pytorch.sh
Outdated
| # FIXME: GAN models checkpoints are on cuda. | ||
| if [[ $f = $GANs* ]]; then | ||
| # FIXME: GAN and NVIDIA models checkpoints are on cuda. | ||
| if [[ $f = $GANs* ]] || [[ $f = $CUDAs* ]]; then |
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.
considering this is NVIDIA, i think it's okay
…ng_nvidia_models # Conflicts: # scripts/install.sh # scripts/run_pytorch.sh
Indeed, NCF is quite specific. We also had discussions about it. It could however be useful if loaded pretrained=False (I added example in readme and provided reference for details about training). Then pre-trained model could serve as reference. Let me know what you think.
In our flow formatting input/output is not part of the model object, so we need a few internal changes to adapt to your request. We are working on this atm. |
|
@nv-kkudrynski i think NCF can serve as a reference with |
|
even an "easy-finetuning" starting from the pretrained model possibility has potential, but from what I can tell with the dataset, the pre-trained model doesn't have much to gain wrt fine-tuning -- the features aren't generic to generalize to a different set of users + attributes to do recommendation on |
Great, thanks for the update. |
I think there was a discussion about it which concluded with exactly the opposite :)
But don't worry, update is coming ;) |
|
@ailzhang that line needs to be removed I think? |
|
I removed NCF from this PR to enable tacotron2/waveglow hopefully before the weekend. |
|
@soumith - have the changes here addressed all your concerns? |
|
thanks so much @nv-kkudrynski , the updated stuff looks good. I might make some additional changes so that it plays well with opening the notebooks in Google Colab. Additionally, if you are interested as a follow-up (totally up to you and if it makes sense), add end-points for any intermediate features that might make sense for folks to use these models as a feature-extractor / fine-tuner. |
|
Thanks to everyone for all the feedback and smooth cooperation! |
Summary: update doc as pointed out in pytorch/hub#22 Pull Request resolved: #21568 Differential Revision: D15732927 Pulled By: ailzhang fbshipit-source-id: 78ab026539e5ee59e7c3a8144e2c9fcbbc225733
|
fyi, I have updated the hub card to play well with google colab -- now you can generate the speech and listen to it immediately, all in the colab notebook. |
|
Thanks a lot for that! |
No description provided.