Errors on saving keras model

Hi, I am trying the keras depth estimator model:
https://keras.io/examples/vision/depth_estimation/
Everything looks good until saving the model:

Epoch 100/100 160/160 [==============================] - 11s 69ms/step - loss: 0.0446 - val_loss: 0.0439

<keras.callbacks.History at 0x7f4200019810>

path_model = “/content/drive/MyDrive/depth-estimator”

model.save(path_model)

WARNING:absl:Found untraced functions such as conv2d_160_layer_call_fn, conv2d_160_layer_call_and_return_conditional_losses, conv2d_161_layer_call_fn, conv2d_161_layer_call_and_return_conditional_losses, leaky_re_lu_152_layer_call_fn while saving (showing 5 of 200). These functions will not be directly callable after loading.
INFO:tensorflow:Assets written to: /content/drive/MyDrive/depth-estimator/assets
INFO:tensorflow:Assets written to: /content/drive/MyDrive/depth-estimator/assets

TypeError Traceback (most recent call last)
in ()
1 path_model = “/content/drive/MyDrive/depth-estimator”
----> 2 model.save(path_model)

1 frames
/usr/local/lib/python3.7/dist-packages/keras/utils/generic_utils.py in serialize_keras_object(instance)
503 name = get_registered_name(instance.class)
504 try:
→ 505 config = instance.get_config()
506 except NotImplementedError as e:
507 if _SKIP_FAILED_SERIALIZATION:

TypeError: get_config() missing 1 required positional argument: ‘self’

The original code set up a model based on keras, I wonder if there should be more implementations on certain methods before saving?

Please help, many thanks!

I was unable to replicate your issue using Tensorflow 2.8.2 on Colab. Please share the gist to debug your issue. Thank you