ray075hl / DeepPhotoStyle_pytorch

PyTorch implementation of "Deep Photo Style Transfer"
88 stars 21 forks source link

Gives memory error #1

Closed siddBanPsu closed 5 years ago

siddBanPsu commented 5 years ago

Buliding the style transfer model..

THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1524584710464/work/aten/src/THC/generic/THCStorage.cu line=58 error=2 : out of memory

ray075hl commented 5 years ago

Hello @siddBanPsu :smile: . Try small size image as input. This program really need lots of device memory. When I test a content image and style image with about size 1000x1000, that consumed about 16GB memory. There must be some ways to modify the code to be memory efficient. For example, release some memory when semantic segmentation finished. But most part of memory is consumed by intermediate variables at style transfer stage with hard coding. :cry: PS: My development environment has a CUDA device P40 contain 22GB memory.

siddBanPsu commented 5 years ago

Thanks @ray075hl . It worked with a small image. :)