MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _wrapper

Function _wrapper

tensorflow/contrib/learn/python/learn/estimators/head.py:1844–1849  ·  view source on GitHub ↗
(labels, logits, weights=None)

Source from the content-addressed store, hash-verified

1842
1843def _wrap_custom_loss_fn(loss_fn):
1844 def _wrapper(labels, logits, weights=None):
1845 if weights is None:
1846 loss = loss_fn(labels, logits)
1847 else:
1848 loss = loss_fn(labels, logits, weights)
1849 return loss, loss
1850 return _wrapper
1851
1852

Callers

nothing calls this directly

Calls 1

loss_fnFunction · 0.50

Tested by

no test coverage detected