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

Method testBasic

tensorflow/python/eager/function_test.py:137–143  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

135 ])
136
137 def testBasic(self):
138 matmul = def_function.function(math_ops.matmul)
139 t = constant_op.constant([[1.0, 2.0], [3.0, 4.0]])
140 sq = matmul(t, t, transpose_a=True)
141 sq2 = matmul(sq, t, transpose_a=True)
142 self.assertAllEqual(sq.numpy().reshape(-1), [10, 14, 14, 20])
143 self.assertAllEqual(sq2.numpy().reshape(-1), [52, 76, 74, 108])
144
145 def testVariable(self):
146 v1 = variables.Variable(1.0)

Callers

nothing calls this directly

Calls 6

reshapeMethod · 0.80
matmulFunction · 0.50
functionMethod · 0.45
constantMethod · 0.45
assertAllEqualMethod · 0.45
numpyMethod · 0.45

Tested by

no test coverage detected