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

Method testUnusedOutput

tensorflow/python/ops/gradients_test.py:79–87  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

77 self.assertFalse(w_grad.op.get_attr("transpose_b"))
78
79 def testUnusedOutput(self):
80 with ops.Graph().as_default():
81 w = constant(1.0, shape=[2, 2])
82 x = constant(1.0, shape=[2, 2])
83 wx = math_ops.matmul(w, x)
84 split_wx = array_ops.split(value=wx, num_or_size_splits=2, axis=0)
85 c = math_ops.reduce_sum(split_wx[1])
86 gw = gradients.gradients(c, [w])[0]
87 self.assertEquals("MatMul", gw.op.type)
88
89 def testColocateGradients(self):
90 with ops.Graph().as_default() as g:

Callers

nothing calls this directly

Calls 7

constantFunction · 0.90
reduce_sumMethod · 0.80
assertEqualsMethod · 0.80
as_defaultMethod · 0.45
GraphMethod · 0.45
matmulMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected