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

Function IsShapeConsumer

tensorflow/core/grappler/utils.cc:68–71  ·  view source on GitHub ↗

Is 'node' an operator that consumes only the shape of its input, not the data itself? TODO(ezhulenev): move to op_types.h. Requires to break circular dependency. TODO(ezhulenev): what about Identity passing tensor to Shape consumer?

Source from the content-addressed store, hash-verified

66// TODO(ezhulenev): move to op_types.h. Requires to break circular dependency.
67// TODO(ezhulenev): what about Identity passing tensor to Shape consumer?
68bool IsShapeConsumer(const NodeDef& node) {
69 const string& op = node.op();
70 return op == "Shape" || op == "ShapeN" || op == "Rank" || op == "Size";
71}
72
73} // namespace
74

Callers 1

NumNonControlDataOutputsFunction · 0.85

Calls 1

opMethod · 0.45

Tested by

no test coverage detected