tensorflow: Calling tf.keras.models.load_model / model.save twice fails
Please see CoLab or Github Gist to see live demo.
Steps to reproduce:
- Create model,compile and fit
- Save model
- Load model and fit
- Save model
- Load model
Get error: ValueError: Passing a dictionary input to a Sequential Model which doesn't have FeatureLayer as the first layer is an error.
Expected: Model that was loaded and saved again should be loaded without error.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 20 (10 by maintainers)
I’m trying it with today’s (apr 1st 2020) nightly build. Still seeing this issue.
Can confirm this reproduces in TF2.0 on macOS, and that the second fit call isn’t necessary to reproduce, i.e. save->load->save->load breaks.
I can verify that I have the same issue using a model with DenseFeatures with feature_columns.