title: How to revert keras sequential model to a state previous to build?
body: <p>I want to reuse the same model architecture but with different datasets, that is, to programmatically change the input layer to a different shape, and reset model parameters if needed.</p>
  <p>Something along the lines of</p>
  <pre><code>model = tf.keras.Sequential(
             tf.keras.layers.Dense(2)
  )
  
  optimizer = tf.optimizers.Adam()
  
  losses=[tf.keras.losses.mean_absolute_percentage_error]
  
  model.compile(optimizer=optimizer, loss=losses)
  
  model.build(input_shape=(None,2))
  # ... train model and evaluate
  
  model.unbuild() # this doesn't exist
  model.build(input_shape=(None,3))
  # ... train model and evaluate on different dataset
  </code></pre>
  <p>Anyone knows a clean way to perform this?</p>