awentzonline / image-analogies

Generate image analogies using neural matching and blending.
MIT License
3.52k stars 282 forks source link

Reduce memory requirements #5

Closed awentzonline closed 8 years ago

awentzonline commented 8 years ago

Maybe adapt the approach taken in https://github.com/chuanli11/CNNMRF

alexjc commented 8 years ago

In Torch you can get full control over the forward and backward passes, and Chuan Li's code basically streams patches from main memory to GPU in the middle of the computation before propagating the error back.

If you use T.grad() Theano by default doesn't let you control memory like this in Torch, so I'm very curious how you'd approach this without throwing away the benefits/approach of Theano completely. Maybe I'm missing a magic "stream from main memory" operator or something ;-)

EDIT: For @DeepForger I use some patch-reduction technique, which works OK but there's a quality cliff that's hard to detect. It feels like a whole new research project :-|

awentzonline commented 8 years ago

THEANO_FLAGS="use_much_less_memory_please=true"

Seriously though, I'm not quite sure what to do about this yet.