title: This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above. [Op:Conv2D]
body: <p>I install TensorFlow-GPU 2.0 in my anaconda when I install it and import the package then run my CNN model it's working correctly but when I try to run the training model the error appears.</p>
  
  <p>this my error report :</p>
  
  <pre><code>Epoch 1/50
  ---------------------------------------------------------------------------
  UnknownError                              Traceback (most recent call last)
  &lt;ipython-input-5-c4639d74909a&gt; in &lt;module&gt;
        6                                         epochs=50,
        7                                         validation_data=testing_set,
  ----&gt; 8                                         validation_steps=50)
  
  ~\Anaconda3\envs\tf-gpu\lib\site-packages\tensorflow_core\python\keras\engine\training.py in fit_generator(self, generator, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, validation_freq, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch)
     1295         shuffle=shuffle,
     1296         initial_epoch=initial_epoch,
  -&gt; 1297         steps_name='steps_per_epoch')
     1298 
     1299   def evaluate_generator(self,
  
  ~\Anaconda3\envs\tf-gpu\lib\site-packages\tensorflow_core\python\keras\engine\training_generator.py in model_iteration(model, data, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, validation_freq, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch, mode, batch_size, steps_name, **kwargs)
      263 
      264       is_deferred = not model._is_compiled
  --&gt; 265       batch_outs = batch_function(*batch_data)
      266       if not isinstance(batch_outs, list):
      267         batch_outs = [batch_outs]
  
  ~\Anaconda3\envs\tf-gpu\lib\site-packages\tensorflow_core\python\keras\engine\training.py in train_on_batch(self, x, y, sample_weight, class_weight, reset_metrics)
      971       outputs = training_v2_utils.train_on_batch(
      972           self, x, y=y, sample_weight=sample_weight,
  --&gt; 973           class_weight=class_weight, reset_metrics=reset_metrics)
      974       outputs = (outputs['total_loss'] + outputs['output_losses'] +
      975                  outputs['metrics'])
  
  ~\Anaconda3\envs\tf-gpu\lib\site-packages\tensorflow_core\python\keras\engine\training_v2_utils.py in train_on_batch(model, x, y, sample_weight, class_weight, reset_metrics)
      262       y,
      263       sample_weights=sample_weights,
  --&gt; 264       output_loss_metrics=model._output_loss_metrics)
      265 
      266   if reset_metrics:
  
  ~\Anaconda3\envs\tf-gpu\lib\site-packages\tensorflow_core\python\keras\engine\training_eager.py in train_on_batch(model, inputs, targets, sample_weights, output_loss_metrics)
      309           sample_weights=sample_weights,
      310           training=True,
  --&gt; 311           output_loss_metrics=output_loss_metrics))
      312   if not isinstance(outs, list):
      313     outs = [outs]
  
  ~\Anaconda3\envs\tf-gpu\lib\site-packages\tensorflow_core\python\keras\engine\training_eager.py in _process_single_batch(model, inputs, targets, output_loss_metrics, sample_weights, training)
      250               output_loss_metrics=output_loss_metrics,
      251               sample_weights=sample_weights,
  --&gt; 252               training=training))
      253       if total_loss is None:
      254         raise ValueError('The model cannot be run '
  
  ~\Anaconda3\envs\tf-gpu\lib\site-packages\tensorflow_core\python\keras\engine\training_eager.py in _model_loss(model, inputs, targets, output_loss_metrics, sample_weights, training)
      125     inputs = nest.map_structure(ops.convert_to_tensor, inputs)
      126 
  --&gt; 127   outs = model(inputs, **kwargs)
      128   outs = nest.flatten(outs)
      129 
  
  ~\Anaconda3\envs\tf-gpu\lib\site-packages\tensorflow_core\python\keras\engine\base_layer.py in __call__(self, inputs, *args, **kwargs)
      889           with base_layer_utils.autocast_context_manager(
      890               self._compute_dtype):
  --&gt; 891             outputs = self.call(cast_inputs, *args, **kwargs)
      892           self._handle_activity_regularization(inputs, outputs)
      893           self._set_mask_metadata(inputs, outputs, input_masks)
  
  ~\Anaconda3\envs\tf-gpu\lib\site-packages\tensorflow_core\python\keras\engine\sequential.py in call(self, inputs, training, mask)
      254       if not self.built:
      255         self._init_graph_network(self.inputs, self.outputs, name=self.name)
  --&gt; 256       return super(Sequential, self).call(inputs, training=training, mask=mask)
      257 
      258     outputs = inputs  # handle the corner case where self.layers is empty
  
  ~\Anaconda3\envs\tf-gpu\lib\site-packages\tensorflow_core\python\keras\engine\network.py in call(self, inputs, training, mask)
      706     return self._run_internal_graph(
      707         inputs, training=training, mask=mask,
  --&gt; 708         convert_kwargs_to_constants=base_layer_utils.call_context().saving)
      709 
      710   def compute_output_shape(self, input_shape):
  
  ~\Anaconda3\envs\tf-gpu\lib\site-packages\tensorflow_core\python\keras\engine\network.py in _run_internal_graph(self, inputs, training, mask, convert_kwargs_to_constants)
      858 
      859           # Compute outputs.
  --&gt; 860           output_tensors = layer(computed_tensors, **kwargs)
      861 
      862           # Update tensor_dict.
  
  ~\Anaconda3\envs\tf-gpu\lib\site-packages\tensorflow_core\python\keras\engine\base_layer.py in __call__(self, inputs, *args, **kwargs)
      889           with base_layer_utils.autocast_context_manager(
      890               self._compute_dtype):
  --&gt; 891             outputs = self.call(cast_inputs, *args, **kwargs)
      892           self._handle_activity_regularization(inputs, outputs)
      893           self._set_mask_metadata(inputs, outputs, input_masks)
  
  ~\Anaconda3\envs\tf-gpu\lib\site-packages\tensorflow_core\python\keras\layers\convolutional.py in call(self, inputs)
      195 
      196   def call(self, inputs):
  --&gt; 197     outputs = self._convolution_op(inputs, self.kernel)
      198 
      199     if self.use_bias:
  
  ~\Anaconda3\envs\tf-gpu\lib\site-packages\tensorflow_core\python\ops\nn_ops.py in __call__(self, inp, filter)
     1132           call_from_convolution=False)
     1133     else:
  -&gt; 1134       return self.conv_op(inp, filter)
     1135     # copybara:strip_end
     1136     # copybara:insert return self.conv_op(inp, filter)
  
  ~\Anaconda3\envs\tf-gpu\lib\site-packages\tensorflow_core\python\ops\nn_ops.py in __call__(self, inp, filter)
      637 
      638   def __call__(self, inp, filter):  # pylint: disable=redefined-builtin
  --&gt; 639     return self.call(inp, filter)
      640 
      641 
  
  ~\Anaconda3\envs\tf-gpu\lib\site-packages\tensorflow_core\python\ops\nn_ops.py in __call__(self, inp, filter)
      236         padding=self.padding,
      237         data_format=self.data_format,
  --&gt; 238         name=self.name)
      239 
      240 
  
  ~\Anaconda3\envs\tf-gpu\lib\site-packages\tensorflow_core\python\ops\nn_ops.py in conv2d(input, filter, strides, padding, use_cudnn_on_gpu, data_format, dilations, name, filters)
     2008                            data_format=data_format,
     2009                            dilations=dilations,
  -&gt; 2010                            name=name)
     2011 
     2012 
  
  ~\Anaconda3\envs\tf-gpu\lib\site-packages\tensorflow_core\python\ops\gen_nn_ops.py in conv2d(input, filter, strides, padding, use_cudnn_on_gpu, explicit_paddings, data_format, dilations, name)
     1029             input, filter, strides=strides, use_cudnn_on_gpu=use_cudnn_on_gpu,
     1030             padding=padding, explicit_paddings=explicit_paddings,
  -&gt; 1031             data_format=data_format, dilations=dilations, name=name, ctx=_ctx)
     1032       except _core._SymbolicException:
     1033         pass  # Add nodes to the TensorFlow graph.
  
  ~\Anaconda3\envs\tf-gpu\lib\site-packages\tensorflow_core\python\ops\gen_nn_ops.py in conv2d_eager_fallback(input, filter, strides, padding, use_cudnn_on_gpu, explicit_paddings, data_format, dilations, name, ctx)
     1128   explicit_paddings, "data_format", data_format, "dilations", dilations)
     1129   _result = _execute.execute(b"Conv2D", 1, inputs=_inputs_flat, attrs=_attrs,
  -&gt; 1130                              ctx=_ctx, name=name)
     1131   _execute.record_gradient(
     1132       "Conv2D", _inputs_flat, _attrs, _result, name)
  
  ~\Anaconda3\envs\tf-gpu\lib\site-packages\tensorflow_core\python\eager\execute.py in quick_execute(op_name, num_outputs, inputs, attrs, ctx, name)
       65     else:
       66       message = e.message
  ---&gt; 67     six.raise_from(core._status_to_exception(e.code, message), None)
       68   except TypeError as e:
       69     keras_symbolic_tensors = [
  
  ~\Anaconda3\envs\tf-gpu\lib\site-packages\six.py in raise_from(value, from_value)
  
  UnknownError: 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. [Op:Conv2D]
  
  1
  # Save a model
  2
  model.save('Datasets/300_train/CNN_300.tflearn')
  </code></pre>
  
  <p>This is my CNN Code:</p>
  
  <p>as the information, I have to install NVIDIA GPU Driver version 441.20 with NVCUDA.DLL 10.2.95</p>
  
  <p><img src="https://i.stack.imgur.com/c0w05.png" alt="![enter image description here">]<a href="https://i.stack.imgur.com/c0w05.png" rel="nofollow noreferrer">1</a></p>