(self)
| 1015 | op3.node_def) |
| 1016 | |
| 1017 | def testReferenceInput(self): |
| 1018 | g = ops.Graph() |
| 1019 | op1 = g.create_op( |
| 1020 | "RefOutputFloatOutput", [], [dtypes.float32_ref, dtypes.float32], |
| 1021 | name="op1") |
| 1022 | self.assertProtoEquals("op:'RefOutputFloatOutput' name:'op1'", op1.node_def) |
| 1023 | ref_t, nonref_t = op1.values() |
| 1024 | # NOTE(mrry): Must specify input_types to preserve ref-typed input. |
| 1025 | op2 = g.create_op( |
| 1026 | "RefInputFloatInput", [ref_t, nonref_t], [], |
| 1027 | input_types=[dtypes.float32_ref, dtypes.float32], |
| 1028 | name="op2") |
| 1029 | self.assertProtoEquals( |
| 1030 | "op:'RefInputFloatInput' name:'op2' input:'op1' input:'op1:1'", |
| 1031 | op2.node_def) |
| 1032 | op3 = g.create_op("TwoFloatInputs", [ref_t, nonref_t], [], name="op3") |
| 1033 | self.assertProtoEquals( |
| 1034 | "op:'TwoFloatInputs' name:'op3' input:'op1' input:'op1:1'", |
| 1035 | op3.node_def) |
| 1036 | |
| 1037 | def testFinalized(self): |
| 1038 | g = ops.Graph() |
nothing calls this directly
no test coverage detected