(self)
| 48 | item.Item(mg) |
| 49 | |
| 50 | def testImportantOps(self): |
| 51 | with ops.Graph().as_default() as g: |
| 52 | a = constant_op.constant(10) |
| 53 | b = constant_op.constant(20) |
| 54 | c = a + b |
| 55 | train_op = ops.get_collection_ref(ops.GraphKeys.TRAIN_OP) |
| 56 | train_op.append(c) |
| 57 | mg = meta_graph.create_meta_graph_def(graph=g) |
| 58 | grappler_item = item.Item(mg) |
| 59 | op_list = grappler_item.IdentifyImportantOps() |
| 60 | self.assertItemsEqual(['Const', 'Const_1', 'add'], op_list) |
| 61 | |
| 62 | def testOpProperties(self): |
| 63 | with ops.Graph().as_default() as g: |
nothing calls this directly
no test coverage detected