title: Error in Keras when I want to calculate the Sensitivity and Specificity
body: <p>I am writing a code for classification between two types of images based on a CNN.
  I want to measure the accuracy, sensitivity, and specificity for my work but unfortunately, I have the following error. 
  Could you please let me know what my problem is. </p>
  
  <pre><code>m = tf.keras.metrics.SensitivityAtSpecificity(0.5)
  model.compile(optimizer='adam', loss=keras.losses.binary_crossentropy, metrics=['accuracy',m])
  </code></pre>
  
  <p>error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:/Users/Hamed/PycharmProjects/Deep Learning/CNN.py", line 77, in &lt;module&gt;
      validation_steps = 1600//batch_size)
    File "C:\Users\Hamed\Anaconda3\envs\tensorflowGPU\lib\site-packages\keras\legacy\interfaces.py", line 91, in wrapper
      return func(*args, **kwargs)
    File "C:\Users\Hamed\Anaconda3\envs\tensorflowGPU\lib\site-packages\keras\engine\training.py", line 1418, in fit_generator
      initial_epoch=initial_epoch)
    File "C:\Users\Hamed\Anaconda3\envs\tensorflowGPU\lib\site-packages\keras\engine\training_generator.py", line 217, in fit_generator
      class_weight=class_weight)
    File "C:\Users\Hamed\Anaconda3\envs\tensorflowGPU\lib\site-packages\keras\engine\training.py", line 1217, in train_on_batch
      outputs = self.train_function(ins)
    File "C:\Users\Hamed\Anaconda3\envs\tensorflowGPU\lib\site-packages\keras\backend\tensorflow_backend.py", line 2715, in __call__
      return self._call(inputs)
    File "C:\Users\Hamed\Anaconda3\envs\tensorflowGPU\lib\site-packages\keras\backend\tensorflow_backend.py", line 2675, in _call
      fetched = self._callable_fn(*array_vals)
    File "C:\Users\Hamed\Anaconda3\envs\tensorflowGPU\lib\site-packages\tensorflow\python\client\session.py", line 1439, in __call__
      run_metadata_ptr)
    File "C:\Users\Hamed\Anaconda3\envs\tensorflowGPU\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 528, in __exit__
      c_api.TF_GetCode(self.status.status))
  tensorflow.python.framework.errors_impl.NotFoundError: Resource localhost/false_negatives/class tensorflow::Var does not exist.
       [[{{node metrics/sensitivity_at_specificity/AssignAddVariableOp_1}}]]
       [[{{node metrics/sensitivity_at_specificity/Mean}}]]
  </code></pre>