title: "ValueError: Unknown activation: Activation" while trying to load a model with custom objects
body: <p>I am trying to load a model with two custom objects and am getting this error in the title.</p>
  
  <p>This is where i import/define my functions, and where i allow keras to reference them by name.</p>
  
  <pre><code>from tensorflow.keras.utils import get_custom_objects
  from tensorflow.python.keras.layers import LeakyReLU
  from tensorflow.keras.layers import Activation
  from tensorflow.keras.backend import sigmoid
  
  
  def swish(x, beta=1):
      return x * sigmoid(beta * x)
  
  
  get_custom_objects().update({'swish': Activation(swish)})
  get_custom_objects().update({'lrelu': LeakyReLU()})
  </code></pre>
  
  <p>I load the model with this part</p>
  
  <pre><code>from tensorflow.keras.models import load_model
  model = load_model('model.h5', custom_objects={'swish': Activation(swish), 'lrelu': LeakyReLU()}, compile=False)
  </code></pre>
  
  <p>I get the error below:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\Ben\PycharmProjects\untitled\trainer.py", line 102, in load_items
      model = load_model(data_loc + 'model.h5', custom_objects={'swish': Activation(swish), 'lrelu': LeakyReLU()}, compile=False)
    File "C:\Users\Ben\PycharmProjects\untitled\venv\lib\site-packages\tensorflow_core\python\keras\saving\save.py", line 146, in load_model
      return hdf5_format.load_model_from_hdf5(filepath, custom_objects, compile)
    File "C:\Users\Ben\PycharmProjects\untitled\venv\lib\site-packages\tensorflow_core\python\keras\saving\hdf5_format.py", line 168, in load_model_from_hdf5
      custom_objects=custom_objects)
    File "C:\Users\Ben\PycharmProjects\untitled\venv\lib\site-packages\tensorflow_core\python\keras\saving\model_config.py", line 55, in model_from_config
      return deserialize(config, custom_objects=custom_objects)
    File "C:\Users\Ben\PycharmProjects\untitled\venv\lib\site-packages\tensorflow_core\python\keras\layers\serialization.py", line 102, in deserialize
      printable_module_name='layer')
    File "C:\Users\Ben\PycharmProjects\untitled\venv\lib\site-packages\tensorflow_core\python\keras\utils\generic_utils.py", line 191, in deserialize_keras_object
      list(custom_objects.items())))
    File "C:\Users\Ben\PycharmProjects\untitled\venv\lib\site-packages\tensorflow_core\python\keras\engine\sequential.py", line 369, in from_config
      custom_objects=custom_objects)
    File "C:\Users\Ben\PycharmProjects\untitled\venv\lib\site-packages\tensorflow_core\python\keras\layers\serialization.py", line 102, in deserialize
      printable_module_name='layer')
    File "C:\Users\Ben\PycharmProjects\untitled\venv\lib\site-packages\tensorflow_core\python\keras\utils\generic_utils.py", line 193, in deserialize_keras_object
      return cls.from_config(cls_config)
    File "C:\Users\Ben\PycharmProjects\untitled\venv\lib\site-packages\tensorflow_core\python\keras\engine\base_layer.py", line 594, in from_config
      return cls(**config)
    File "C:\Users\Ben\PycharmProjects\untitled\venv\lib\site-packages\tensorflow_core\python\keras\layers\core.py", line 361, in __init__
      self.activation = activations.get(activation)
    File "C:\Users\Ben\PycharmProjects\untitled\venv\lib\site-packages\tensorflow_core\python\keras\activations.py", line 321, in get
      identifier, printable_module_name='activation')
    File "C:\Users\Ben\PycharmProjects\untitled\venv\lib\site-packages\tensorflow_core\python\keras\utils\generic_utils.py", line 180, in deserialize_keras_object
      config, module_objects, custom_objects, printable_module_name)
    File "C:\Users\Ben\PycharmProjects\untitled\venv\lib\site-packages\tensorflow_core\python\keras\utils\generic_utils.py", line 165, in class_and_config_for_serialized_keras_object
      raise ValueError('Unknown ' + printable_module_name + ': ' + class_name)
  ValueError: Unknown activation: Activation
  </code></pre>
  
  <p>Also might be worth noting that i am trying to save and load the model in different projects with different environments. Both are using tf 2.0.0 gpu. The imports should all be the same.</p>