Skip to content

Instantly share code, notes, and snippets.

@lirnli
Created October 16, 2017 10:51
Show Gist options
  • Star 14 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save lirnli/4282fcdfb383bb160cacf41d8c783c70 to your computer and use it in GitHub Desktop.
Save lirnli/4282fcdfb383bb160cacf41d8c783c70 to your computer and use it in GitHub Desktop.
Pytorch Wavenet
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lirnli
Copy link
Author

lirnli commented Dec 1, 2017

yes. generate() function takes way too much memory. That might be because pytorch tries to expand the storage (not the tensor) as a whole piece, but never deallocates used portions. One quick work around would be to clone the tensor every few cycles, so the old tensor and storage can be freed by GC. I do not have a more Pythonic solution right now.

@littleTwelve
Copy link

Whether I use generate_slow() or generate(), I only get a straight line, do you know why ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment