GithubHelp home page GithubHelp logo

Comments (3)

zszzlmt avatar zszzlmt commented on August 20, 2024

it seems that even though i added the option "--gpu_ids -1", the self.device still have value cuda:0

self.device = torch.device("cuda:0" if self.opt.gpu_ids!=-1 else "cpu")

why
qaq

from ganomaly.

zszzlmt avatar zszzlmt commented on August 20, 2024

And I skipped this line, force self.device to be "cpu", but the problem is still there

THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1535491974311/work/aten/src/THC/THCGeneral.cpp line=74 error=35 : CUDA driver version is insufficient for CUDA runtime version
Traceback (most recent call last):
File "/home/foo/ganomaly/train.py", line 43, in
model.train()
File "/home/foo/ganomaly/lib/model.py", line 285, in train
self.train_epoch()
File "/home/foo/ganomaly/lib/model.py", line 255, in train_epoch
self.optimize()
File "/home/foo/ganomaly/lib/model.py", line 187, in optimize
self.update_netd()
File "/home/foo/ganomaly/lib/model.py", line 146, in update_netd
self.fake, self.latent_i, self.latent_o = self.netg(self.input)
File "/home/foo/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/home/foo/ganomaly/lib/networks.py", line 173, in forward
latent_i = self.encoder1(x)
File "/home/foo/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/home/foo/ganomaly/lib/networks.py", line 72, in forward
if isinstance(input.data, torch.cuda.FloatTensor) and self.ngpu > 1:
RuntimeError: cuda runtime error (35) : CUDA driver version is insufficient for CUDA runtime version at /opt/conda/conda-bld/pytorch_1535491974311/work/aten/src/THC/THCGeneral.cpp:74

from ganomaly.

samet-akcay avatar samet-akcay commented on August 20, 2024

I've updated the repo now. You could run the code on CPU via the following command: python train.py --device cpu. However, this is not recommended since training on CPU takes much more time than training on GPU.

from ganomaly.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.