Open sineeli opened 8 months ago
Similar issue with the Optimizer
was resolved in the latest Keras version here https://github.com/keras-team/keras/issues/19321
Could you try rerunning with !pip install keras-nightly
and !pip install tf-nightly
to make sure this is still reproducible after #19321?
Could you try rerunning with
!pip install keras-nightly
and!pip install tf-nightly
to make sure this is still reproducible after #19321?
The fix in #1932 is for optimizer, which is already got fixed and present in recent release if I am not wrong. The issue above is with checkpointing other extra modules. The errors seems to persist even after nightly installation. Here is the gist.
Thanks
The error message says:
ValueError:
Checkpoint
was expecting detection_head to be a trackable object (an object derived fromTrackable
), got []
What is the type of DetectionHead
here? Is it a Keras layer? All Keras layers are Trackables. Is the issue that it is wrapped in a list?
Could this be an issue with the Model Garden package?
From code base I can see that Mask-RCNN model expecting detection head as tf.keras.layer.Layer
or List[tf.keras.layers.Layer]
, so we cannot track list of heads.
DetectionHead
is wrapped around a list
while building the Mask-RCNN Model. So passing with or without List results in list wrapped keras layer.
I have checked same with Keras2(tf-keras) version it seems to be working in that version: gist
So to overcome this issue, is there way that I can change from Model Garden side to make them trackable.
Thanks
So to overcome this issue, is there way that I can change from Model Garden side to make them trackable.
You could fork the Model Garden repo and open a PR?
I apologize for any confusion in my previous message. I'm currently refactoring the code within the model garden itself to be compatible with Keras3.
My question is: when checkpointing a Keras model, is there a way to keep track of list of Keras layers in Keras3 without going into above error? As the same works in Keras 2
List of heads(layers) are getting used for cascade r-cnn model.
Hope this clairfies.
Thanks
Model Garden checkpoints decoders, detection and mask head as part of the checkpoint. I have seen the same issue with
optimizer
and it seems it has been resolved in release. Is there way that we can include these in tf.train.Checkpoint.Error: