title: `TypeError: get_config() missing 1 required positional argument: 'self'` while trying to save the model in Tensorflow
body: <p>Please help me with the following. I can't seem to save my model. As you can see I do reference the instance of the <code>Sequential()</code> method</p>
  
  <pre class="lang-py prettyprint-override"><code>model = tf.keras.models.Sequential()
  model.add(tf.keras.layers.InputLayer(input_shape=[timePortion,1 ]))
  model.add(tf.keras.layers.Conv1D(kernel_size=timePortion,
                                   filters=1000, 
                                   strides=1,
                                   use_bias=False,
                                   activation="relu",
                                   kernel_initializer=tf.keras.initializers.VarianceScaling))
  model.summary()
  model.add(tf.keras.layers.Dropout(rate=0.2))
  model.add(tf.keras.layers.Flatten())
  model.add(tf.keras.layers.Dense(32,
                                  activation='relu', 
                                  kernel_initializer=tf.keras.initializers.VarianceScaling))
  model.add(tf.keras.layers.Dense(8,
                                  activation='relu', 
                                  kernel_initializer=tf.keras.initializers.VarianceScaling))
  model.add(tf.keras.layers.Dense(1, 
                                  kernel_initializer=tf.keras.initializers.VarianceScaling))
  model.summary()
  model.compile(optimizer=tf.keras.optimizers.Adam(lr=0.001),
                loss="mean_squared_error", 
                metrics=["accuracy","mae"])
  filepath = "model.h5"
  model.fit(inputs,
            labels,
            steps_per_epoch=1,
            epochs=2,
            shuffle=False, 
            verbose=1)
  tf.keras.models.save_model(model,
                             filepath, 
                             overwrite=True,
                             include_optimizer=True)
  
  </code></pre>
  
  <p>I'm having problems saving my model in a Jupyter notebook. The file actually gets created but then I get this error. It's weird cause I am referencing the model instance.</p>
  
  <pre><code>TypeError: get_config() missing 1 required positional argument: 'self'
  </code></pre>