This repository has been archived by the owner on Nov 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 907
ValueError: Unable to create group (name already exists)` when saving MobilenetV3 model to .h5 #191
Comments
Have debugged further
Appears that it doesn't like the layer name "depthwise/pad" before the parent group "depthwise" keras-applications/keras_applications/mobilenet_v3.py Lines 161 to 162 in bc89834
Guess that's something to do the h5 heirarchical data structure. Renaming depthwise layer here keras-applications/keras_applications/mobilenet_v3.py Lines 163 to 167 in bc89834
Might be 2 separate issues here. |
Again, the above debug was using tensorflow keras, had assumed that keras was silently failing but since fixing the layer naming the problem still persists with same symptoms as kera. Will use keras for further debugging. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Summary
Created an instance of MobileNetV3Small, attempted to save model with weights to .h5 file and after loading back again the model gives a different output or with tensorflow.keras fails with error.
Issue not present with save_format="tf" / SavedModel
In tensorflow.keras this gave error of:
ValueError: Unable to create group (Name already exists)
After reading about this error it leads me to believe there is an issue with h5 file format and layers with the same name. I tried the same code but with mobilenet_v2 and there is no problem, so my conclusion is that the mobilenetv3 implementation is using duplicated layer names somewhere.
Environment
Logs or source codes for reproduction
Code :
When using tensorflow.keras
When using keras ( It fails silently and simply outputs incorrect values )
Notice 0.98741907 != 0.917123
The text was updated successfully, but these errors were encountered: