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

Why is same optimizer is used for both model and classifier ? #26

Open
mayank64ce opened this issue Mar 13, 2024 · 0 comments
Open

Why is same optimizer is used for both model and classifier ? #26

mayank64ce opened this issue Mar 13, 2024 · 0 comments

Comments

@mayank64ce
Copy link

In main.py why is the optimizer used this way and not separate optimizers for the model and classifier ?

    parameters = list(model.parameters()) + list(classifier.parameters())
    if config.TRAIN.OPTIMIZER.NAME == 'adam':
        optimizer = optim.Adam(parameters, lr=config.TRAIN.OPTIMIZER.LR,
                               weight_decay=config.TRAIN.OPTIMIZER.WEIGHT_DECAY)
        optimizer_cc = optim.Adam(clothes_classifier.parameters(), lr=config.TRAIN.OPTIMIZER.LR,
                                  weight_decay=config.TRAIN.OPTIMIZER.WEIGHT_DECAY)
@mayank64ce mayank64ce changed the title Why is the optimizer used this way ? Why is same optimizer is used for both model and classifier ? Mar 13, 2024
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

1 participant