WaqasSultani / AnomalyDetectionCVPR2018

499 stars 181 forks source link

theano.sandbox.cuda error #60

Open awesome-yz opened 4 years ago

awesome-yz commented 4 years ago

I have installed theano version 1.0.4, with keras 1.1.0. Have cuda version 10.1 and my .theanorc file consists the following configuration:

[global] floatX = float32 device = cuda0 optimizer = fast_run

[nvcc] fastmath = True

[blas] ldflags = -L/usr/local/lib -lopenblas

[cuda] root = /usr/local/cuda-10.1/bin

[dnn] include_path = /usr/include/ library_path = /usr/lib/x84_64-linux-gnu

running the theano gpu.test() gave me this output Can not use cuDNN on context None: cannot compile with cuDNN. We got this error: b'In file included from /tmp/try_flags_dh61617g.c:3:0:\n/usr/include/stdio.h:27:10: fatal error: bits/libc-header-start.h: No such file or directory\n #include <bits/libc-header-start.h>\n ^~~~~~\ncompilation terminated.\n' Mapped name None to device cuda0: GeForce GTX 1050 Ti (0000:01:00.0) [GpuElemwise{exp,no_inplace}(<GpuArrayType(float32, vector)>), HostFromGpu(gpuarray)(GpuElemwise{exp,no_inplace}.0)] Looping 1000 times took 1.511685 seconds Result is [1.2317803 1.6187935 1.5227807 ... 2.2077181 2.2996776 1.623233 ] Used the gpu

Did anyone face the same problem, and how can I resolve this? Also, is there an alternative that will enable me to run the training file?

Villjoie commented 4 years ago

I have the same problem

sakshijain032 commented 4 years ago

Comment this line theano.sandbox.cuda.use('gpu0')

sanjayroka05 commented 4 years ago

I have got problem please help me: AttributeError: module 'theano.sandbox' has no attribute 'cuda'

Villjoie commented 4 years ago

you check, if installed the cuda and cuDNN programs well

dersugiritlioglu commented 3 years ago

One can use like this:

THEANO_FLAGS='device=cuda0' python TrainingAnomalyDetector_public.py