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

Function _safe_shape_div

tensorflow/python/ops/math_grad.py:36–38  ·  view source on GitHub ↗

Divides `x / y` assuming `x, y >= 0`, treating `0 / 0 = 0`.

(x, y)

Source from the content-addressed store, hash-verified

34
35
36def _safe_shape_div(x, y):
37 """Divides `x / y` assuming `x, y >= 0`, treating `0 / 0 = 0`."""
38 return x // math_ops.maximum(y, 1)
39
40
41@ops.RegisterGradient("ArgMax")

Callers 3

_SumGradFunction · 0.85
_MeanGradFunction · 0.85
_ProdGradFunction · 0.85

Calls 1

maximumMethod · 0.80

Tested by

no test coverage detected