Yijunmaverick / UniversalStyleTransfer

The source code of NIPS17 'Universal Style Transfer via Feature Transforms'.
MIT License
599 stars 91 forks source link

CPU mode? #1

Open CJHFUTURE opened 7 years ago

CJHFUTURE commented 7 years ago

Hi is there a CPU mode only flag available?

Yijunmaverick commented 7 years ago

@Sugarbank Thanks for your interests about our work.

Yes, we provide the option for running in CPU mode:

th test_wct.lua -gpu -1
jjmontesl commented 6 years ago

Could someone provide model snapshots for CPU? (or can they be converted without cuda support?

Yijunmaverick commented 6 years ago

@jjmontesl

Hi, do you mean that you cannot load my model trained under GPU? Did you install cudnn?

jjmontesl commented 6 years ago

Hello. Thanks for responding. I don't have a Cuda GPU, hence I cannot install cudnn and wanted to run from CPU.

When loading models, torch complains because the models are serialized including Cuda classes that are not available in my runtime. The issue seems well known (https://groups.google.com/forum/#!topic/torch7/ugBCwaoXw_s ).

I am entirely new to Torch and maybe this has an easy solution, but I have since tried the Tensorflow implementation you referenced which doesn't raise this issue.

Best,

Yijunmaverick commented 6 years ago

@Sugarbank @jjmontesl Sorry for the late reply. Since I use the GPU during the training, the decoders require the cudnn for the loading.

I need to explicitly transfer the models to float so that you can load in CPU mode. Please find them here.