Skip to content

Instantly share code, notes, and snippets.

@udithhaputhanthri
Last active May 31, 2020 19:55
Show Gist options
  • Save udithhaputhanthri/d1dff400ee1c85052151567cc204e3ac to your computer and use it in GitHub Desktop.
Save udithhaputhanthri/d1dff400ee1c85052151567cc204e3ac to your computer and use it in GitHub Desktop.
Image-to-Image Translation Using Conditional DCGANs
bce=nn.BCELoss().to(device)
L1=nn.L1Loss().to(device)
k=50
def criterion(y_hat,y):
loss=bce(y_hat,y)+k*L1(y_hat,y)
return loss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment