Skip to content Skip to sidebar Skip to footer

Tensorflow Object Detection Api: Classification Weights Initialization When Changing Number Of Classes At Training Using Pre-trained Models

I want to utilize not only the feature-extractor pre-trained weights but also the feature-map layers' classifier/localization pre-trained weights for fine-tuning tensorflow object

Solution 1:

As I read through the code I found the responsible code, which only retains the pre-trained model's weights if the shape of the layers between the newly-defined model and the pre-trained model match. So if I change the number of the class, the shape of the classifier layers change, and the pre-trained weights are not retained.

https://github.com/tensorflow/models/blob/master/research/object_detection/utils/variables_helper.py#L133

Post a Comment for "Tensorflow Object Detection Api: Classification Weights Initialization When Changing Number Of Classes At Training Using Pre-trained Models"