NVIDIA / FastPhotoStyle

Style transfer, deep learning, feature transform
Other
11.13k stars 1.2k forks source link

Look at the memory consumption: should be able to process HD size picture #17

Open borisfom opened 6 years ago

borisfom commented 6 years ago

Hi, I came across the fact memory requirements are very high for this model. I suggest you review possible optimizations like in-place operations and buffer reuse. Also, 2 other optimization steps would bring the memory requirements down:

matthewarthur commented 6 years ago

Is that why I get the following error if my photos are not very small?

RuntimeError: cuda runtime error (2) : out of memory at /opt/conda/conda-bld/pytorch_1512378422383/work/torch/lib/THC/generic/THCStorage.cu:58

borisfom commented 6 years ago

You may want to look at sample FP16 converted style transfer here: https://github.com/borisfom/PytorchNeuralStyleTransfer