如何在终端中运行python main.py这样的代码



我使用github并通过gitclone复制它。https://github.com/Zeleni9/pytorch-wgan

但是当我运行代码时:

python main.py --model WGAN-GP 
--is_train True 
--download True 
--dataroot datasets/cifar 
--dataset cifar 
--generator_iters 40000 
--cuda True 
--batch_size 64
RuntimeError: Unexpected error from cudaGetDeviceCount(). 
Did you run some cuda functions before calling NumCudaDevices() 
that might have already set an error? Error 2: out of memory

但我可以在colab上运行,不会有任何问题。我的终端可以使用比colab更多的GPU。我想输入的代码可能有一些问题?非常感谢。

命令:1.:chmod 770 main.py 2.:哪个python(在这里你会知道你有哪条python(例如:python3,推荐使用(3.:pythoN3main.py(应该可以使用(`

最新更新