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

Method DoubleF

tensorflow/python/ops/gradients_test.py:1244–1252  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

1242
1243 @custom_gradient.custom_gradient
1244 def DoubleF(x):
1245 out = F(x)
1246
1247 def Grad(out_grad, variables=None): # pylint: disable=redefined-outer-name
1248 self.assertEqual(1, len(variables))
1249 grads = gradients.gradients(out, [x, variables[0]], grad_ys=out_grad)
1250 return grads[0], [array_ops.ones((4, 3))]
1251
1252 return out, Grad
1253 with ops.Graph().as_default():
1254 x = array_ops.ones((2, 4))
1255 with variable_scope.variable_scope("f", use_resource=True) as vs:

Callers

nothing calls this directly

Calls 1

FFunction · 0.50

Tested by

no test coverage detected