Returns the `Operation` with the given `name`. This is a internal unsafe version of get_operation_by_name. It skips many checks and does not have user friedly error messages but runs considerably faster. This method may be called concurrently from multiple threads. Args: name
(self, name)
| 3746 | return self.as_graph_element(name, allow_tensor=False, allow_operation=True) |
| 3747 | |
| 3748 | def _get_operation_by_name_unsafe(self, name): |
| 3749 | """Returns the `Operation` with the given `name`. |
| 3750 | |
| 3751 | This is a internal unsafe version of get_operation_by_name. It skips many |
| 3752 | checks and does not have user friedly error messages but runs considerably |
| 3753 | faster. This method may be called concurrently from multiple threads. |
| 3754 | |
| 3755 | Args: |
| 3756 | name: The name of the `Operation` to return. |
| 3757 | |
| 3758 | Returns: |
| 3759 | The `Operation` with the given `name`. |
| 3760 | |
| 3761 | Raises: |
| 3762 | KeyError: If `name` does not correspond to an operation in this graph. |
| 3763 | """ |
| 3764 | |
| 3765 | if self._finalized: |
| 3766 | return self._nodes_by_name[name] |
| 3767 | |
| 3768 | with self._lock: |
| 3769 | return self._nodes_by_name[name] |
| 3770 | |
| 3771 | def _get_operation_by_tf_operation(self, tf_oper): |
| 3772 | op_name = c_api.TF_OperationName(tf_oper) |
no outgoing calls
no test coverage detected