tensorflow / tensorflow/models
Fine-tuning in model_main_tf2.py
@laxmareddyp is already working on this.
Since Nov 2, 2022.
- Dominant language
- Python
- Stars
- 77.7k
- Forks
- 44.8k
- PR merge metrics
- No merged PRs in 30d
Description
Prerequisites
Please answer the following question for yourself before submitting an issue.
- I checked to make sure that this issue has not been filed already.
1. The entire URL of the documentation with the issue
https://github.com/tensorflow/models/tree/master/research/object_detection
2. Describe the issue
I have been looking around the source code, but I can't find how the actual fine-tuning is done. I know there is an option to train from a "detection" and from a "classification" checkpoint and I understand that this involves loading the weights from a previous checkpoint. But when it comes to training what layers are actually trained? Do you do transfer learning or do pertaining on the entire architecture?
I looked at the tutorials: https://github.com/tensorflow/models/blob/master/research/object_detection/colab_tutorials/inference_from_saved_model_tf2_colab.ipynb and I understand that here you are fine-tuning only the final 6 layers from the classification and regression heads and that makes sense, but when you train using the model_main_tf2.py file I can't find how the trainable_variables are selected.
There doesn't seem to be a selection class or function in the project. Can you customize in the model_main_tf2.py the layers that you want to fine-tune?
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.