title: get_config missing while loading previously saved model without custom layers
body: <p>I have a problem with loading the previously saved model.</p>
  
  <p>This is my save:</p>
  
  <pre><code>def build_rnn_lstm_model(tokenizer, layers):
      model = tf.keras.Sequential([
          tf.keras.layers.Embedding(len(tokenizer.word_index) + 1, layers,input_length=843),
          tf.keras.layers.Bidirectional(tf.keras.layers.LSTM(layers, kernel_regularizer=l2(0.01), recurrent_regularizer=l2(0.01), bias_regularizer=l2(0.01))),
          tf.keras.layers.Dense(layers, activation='relu', kernel_regularizer=l2(0.01), bias_regularizer=l2(0.01)),
          tf.keras.layers.Dense(layers/2, activation='relu', kernel_regularizer=l2(0.01), bias_regularizer=l2(0.01)),
          tf.keras.layers.Dense(1, activation='sigmoid')
      ])
      model.summary()
      model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy',f1,precision, recall])
      print("Layers: ", len(model.layers))
      return model
  
  model_path = str(Path(__file__).parents[2]) + os.path.sep + 'model'
  data_train_sequence, data_test_sequence, labels_train, labels_test, tokenizer = get_training_test_data_local()
  model = build_rnn_lstm_model(tokenizer, 32)
  model.fit(data_train_sequence, labels_train, epochs=num_epochs, validation_data=(data_test_sequence, labels_test))
  model.save(model_path + os.path.sep + 'auditor_model', save_format='tf')
  </code></pre>
  
  <p>After this I can see that <code>auditor_model</code> is saved in <code>model</code> directory.</p>
  
  <p>now I would like to load this model with:</p>
  
  <pre><code>model = tf.keras.models.load_model(model_path + os.path.sep + 'auditor_model')
  </code></pre>
  
  <p>but I get:</p>
  
  <blockquote>
    <p>ValueError: Unable to restore custom object of type _tf_keras_metric
    currently. Please make sure that the layer implements <code>get_config</code>and
    <code>from_config</code> when saving. In addition, please use the
    <code>custom_objects</code> arg when calling <code>load_model()</code>.</p>
  </blockquote>
  
  <p>I have read about <code>custom_objects</code> in <code>TensorFlow</code> docs but I don't understand how to implement it while I use no custom layers but the predefined ones.</p>
  
  <p>Could anyone give me a hint how to make it work? I use TensorFlow 2.2 and Python3</p>