Generator that yields newly-added TF_Operations in `graph`. Specifically, yields TF_Operations that don't have associated Operations in `graph`. This is useful for processing nodes added by the C API. Args: graph: Graph Yields: wrapped TF_Operation
(graph)
| 208 | |
| 209 | |
| 210 | def new_tf_operations(graph): |
| 211 | """Generator that yields newly-added TF_Operations in `graph`. |
| 212 | |
| 213 | Specifically, yields TF_Operations that don't have associated Operations in |
| 214 | `graph`. This is useful for processing nodes added by the C API. |
| 215 | |
| 216 | Args: |
| 217 | graph: Graph |
| 218 | |
| 219 | Yields: |
| 220 | wrapped TF_Operation |
| 221 | """ |
| 222 | # TODO(b/69679162): do this more efficiently |
| 223 | for c_op in tf_operations(graph): |
| 224 | try: |
| 225 | graph._get_operation_by_tf_operation(c_op) # pylint: disable=protected-access |
| 226 | except KeyError: |
| 227 | yield c_op |
nothing calls this directly
no test coverage detected