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

If I want to train one epoch only, how to set lr? #27

Open
nissansz opened this issue Nov 6, 2024 · 3 comments
Open

If I want to train one epoch only, how to set lr? #27

nissansz opened this issue Nov 6, 2024 · 3 comments

Comments

@nissansz
Copy link

nissansz commented Nov 6, 2024

Optimizer:
name: AdamW
beta1: 0.9
beta2: 0.999
epsilon: 1.e-8
weight_decay: 0.05
no_weight_decay_name: norm
one_dim_param_no_weight_decay: True
lr:
name: Cosine
learning_rate: 0.001 # 8gpus 192bs
warmup_epoch: 5

@ir2718
Copy link
Contributor

ir2718 commented Nov 10, 2024

Hi,

can't you just achieve this by setting the lr in the config to your preferred value and removing the warmup_epoch?

Optimizer:
  name: AdamW
  beta1: 0.9
  beta2: 0.999
  epsilon: 1.e-8
  weight_decay: 0.05
  no_weight_decay_name: norm
  one_dim_param_no_weight_decay: True
  name: Cosine
  lr: 0.001 # 8gpus 192bs
  warmup_epoch: 0

@nissansz
Copy link
Author

if batch size = 4, what is suitable lr?

@ir2718
Copy link
Contributor

ir2718 commented Nov 12, 2024

@nissansz

There is no definitive answer to that question, as this depends on the model and dataset. A good start would be the learning rate the authors use in the original paper of the model. They're probably using a much bigger batch size than 4, so I would advise you to lower it.

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

No branches or pull requests

2 participants