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

Function NumControlOutputs

tensorflow/core/grappler/utils.cc:316–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314}
315
316int NumControlOutputs(const NodeDef& node, const NodeMap& node_map) {
317 int num_outputs = 0;
318 for (const NodeDef* output : node_map.GetOutputs(node.name())) {
319 for (const string& node_as_input : output->input()) {
320 if (!IsControlInput(node_as_input)) continue;
321
322 TensorId tensor = ParseTensorName(node_as_input);
323 if (tensor.node() == node.name()) {
324 ++num_outputs;
325 }
326 }
327 }
328 return num_outputs;
329}
330
331int NumNonControlOutputs(const NodeDef& node, const NodeMap& node_map) {
332 int num_outputs = 0;

Callers 1

IsSupportedMethod · 0.85

Calls 6

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

Tested by

no test coverage detected