How to contribute to this repository?
Feel free to contribute classifiers, backbones, functions and any enhancements.
Add a method/feature or fix a bug
We recommend using the following guidelines:
fork the
main
branch of the latestLibFewShot
;checkout a new branch,whose name should reflects the content intuitively, like
add-method-ProtoNet
offix-doc-contribution
;add a new method/feature or fix a bug;
check and commit;
create a pull request.
Note that if you add a new method, you need:
test if the method works properly;
provide a config file of this new method, and the corresponding 5-way 1-shot and 5-way 5-shot accuracy on the miniImageNet dataset.
Also, it will be better if you can provide:
the 5-way 1-shot and 5-way 5-shot accuracy on other datasets (like tieredImageNet);
model_best.pth
of each setting on each dataset.
We will thank you for your contributions in README
or other prominent places.
Use pre-commit
to check code
Before committing the code, you may need to make sure that your code could pass black and flake test. We use pre-commit to do test and automatic code revision:
first, install pre-commit;
cd <path-to-LibFewShot>
pip install pre-commit
run
pre-commit install
;run
pre-commit run --all-files;
modify the code by the warning gived by pre-commit.
Pull request style
The title of your PR should like followings:
[Method] XXXX XXXX
# OR
[Feature] XXXX XXXX
# OR
[FIX] XXXX XXXX
The body of your PR should describe the main content of this PR in EN OR CN.