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

Function NumNonControlOutputs

tensorflow/core/grappler/utils.cc:331–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

329}
330
331int NumNonControlOutputs(const NodeDef& node, const NodeMap& node_map) {
332 int num_outputs = 0;
333 for (const NodeDef* output : node_map.GetOutputs(node.name())) {
334 for (const string& node_as_input : output->input()) {
335 if (IsControlInput(node_as_input)) {
336 break;
337 }
338 if (node_as_input == node.name()) {
339 ++num_outputs;
340 } else {
341 const TensorId tensor = ParseTensorName(node_as_input);
342 if (tensor.node() == node.name()) {
343 ++num_outputs;
344 }
345 }
346 }
347 }
348 return num_outputs;
349}
350
351int NumNonControlDataOutputs(const NodeDef& node, const NodeMap& node_map) {
352 int num_data_outputs = 0;

Callers 12

TEST_FFunction · 0.85
ConstantPushDownMethod · 0.85
MulConvPushDownMethod · 0.85
GetTailOfIdempotentChainFunction · 0.85
TrySimplifyMethod · 0.85
IsSupportedMethod · 0.85
TrySimplifyMethod · 0.85
TrySimplifyMethod · 0.85
TrySimplifyMethod · 0.85
TrySimplifyMethod · 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