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

Method _FunctionOf

tensorflow/python/ops/gradients_test.py:332–335  ·  view source on GitHub ↗
(xs, k=3)

Source from the content-addressed store, hash-verified

330 def testStopGradients(self):
331 def _MakeGraph(rng, stop_gradients=()):
332 def _FunctionOf(xs, k=3):
333 return ops.convert_to_tensor(
334 sum(math_ops.matmul(rng.rand(k, k), x) for x in xs)
335 + rng.rand(k, k))
336
337 a = _FunctionOf([])
338 if "a" in stop_gradients: a = array_ops.stop_gradient(a)

Callers

nothing calls this directly

Calls 3

sumFunction · 0.85
randMethod · 0.80
matmulMethod · 0.45

Tested by

no test coverage detected