Skip to content

Commit

Permalink
Update the doc-string
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-sushanta committed Nov 4, 2023
1 parent 249165a commit ec4d2b6
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions ivy/functional/ivy/losses.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,11 +392,13 @@ def disc_wl(
"""
Compute the Wasserstein loss for the discriminator (critic).
Args:
Parameters
---------
p_real (`ivy.Array`): Predictions for real data.
p_fake (`ivy.Array`): Predictions for fake data.
Returns:
Returns
-------
`ivy.Array`: Wasserstein loss for the discriminator.
"""
r_loss = ivy.mean(p_real)
Expand All @@ -413,10 +415,12 @@ def gan_wl(pred_fake: Union[ivy.Array, ivy.NativeArray]) -> ivy.Array:
"""
Compute the Wasserstein loss for the generator.
Args:
Parameters
---------
pred_fake `(ivy.Array)`: Predictions for fake data.
Returns:
Returns
-------
`ivy.Array`: Wasserstein loss for the generator.
"""
return -1 * ivy.mean(pred_fake)

0 comments on commit ec4d2b6

Please sign in to comment.