Skip to content

Commit

Permalink
add typehint
Browse files Browse the repository at this point in the history
  • Loading branch information
yt605155624 committed Apr 20, 2023
1 parent ec13243 commit b523701
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions paddlespeech/t2s/models/starganv2_vc/losses.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,16 @@ def compute_d_loss(nets: Dict[str, Any],
y_trg: paddle.Tensor,
z_trg: paddle.Tensor=None,
x_ref: paddle.Tensor=None,
use_r1_reg=True,
use_adv_cls=False,
use_con_reg=False,
use_r1_reg: bool=True,
use_adv_cls: bool=False,
use_con_reg: bool=False,
lambda_reg: float=1.,
lambda_adv_cls: float=0.1,
lambda_con_reg: float=10.):

assert (z_trg is None) != (x_ref is None)
# with real audios
x_real.stop_gradient = False

out = nets['discriminator'](x_real, y_org)
loss_real = adv_loss(out, 1)

Expand Down

0 comments on commit b523701

Please sign in to comment.