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

Method testReferenceInput

tensorflow/python/framework/ops_test.py:1245–1266  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1243 t3[0].op.node_def)
1244
1245 def testReferenceInput(self):
1246 g = ops.Graph()
1247 ref_t, nonref_t = _apply_op(
1248 g, "RefOutputFloatOutput", [], [dtypes.float32_ref, dtypes.float32],
1249 name="op1")
1250 self.assertProtoEquals("op:'RefOutputFloatOutput' name:'op1'",
1251 ref_t.op.node_def)
1252 # NOTE(mrry): Must specify input_types to preserve ref-typed input.
1253 out_2 = _apply_op(
1254 g,
1255 "RefInputFloatInputIntOutput", [ref_t, nonref_t], [dtypes.int32],
1256 input_types=[dtypes.float32_ref, dtypes.float32],
1257 name="op2")
1258 self.assertProtoEquals(
1259 "op:'RefInputFloatInputIntOutput' name:'op2' input:'op1' input:'op1:1'",
1260 out_2.op.node_def)
1261 out_3 = _apply_op(
1262 g, "TwoFloatInputsIntOutput", [ref_t, nonref_t], [dtypes.int32],
1263 name="op3")
1264 self.assertProtoEquals(
1265 "op:'TwoFloatInputsIntOutput' name:'op3' input:'op1' input:'op1:1'",
1266 out_3.op.node_def)
1267
1268
1269class NameStackTest(test_util.TensorFlowTestCase):

Callers

nothing calls this directly

Calls 3

_apply_opFunction · 0.85
assertProtoEqualsMethod · 0.80
GraphMethod · 0.45

Tested by

no test coverage detected