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

Method GetRegularFanin

tensorflow/core/grappler/graph_view.h:170–179  ·  view source on GitHub ↗

Special case: regular (i.e. non-control) input ports can only have one fanin. If port.port_id is out of range or is a control dependency, then an empty OutputPort is returned.

Source from the content-addressed store, hash-verified

168 // fanin. If port.port_id is out of range or is a control dependency, then an
169 // empty OutputPort is returned.
170 const OutputPort GetRegularFanin(const InputPort& port) const {
171 if (port.port_id < 0 ||
172 port.port_id >
173 gtl::FindWithDefault(max_regular_input_port_, port.node, -1)) {
174 return OutputPort();
175 }
176
177 TensorId tensor_id = ParseTensorName(port.node->input(port.port_id));
178 return GetOutputPort(tensor_id.node(), tensor_id.index());
179 }
180
181 // Checks if a tensor id is a fanin of the node.
182 bool HasFanin(const NodeDefT& node, const TensorId& fanin) const {

Callers

nothing calls this directly

Calls 5

OutputPortClass · 0.85
ParseTensorNameFunction · 0.85
inputMethod · 0.45
nodeMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected