Register the OpDefs from an OpList.
(self, op_list)
| 301 | self._ops[op_def.name] = _OpInfo(op_def) |
| 302 | |
| 303 | def add_op_list(self, op_list): |
| 304 | """Register the OpDefs from an OpList.""" |
| 305 | if not isinstance(op_list, op_def_pb2.OpList): |
| 306 | raise TypeError("%s is %s, not an op_def_pb2.OpList" % |
| 307 | (op_list, type(op_list))) |
| 308 | for op_def in op_list.op: |
| 309 | self.add_op(op_def) |
| 310 | |
| 311 | def apply_op(self, op_type_name, name=None, **keywords): |
| 312 | # pylint: disable=g-doc-args |