Open sachinkmohan opened 2 years ago
Hi @sachinkmohan ,
so the problem you describe requires a little larger fix, which I due to a lack of time will not be able to fix in the near term. What I can advise you is that you simply try to set save_weights_only=True. This will allow you to reload the weights without any problems (at least it did when I have tested it).
Thanks for the response! @JanMarcelKezmann Appreciate it! Will check this another time.
ave_weights_only=True
Hi, I am having similar issue but with saving of the weights. Just had to redo anaconda setup and reinstall tensorflow.
model.save(os.path.join(new_folder, 'model_weights.h5'))
I am now getting this:
C:\Users\Master\anaconda3\envs\gputensorflow\lib\site-packages\tensorflow\python\keras\utils\generic_utils.py:494: CustomMaskWarning: Custom mask layers require a config and must override get_config. When loading, the custom mask layer must be passed to the custom_objects argument. warnings.warn('Custom mask layers require a config and must override '
Python 3.10.7 (tags/v3.10.7:6cc6b13, Sep 5 2022, 14:08:36) [MSC v.1933 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.
import tensorflow as tf print(tf.version.VERSION) 2.10.0 exit
Appreciate your insight what must i do next?
I had uncommented the checkpoint and tried to save the model. It generated
saved_model.pb
file. Below are the warning messages when the model was saved.Now when loading the model, I am getting the following error.
model = tf.keras.models.load_model('/home/mohan/git/TensorFlow-Advanced-Segmentation-Models/examples/DeepLabV3plus1.ckpt/')
I am not sure how to load the custom objects though. Please help.