MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _get_operation_by_name_unsafe

Method _get_operation_by_name_unsafe

tensorflow/python/framework/ops.py:3748–3769  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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)

Callers 5

_ProcessNewOpsFunction · 0.80
consumersMethod · 0.80
control_inputsMethod · 0.80
_control_outputsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected