METHOD.md
May 23, 2023 ยท View on GitHub
Method building instructions
To add new method, we suggest by adding a single your_method_name.py into this directory. In your_method_name.py, one should implement a class inherited from the SourceOnly in source_only.py. There are some important notes for implementing your method class:
-
You need to name your model backbone as
self.backbonein the init step of your method. Because we use such name to assign a different learning rate to backbone from other modules. -
Care to set
self.feature_dimwhen different backbones may have different attribute name. -
You should explicitly to set
require_sourceorrequire_targetto beTrueorFalsein the init step of your method. Doing so could also speed up the training process if your method do not need to use source or target data.
After including your your_method_name.py, add a new mehtod in the __init__.py for loading it.