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

Method testComposition

tensorflow/python/eager/core_test.py:897–909  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

895 attrs=('T', dtypes.int32.as_datatype_enum, 'unknown_attr', 'blah'))
896
897 def testComposition(self):
898
899 def add(x, y):
900 return execute(
901 b'Add',
902 num_outputs=1,
903 inputs=[x, y],
904 attrs=('T', dtypes.int32.as_datatype_enum))[0]
905
906 x = constant_op.constant(1)
907 three_x = add(add(x, x), x)
908 self.assertEquals(dtypes.int32, three_x.dtype)
909 self.assertAllEqual(3, three_x)
910
911 @test_util.run_gpu_only
912 def testOperationWithNoInputsRunsOnDevice(self):

Callers

nothing calls this directly

Calls 4

assertEqualsMethod · 0.80
addFunction · 0.50
constantMethod · 0.45
assertAllEqualMethod · 0.45

Tested by

no test coverage detected