Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
cfreshgirl 1168272717 | 1 year ago | |
---|---|---|
ascend310_infer | 7 months ago | |
ckpt | 7 months ago | |
moco | 7 months ago | |
scripts | 7 months ago | |
.gitignore | 7 months ago | |
README.md | 7 months ago | |
README_CN.md | 7 months ago | |
async_dump.json | 7 months ago | |
data_to_bin.py | 7 months ago | |
eval.py | 7 months ago | |
export.py | 7 months ago | |
img.png | 7 months ago | |
main_lincls.py | 7 months ago | |
main_moco.py | 7 months ago | |
openi.py | 7 months ago | |
postprocess.py | 7 months ago | |
preprocess.py | 7 months ago |
This is a unofficial MindSpore implementation of the MoCo paper:
@Article{he2019moco,
author = {Kaiming He and Haoqi Fan and Yuxin Wu and Saining Xie and Ross Girshick},
title = {Momentum Contrast for Unsupervised Visual Representation Learning},
journal = {arXiv preprint arXiv:1911.05722},
year = {2019},
}
It also includes the implementation of the MoCo v2 paper:
@Article{chen2020mocov2,
author = {Xinlei Chen and Haoqi Fan and Ross Girshick and Kaiming He},
title = {Improved Baselines with Momentum Contrastive Learning},
journal = {arXiv preprint arXiv:2003.04297},
year = {2020},
}
This implementation supports multi-gpu(or npu), Data Parallel Mode training, which is faster and simpler; single-gpu(or npu) training is also supported for debugging.
To do unsupervised pre-training of a ResNet-50 model on ImageNet, run:
# 8P
python launch_moco.py --data /path/to/IN1K --output-dir ./output/moco
# 1P
python main_moco.py --data /path/to/IN1K --output-dir ./output/moco --distributed=False
This script uses all the default hyper-parameters as described in the MoCo v1 paper. To run MoCo v2, set --mlp --moco-t 0.2 --aug-plus --cos
.
Note: for 4-gpu training, we recommend following the linear lr scaling recipe: --lr 0.015 --batch-size 128
with 4 gpus. We got similar results using this setting.
With a pre-trained model, to train a supervised linear classifier on frozen features/weights, run:
# 8P
python launch_lincls.py --data /path/to/IN1K --output-dir ./output/lincls --pretrained ./output/moco/net.ckpt
# 1P
python main_lincls.py --data /path/to/IN1K --output-dir ./output/lincls --pretrained ./output/moco/net.ckpt --distributed=False
No Description
Python C++ Markdown Shell Text
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》