Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions models/networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ def cal_gradient_penalty(netD, real_data, fake_data, device, type='mixed', const
lambda_gp (float) -- weight for this loss

Returns the gradient penalty loss
NOTE: Strongly advised not to use batch/instance norm with the Discriminator(or Critic) if using gradient penalty!
"""
if lambda_gp > 0.0:
if type == 'real': # either use real images, fake images, or a linear interpolation of two.
Expand Down