MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / hinge_discr_loss

Function hinge_discr_loss

sat/sgm/modules/autoencoding/magvit2_pytorch.py:139–140  ·  view source on GitHub ↗
(fake, real)

Source from the content-addressed store, hash-verified

137
138
139def hinge_discr_loss(fake, real):
140 return (F.relu(1 + fake) + F.relu(1 - real)).mean()
141
142
143def hinge_gen_loss(fake):

Callers 1

forwardMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected