tensorflow / tensorflow/models
Unable to freeze weights in object detection model
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.7k
- Forks
- 44.8k
- PR merge metrics
- No merged PRs in 30d
Description
With reference to #2203 , I am trying to perform object detection with the ssd mobienet model and I am trying to freeze the weights.
Upon printing the layers with print(detection_models.trainable_variables) I get

Without freezing,
I get 232 trainable weights and 152 non trainable weights.
len(detection_model.trainable_weights), len(detection_model.non_trainable_weights)
I am trying to add the
freeze_variables: ".* ssd_mobile_net_v2fpn_keras_feature_extractor.* " and change the freeze_batchnorm parameter to true
tinthe train_config and then print the number of trainable weights.
I get the same values of 232 trainable weights and 152 non trainable weights.
len(detection_model.trainable_weights), len(detection_model.non_trainable_weights)
How can I check if the layer is actually frozen?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.