MCPcopy Create free account
hub / github.com/Newmu/dcgan_code / Hinge

Function Hinge

lib/costs.py:19–20  ·  view source on GitHub ↗
(y_true, y_pred)

Source from the content-addressed store, hash-verified

17 return T.sqr(T.maximum(1. - y_true * y_pred, 0.)).mean()
18
19def Hinge(y_true, y_pred):
20 return T.maximum(1. - y_true * y_pred, 0.).mean()
21
22cce = CCE = CategoricalCrossEntropy
23bce = BCE = BinaryCrossEntropy

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected