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

Function HasControlOutputs

tensorflow/core/grappler/utils.cc:302–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300}
301
302bool HasControlOutputs(const NodeDef& node, const NodeMap& node_map) {
303 for (const NodeDef* output : node_map.GetOutputs(node.name())) {
304 for (const string& node_as_input : output->input()) {
305 if (!IsControlInput(node_as_input)) continue;
306
307 TensorId tensor = ParseTensorName(node_as_input);
308 if (tensor.node() == node.name()) {
309 return true;
310 }
311 }
312 }
313 return false;
314}
315
316int NumControlOutputs(const NodeDef& node, const NodeMap& node_map) {
317 int num_outputs = 0;

Callers 1

TEST_FFunction · 0.85

Calls 6

IsControlInputFunction · 0.85
ParseTensorNameFunction · 0.85
GetOutputsMethod · 0.80
nameMethod · 0.65
inputMethod · 0.45
nodeMethod · 0.45

Tested by 1

TEST_FFunction · 0.68