You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clone this repo and install required packages. You can install [apex-amp](https://github.com/NVIDIA/apex) if you want to use fp16 with Pytorch<=1.6.0.
18
18
```
19
19
git clone https://github.com/Westlake-AI/MogaNet
20
-
pip install timm tensorboardX six
20
+
pip install timm fvcore
21
21
```
22
22
23
-
The results in the paper are produced with `torch==1.10.0+cu111 torchvision==0.11.0+cu111 timm==0.6.12`.
23
+
The results in this repository are produced with `torch==1.10.0+cu111 torchvision==0.11.0+cu111 timm==0.6.12`, and we adopt amp fp16 for fast training.
24
24
25
25
## Dataset Preparation
26
26
27
-
Download the [ImageNet-1K](http://image-net.org/) classification dataset and structure the data as follows:
27
+
Download the [ImageNet-1K](http://image-net.org/) classification dataset ([train](https://image-net.org/data/ILSVRC/2012/ILSVRC2012_img_train.tar)and [val](https://image-net.org/data/ILSVRC/2012/ILSVRC2012_img_val.tar)) and structure the data as follows. You can extract ImageNet with this [script](https://gist.github.com/BIGBALLON/8a71d225eff18d88e469e6ea9b39cef4).
Copy file name to clipboardExpand all lines: README.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,6 @@ We propose **MogaNet**, a new family of efficient ConvNets, to pursue informativ
44
44
We plan to release implementations of MogaNet in a few months. Please watch us for the latest release. Currently, this repo is reimplemented according to our official implementations in [OpenMixup](https://github.com/Westlake-AI/openmixup/), and we are working on cleaning up experimental results and code implementations.
45
45
46
46
-[x] ImageNet-1K Training Code
47
-
-[ ] ImageNet-1K Fine-tuning Code
48
47
-[ ] Downstream Transfer to Object Detection and Instance Segmentation on COCO
49
48
-[ ] Downstream Transfer to Semantic Segmentation on ADE20K
50
49
-[ ] Image Classification on Google Colab and Web Demo
@@ -57,7 +56,7 @@ Please check [INSTALL.md](INSTALL.md) for installation instructions.
57
56
58
57
## Training
59
58
60
-
See [TRAINING.md](TRAINING.md) for ImageNet-1K training instructions, or refer to our [OpenMixup](https://github.com/Westlake-AI/openmixup/tree/main/configs/classification/imagenet/moganet/) implementations. We have released pre-trained models on [OpenMixup](https://github.com/Westlake-AI/openmixup/tree/main/configs/classification/imagenet/moganet/) in [moganet-in1k-weights](https://github.com/Westlake-AI/openmixup/releases/tag/moganet-in1k-weights).
59
+
See [TRAINING.md](TRAINING.md) for ImageNet-1K training instructions, or refer to our [OpenMixup](https://github.com/Westlake-AI/openmixup/tree/main/configs/classification/imagenet/moganet/) implementations. We released pre-trained models on [OpenMixup](https://github.com/Westlake-AI/openmixup/tree/main/configs/classification/imagenet/moganet/) in [moganet-in1k-weights](https://github.com/Westlake-AI/openmixup/releases/tag/moganet-in1k-weights). We have also reproduced ImageNet results with this repo and released `args.yaml` / `summary.csv` / `model.pth.tar`.
- Here, the effective batch size = `--nproc_per_node` * `--batch_size` * `--update_freq`. In the example above, the effective batch size is `8*128*1 = 1024`. Running on one machine, we can increase `update_freq` and reduce`--batch_size` to avoid OOM issues while keeping the total batch size unchanged.
18
+
- Here, the effective batch size = `--nproc_per_node` * `--batch_size`. In the example above, the effective batch size is `8*128 = 1024`. Running on one machine, we can reduce `--batch_size` and use`--amp` to avoid OOM issues while keeping the total batch size unchanged.
19
19
20
20
To train other MogaNet variants, `--model` and `--drop_path` need to be changed. Examples with single-machine commands are given below:
21
21
@@ -27,12 +27,13 @@ MogaNet-XT
27
27
Single-machine (8GPUs) with the input size of 224:
0 commit comments