-
Notifications
You must be signed in to change notification settings - Fork 55
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
Align ViT hyperparam #226
Align ViT hyperparam #226
Conversation
@@ -131,6 +131,9 @@ def _init_weights(self, m): | |||
nn.init.constant_(m.bias, 0) | |||
nn.init.constant_(m.weight, 1.0) | |||
|
|||
def no_weight_decay(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个部分我感觉可以不加也行
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以删了
这个PR等正确性验证完后再合并~,目前在CIFAR100下没有问题,在ImageNet下需要跑完整训练(已经在训练)
|
This comment was marked as duplicate.
This comment was marked as duplicate.
@@ -93,7 +93,7 @@ dataloader.test[0].dataset.root = "/path/to/imagenet" | |||
``` | |||
- To train `vit_tiny_patch16_224` model on ImageNet on a single node with 8 GPUs for 300 epochs, run: | |||
```bash | |||
bash tools/train.sh configs/vit_imagenet.py 8 | |||
bash tools/train.sh tools/train_net.py configs/vit_imagenet.py 8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix了文档部分的问题
@@ -1,5 +1,5 @@ | |||
from libai.config import LazyCall | |||
from .common.models.vit.vit_tiny_patch16_224 import model | |||
from .common.models.vit.vit_base_patch16_224 import model |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
替换默认模型为base,避免了tiny模型tensor并行无法执行的尴尬情况
这个是sphinx-rtd-theme这个主题不支持md语法的问题,我去查了下doc,他们支持的表格方式怪复杂,而且不支持写在markdown里。
后面我再仔细看下~ |
|
可以的,已经修改为这种形式了~ |
TODO
仔细校对了一下ViT的训练settings,对齐官方settings,并且重构了一下ViT的config,利用了一些可复用的参数,减少出错概率