TensorFlow object detection api: classification weights initialization when changing number of classes at training using pre-trained models

后端 未结 1 2036
南笙
南笙 2021-01-16 14:42

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

相关标签:
1条回答
  • 2021-01-16 14:47

    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

    0 讨论(0)
提交回复
热议问题