title: NotImplementedError: numpy() is only available when eager execution is enabled
body: <p>I have these problem when I try to save my model. Besides, I am using Tensorflow 2.0.0 and numpy 1.6.0, so I don't know how to solve the problem because in the latest versions of tensorflow, the eager execution is enabled by default.</p>
  
  <pre><code>Compilamos
  Entrenamos
  Train on 946 samples, validate on 237 samples
  Epoch 1/2
  946/946 [==============================] - 5s 5ms/step - loss: 0.6866 - accuracy: 0.5719 - val_loss: 0.6897 - val_accuracy: 0.5316
  Epoch 2/2
  946/946 [==============================] - 5s 5ms/step - loss: 0.6782 - accuracy: 0.5729 - val_loss: 0.6862 - val_accuracy: 0.5316
  Entrenamiento finalizado
  Traceback (most recent call last):
  
    File "&lt;ipython-input-23-35267c139307&gt;", line 1, in &lt;module&gt;
      runfile('C:/Users/Narcis Teodoroiu/Desktop/Version MASK R-CNN/TILErecognitionYcant.py', wdir='C:/Users/Narcis Teodoroiu/Desktop/Version MASK R-CNN')
  
    File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
      execfile(filename, namespace)
  
    File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
      exec(compile(f.read(), filename, 'exec'), namespace)
  
    File "C:/Users/Narcis Teodoroiu/Desktop/Version MASK R-CNN/TILErecognitionYcant.py", line 332, in &lt;module&gt;
      model.save('tile_cnn_model.h5')
  
    File "C:\ProgramData\Anaconda3\lib\site-packages\keras\engine\network.py", line 1152, in save
      save_model(self, filepath, overwrite, include_optimizer)
  
    File "C:\ProgramData\Anaconda3\lib\site-packages\keras\engine\saving.py", line 449, in save_wrapper
      save_function(obj, filepath, overwrite, *args, **kwargs)
  
    File "C:\ProgramData\Anaconda3\lib\site-packages\keras\engine\saving.py", line 541, in save_model
      _serialize_model(model, h5dict, include_optimizer)
  
    File "C:\ProgramData\Anaconda3\lib\site-packages\keras\engine\saving.py", line 179, in _serialize_model
      'config': model.optimizer.get_config()
  
    File "C:\ProgramData\Anaconda3\lib\site-packages\keras\optimizers.py", line 557, in get_config
      config = {'learning_rate': float(K.get_value(self.learning_rate)),
  
    File "C:\ProgramData\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py", line 2927, in get_value
      return x.numpy()
  
    File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\ops\resource_variable_ops.py", line 579, in numpy
      "numpy() is only available when eager execution is enabled.")
  
  NotImplementedError: numpy() is only available when eager execution is enabled.
  </code></pre>