deepspeedai / deepspeedai/DeepSpeed
Problem when training CycleGAN
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 43.1k
- Forks
- 5k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 112
Description
Sometimes (e.g. CycleGAN) we need to optimize two (or more) models' parameters together because it will be more efficient (e.g. when optimizing cycle loss we definitely don't want to use retain_graph=True).
I was just wondering whether this is the right way to initialize optimizer which aims to optimize both net_a2b's & net_b2a's parameters:
original_optimizer = ...
net_a2b, optimizer, _, _ = deepspeed.initialize(args, net_a2b, original_optimizer)
net_b2a, _, _, _ = deepspeed.initialize(args, net_b2a, original_optimizer)
Any help would be very grateful, thanks in advance!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the two deepspeed.initialize calls in the issue and trace how the optimizer and model parameters are registered. Check the relevant DeepSpeed initialization documentation or entry point, then validate the supported approach with the described CycleGAN case. Done means the supported way to optimize both models together is clearly established without relying on retain_graph=True.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- distributed-systems, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100