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

[REQUEST] GAN: Different learning rates and schedulers in one config for multiple .initialize() calls possible? #1975

Open
fteufel opened this issue May 24, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@fteufel
Copy link

fteufel commented May 24, 2022

Hi, I'm using deepspeed to train a model that has a discriminator. I'm following the official GAN tutorial mostly (https://www.deepspeed.ai/tutorials/gan/)

Essentially I set up the model like this

model_engine, optimizer, _, _ = deepspeed.initialize(args=args, model = model, model_parameters=model.parameters(), optimizer=optimizer)
model_engine_adversary, optimizer_adversary, _, _ = deepspeed.initialize(args=args, model = adversarial_head, model_parameters=adversarial_head.parameters(), optimizer=optimizer_adversary)

And then start it with

deepspeed train.py  --deepspeed_config deepspeed_config.json

If I specify a scheduler in the json config as done in all tutorials, it applies to both model engines. Is there a way to specify two separate ones?

@fteufel fteufel added the enhancement New feature or request label May 24, 2022
@tjruwase
Copy link
Contributor

You can pass a dict using the config argument to deepspeed.initialize() just like here. This way you can pass separate dicts to the engines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants