Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RepLKNet_B.yml and replknet.py #2786

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

Asia-Leee
Copy link

No description provided.

@paddle-bot
Copy link

paddle-bot bot commented May 9, 2023

Thanks for your contribution!

@CLAassistant
Copy link

CLAassistant commented May 9, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@TingquanGao TingquanGao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

许多训练超参数没有对齐,建议参考下paddleclas中其他模型的配置,如DeiT、TinyNet等。下面这几个是比较明显的问题,建议再确认对齐一下配置:

  1. 涉及到resize的地方一般需要设置backend为pil;
  2. batch_size也没有对齐;
  3. 使用TimmAutoAugment替换randaugment;
  4. 官方似乎用了color jitter;

color_jitter 在源码中不触发 由于使用了autoaugment
@Asia-Leee
Copy link
Author

许多训练超参数没有对齐,建议参考下paddleclas中其他模型的配置,如DeiT、TinyNet等。下面这几个是比较明显的问题,建议再确认对齐一下配置:

  1. 涉及到resize的地方一般需要设置backend为pil;
  2. batch_size也没有对齐;
  3. 使用TimmAutoAugment替换randaugment;
  4. 官方似乎用了color jitter;

已经修改数据预处理部分的参数对齐 . batch_size设置为128, update频率设置为8, 总的bs为 12888
源码中没有触发color jitter 由于使用了auto_augment

Copy link
Collaborator

@TingquanGao TingquanGao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

提交pr的yaml文件中的注释都删掉吧

- CenterCrop: #修改
size: 224
- NormalizeImage:
scale: 1.0/255.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的格式不对

order: ''
sampler:
name: DistributedBatchSampler
batch_size: 128
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

确认是128吗?我看似乎是64?

python -m torch.distributed.launch --nproc_per_node=8 main.py --model RepLKNet-31B --drop_path 0.5 --batch_size 64 --lr 4e-3 --update_freq 4 --model_ema true --model_ema_eval true --data_path /path/to/imagenet-1k --warmup_epochs 10 --epochs 300 --output_dir your_training_dir

https://github.com/DingXiaoH/RepLKNet-pytorch#pretrain-replknet-31b-on-imagenet-1k

# used for static mode and model export
image_shape: [3, 224, 224]
save_inference_dir: ./inference
update_freq: 8 #修改
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我看好像是4?

python -m torch.distributed.launch --nproc_per_node=8 main.py --model RepLKNet-31B --drop_path 0.5 --batch_size 64 --lr 4e-3 --update_freq 4 --model_ema true --model_ema_eval true --data_path /path/to/imagenet-1k --warmup_epochs 10 --epochs 300 --output_dir your_training_dir

delete the blank space
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants