PaddleOCR
PaddleOCR copied to clipboard
Transfer Learning with Paddle?
Is there a way to do transfer learning with Paddle? I have a smallish dataset ( ~1000-10000 images) with only 10-15 possible answers. I'd like to do a version of transfer learning on PP-OCRv3 so it learns that only one of these 10-15 answers is possible.
Is there a way to freeze part of the network to do that?
Or maybe freeze layers of the backbone at least somehow?
currently paddleocr does not support freezing backbone, but you can fix the code mannually, such as here.
https://github.com/PaddlePaddle/PaddleOCR/blob/558b2a719efc8761539649ed676ff405401a90a7/ppocr/modeling/architectures/distillation_model.py#L50
@littletomatodonkey , thanks for the tip. In my case I'm thinking to do transfer learning on PP-OCRV3. So I'm thinking to freeze the backbone of PP-OCRv3, MobileNetV1Enhance.
Would something like this here the net?
for param in self.conv1.parameters():
param.trainable = False
for param in self.block_list.parameters():
param.trainable = False
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.