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

Method f

tensorflow/python/kernel_tests/relu_op_test.py:366–371  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

364 with self.cached_session():
365
366 def f(x):
367 assert x.dtype == dtypes.float32
368 with backprop.GradientTape() as tape:
369 tape.watch(x)
370 y = nn_ops.leaky_relu(x)
371 return tape.gradient(y, x)
372
373 x = np.asarray(
374 [[-0.9, -0.7, -0.5, -0.3, -0.1], [0.1, 0.3, 0.5, 0.7, 0.9]],

Callers

nothing calls this directly

Calls 3

gradientMethod · 0.80
GradientTapeMethod · 0.45
watchMethod · 0.45

Tested by

no test coverage detected