but unable to convert the model with older tensor for submission.
Load the model you saved earlier
model = tf.keras.models.load_model(âtemp_model.h5â, compile=False)
Save the model with the compatible TF version
model.save(âfinal_model.h5â)
ValueError Traceback (most recent call last)
in <cell line: 2>()
1 # Load the model you saved earlier
----> 2 model = tf.keras.models.load_model(âtemp_model.h5â, compile=False)
3
4 # Save the model with the compatible TF version
5 model.save(âfinal_model.h5â)
1 frames
/usr/local/lib/python3.10/dist-packages/keras/engine/input_layer.py in init(self, input_shape, batch_size, dtype, input_tensor, sparse, name, ragged, type_spec, **kwargs)
134 input_shape = batch_input_shape[1:]
135 if kwargs:
â 136 raise ValueError(fâUnrecognized keyword arguments: {list(kwargs.keys())}')
137
138 if sparse and ragged:
Note that the assignments are intended to run with the platform that Coursera provides. If you want to use a different version of the tools, you will encounter compatibility issues.
can you send me DM on how you recalled your input_shape?
Donât post codes here.
Also, I hope you have run down all the cells till end which gives you on instruction about tf.version issue which when run down as per instructions solves the issue.
That should work with the GPU available on Colab so you can train fast. You should run all the cells again until you generate a new model file.
Then you will need to downgrade to v2.8 (code is already in the notebook) in the last few cells for grader compatibility. This lower version is not compatible with Colabâs GPU so you will only use it for grading.
Weâll update the notebook and request updates to the grader, but hope this will suffice for now so you can get your grade asap. Thank you and sorry for the inconvenience!