TextGAN-PyTorch icon indicating copy to clipboard operation
TextGAN-PyTorch copied to clipboard

Execution in CPU-only Mode

Open malikeh1375 opened this issue 3 years ago • 3 comments

I am running the codes on macOS without NVIDIA GPU Graphic Card available. I wonder how I can run the scripts in CPU-only mode. What sections should I modify?

Thanks in advance!

malikeh1375 avatar Jul 03 '21 04:07 malikeh1375

same question, any solution?

doublequeens avatar Aug 10 '21 05:08 doublequeens

In pytorch you can call the .to() function to attach a device to another GPU / CPU.

tensor.to('cpu') should attach the tensor to the CPU of your computer. However, I believe that quite a lot of tensors should be reattched so I would recommend that you be careful with this.

FabienCharmet avatar Sep 08 '21 07:09 FabienCharmet

You can set CUDA = int(False) in the run_[model].py.

HernandezEduin avatar May 02 '22 23:05 HernandezEduin