qubvel / efficientnet

Implementation of EfficientNet model. Keras and TensorFlow Keras.
https://arxiv.org/abs/1905.11946
Apache License 2.0
2.07k stars 472 forks source link

Failed to get convolution algorithm. This is probably because cuDNN failed to initialize #114

Open sliawatimena opened 4 years ago

sliawatimena commented 4 years ago

My system: Windows 10, 32 GB RAM, RTX2060 6GB, Tensorflow 1.15.0, CUDA Runtime 11.0, CUDA@nvcc = 10.0.130, cuDNN 7.6.5, python 3.7.6.

Is it because I am using conda 4.8.2?

I followed inference_example.ipynb from [https://github.com/qubvel/efficientnet/blob/master/examples/inference_example.ipynb] I got errors:

---------------------------------------------------------------------------
UnknownError                              Traceback (most recent call last)
<ipython-input-7-82b59429cbb7> in <module>
      6 
      7 # make prediction and decode
----> 8 y = model.predict(x)
      9 decode_predictions(y)

~\AppData\Roaming\Python\Python37\site-packages\keras\engine\training.py in predict(self, x, batch_size, verbose, steps, callbacks, max_queue_size, workers, use_multiprocessing)
   1399                                             verbose=verbose,
   1400                                             steps=steps,
-> 1401                                             callbacks=callbacks)
   1402 
   1403     def train_on_batch(self, x, y,

~\AppData\Roaming\Python\Python37\site-packages\keras\engine\training_arrays.py in predict_loop(model, f, ins, batch_size, verbose, steps, callbacks)
    330             batch_logs = {'batch': batch_index, 'size': len(batch_ids)}
    331             callbacks._call_batch_hook('predict', 'begin', batch_index, batch_logs)
--> 332             batch_outs = f(ins_batch)
    333             batch_outs = to_list(batch_outs)
    334             if batch_index == 0:

~\AppData\Roaming\Python\Python37\site-packages\keras\backend\tensorflow_backend.py in __call__(self, inputs)
   2977                     return self._legacy_call(inputs)
   2978 
-> 2979             return self._call(inputs)
   2980         else:
   2981             if py_any(is_tensor(x) for x in inputs):

~\AppData\Roaming\Python\Python37\site-packages\keras\backend\tensorflow_backend.py in _call(self, inputs)
   2935             fetched = self._callable_fn(*array_vals, run_metadata=self.run_metadata)
   2936         else:
-> 2937             fetched = self._callable_fn(*array_vals)
   2938         return fetched[:len(self.outputs)]
   2939 

~\AppData\Roaming\Python\Python37\site-packages\tensorflow_core\python\client\session.py in __call__(self, *args, **kwargs)
   1470         ret = tf_session.TF_SessionRunCallable(self._session._session,
   1471                                                self._handle, args,
-> 1472                                                run_metadata_ptr)
   1473         if run_metadata:
   1474           proto_data = tf_session.TF_GetBuffer(run_metadata_ptr)

UnknownError: 2 root error(s) found.
  (0) Unknown: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.
     [[{{node stem_conv_1/convolution}}]]
     [[probs_1/Softmax/_4523]]
  (1) Unknown: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.
     [[{{node stem_conv_1/convolution}}]]
0 successful operations.
0 derived errors ignored.

Please help. Thank you very much in advance.

Warmest Regards, Suryadi

HugoDel commented 4 years ago

As far as I know, this error seem to not be related with this efficientnet implementation. Did you sucess to run a simplier ConvNet network ?

geometrikal commented 4 years ago

@sliawatimena Close any other running python scripts or console instances that are still open. You can check if there are other python instances in Task Manager (Ctrl-Shift-Escape)

atamazian commented 2 years ago

Your problem is not related to the package itself, so I suggest to close this issue.