jcjohnson / torch-rnn

Efficient, reusable RNNs and LSTMs for torch
MIT License
2.5k stars 507 forks source link

"luajit: not enough memory" during sampling #158

Open danieleghisi opened 7 years ago

danieleghisi commented 7 years ago

Hi, thanks a lot for this great development.

Whenever I sample more than a few thousand chars, I run into a "luajit: not enough memory" issue. Is this a known fact? Is there a workaround for this? This issue may be related to #100: in my case also training is fine, and sampling is done on GPU. (However sampling on CPU in my case is way slower, hence it's not really an option)

If anyone has a workaround, that'd be great! Daniele

danindiana commented 7 years ago

When I attempt to write the sampling to an output in Ubuntu 14.04 via > someoutput.txt it creates the .txt file but never inputs any data into it and eventually seems to run out of memory via your "luajit: not enough memory" error.

The program works great insofar as it uses considerably less RAM than char-rnn but not being able to output the sampling into a file is frustrating.

Any word on progress on this bug?

danindiana commented 7 years ago

Getting this issue currently:

th sample.lua -checkpoint cv/checkpoint_4450.t7 -length 4452066 > outputtext.txt

luajit: not enough memory

yyyyy- -yyyyyy+ OS: ubuntu Ubuntu 14.04 trusty ://+//////-yyyyyyo Kernel: x86_64 Linux 3.13.0-121-generic .++ .:/++++++/-.+sss/Uptime: 8h 20m .:++o: /++++++++/:--:/- Packages: 4149 o:+o+:++...`.-/oo+++++/ Shell: bash 4.3.11 .:+o:+o/. `+sssoo+/ Resolution: 1920x1080 .++/+:+oo+o:` /sssooo. DE: Gnome 3.9.90 /+++//+:`oo+o /::--:. WM: GNOME Shell \+/+o+++`o++o ++////. WM Theme: Adwaita .++.o+++oo+:` /dddhhh. GTK Theme: Radiance [GTK2/3] .+.o+oo:. `oddhhhh+ Icon Theme: elementary-xfce-darker \+.++o+o-```.:ohdhhhhh+ Font: Cantarell 11 :o+++ ohhhhhhhhyo++os: CPU: AMD FX-8350 Eight-Core @ 4GHz .o:.syhhhhhhh/.oo++o` GPU: GeForce GTX 750 Ti /osyyyyyyo++ooo+++/ RAM: 7127MiB / 24011MiB


                          `oo++.      
dgcrouse commented 7 years ago

Can someone try on a different GPU? It might be related to VRAM.