Skip to content

Commit

Permalink
fix(train): fix optim_d functions called in wrong order (#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
34j committed Apr 9, 2023
1 parent d39bcc4 commit 13d6346
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/so_vits_svc_fork/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,8 @@ def training_step(self, batch: dict[str, torch.Tensor], batch_idx: int) -> None:

# optimizer
self.manual_backward(loss_disc_all)
optim_d.zero_grad()
optim_d.step()
optim_d.zero_grad()
self.untoggle_optimizer(optim_d)

def validation_step(self, batch, batch_idx):
Expand Down

0 comments on commit 13d6346

Please sign in to comment.