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 VisionTransformer model and training cfg #74

Merged
merged 27 commits into from
Jan 27, 2022
Merged

Conversation

rentainhe
Copy link
Contributor

@rentainhe rentainhe commented Jan 25, 2022

TODO

  • VisionTransformer CIFAR100 Training
  • Fix Dataloader Bugs
  • Rebuild ViT Config

@@ -0,0 +1,20 @@
from libai.config import LazyCall
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个文件名要不改成 vit,更简单一点

Copy link
Contributor Author

Choose a reason for hiding this comment

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

我一开始是感觉太简单了所以才改成这个2333

optim.weight_decay = 0.05

# Set pipeline layers for paralleleism
train.dist.pipeline_num_layers = model.cfg.depth
Copy link
Collaborator

Choose a reason for hiding this comment

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

这一行可以先暂时删掉

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK,我update一下

@@ -63,6 +63,8 @@ def default_argument_parser(epilog=None):
"See documentation of `DefaultTrainer.resume_or_load()` for what it means.",
)
parser.add_argument("--eval-only", action="store_true", help="perform evaluation only")
# TODO: Add fast debug mode
parser.add_argument("--fast_debug", action="store_true", help="quickly debug")
Copy link
Collaborator

Choose a reason for hiding this comment

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

像上面那样,写成 --fast-debug

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好,我修复一下

@@ -0,0 +1,16 @@
#!/usr/bin/env bash
Copy link
Collaborator

Choose a reason for hiding this comment

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

应该不需要写这个文件,可以统一用 tools/train.sh

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好,我试一下

@rentainhe rentainhe mentioned this pull request Jan 27, 2022
8 tasks
@rentainhe rentainhe changed the title Dev vit train Add VisionTransformer model and training cfg Jan 27, 2022
@L1aoXingyu L1aoXingyu enabled auto-merge (squash) January 27, 2022 09:13
@L1aoXingyu L1aoXingyu merged commit 4df9f83 into main Jan 27, 2022
@L1aoXingyu L1aoXingyu deleted the dev_vit_train branch January 27, 2022 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants