deep-learning-with-python-notebooks
deep-learning-with-python-notebooks copied to clipboard
Chapter 12, part 5, GANs - Model cannot be saved because the input shapes have not been set.
Using the code on GANs, I'm unable to save the model in TF SavedModel format. Using TensorFlow 2.6.0 in a Kaggle notebook.
I get the following error:
ValueError: Model <__main__.GAN object at 0x7fa982c57810> cannot be saved because the input
shapes have not been set. Usually, input shapes are automatically determined from calling
`.fit()` or `.predict()`. To manually set the shapes, call `model.build(input_shape)`.
I have attempted to resolve this by calling model.build(input_shape)
after compilation and adding a call
method to the GAN subclass, but I'm still seeing the same issue.