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

Method input_edges

tensorflow/core/graph/graph.cc:286–308  ·  view source on GitHub ↗

Returns a vector of the non-control input edges to a node, indexed by ID.

Source from the content-addressed store, hash-verified

284
285// Returns a vector of the non-control input edges to a node, indexed by ID.
286Status Node::input_edges(std::vector<const Edge*>* input_edges) const {
287 input_edges->clear();
288 input_edges->resize(num_inputs(), nullptr);
289
290 for (const Edge* edge : in_edges()) {
291 if (edge->IsControlEdge()) continue;
292 if (edge->dst_input() < 0 || edge->dst_input() >= num_inputs()) {
293 return errors::Internal("Invalid edge input number ", edge->dst_input());
294 }
295 if ((*input_edges)[edge->dst_input()] != nullptr) {
296 return errors::Internal("Duplicate edge input number: ",
297 edge->dst_input());
298 }
299 (*input_edges)[edge->dst_input()] = edge;
300 }
301
302 for (int i = 0; i < num_inputs(); ++i) {
303 if ((*input_edges)[i] == nullptr) {
304 return errors::InvalidArgument("Missing edge input number: ", i);
305 }
306 }
307 return Status::OK();
308}
309
310Status Node::input_node(int idx, Node** n) const {
311 const Edge* e;

Callers 11

GetXlaClusterInfoFunction · 0.80
BuildXlaLaunchOpsMethod · 0.80
GetCgmodeClusterInfoFunction · 0.80
IsTensorRTCandidateMethod · 0.80
AddConversionMappingMethod · 0.80
AddInputsMethod · 0.80
AddInputsMethod · 0.80
CreateEnterNodesMethod · 0.80
FindSaveOpFunction · 0.80
TEST_FFunction · 0.80

Calls 6

InternalFunction · 0.85
InvalidArgumentFunction · 0.85
clearMethod · 0.45
resizeMethod · 0.45
IsControlEdgeMethod · 0.45
dst_inputMethod · 0.45

Tested by 1

TEST_FFunction · 0.64