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

Function SquaredHinge

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

Source from the content-addressed store, hash-verified

14 return T.abs_(y_pred - y_true).mean()
15
16def SquaredHinge(y_true, y_pred):
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()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected