xunhuang1995 / AdaIN-style

Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization
https://arxiv.org/abs/1703.06868
MIT License
1.47k stars 192 forks source link

Cpu - resolution #2

Closed CJHFUTURE closed 7 years ago

CJHFUTURE commented 7 years ago

Hi is it possible to run on CPU only? Is it possible to run on large content images?

xunhuang1995 commented 7 years ago

CPU: Yes, use -gpu -1 Large content images: Yes when using CPU. Should also be a yes when using GPU because feed-forward inference doesn't really need much memory. However in the implementation of torch.nn the intermediate features are always stored, which wastes lots of memory during inference. So currently the network may have some problem for large content images. I will try to fix this with optimize-net.