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

Function AddControlSwitch

tensorflow/core/graph/graph_partition.cc:638–646  ·  view source on GitHub ↗

A switch node for control flow.

Source from the content-addressed store, hash-verified

636
637// A switch node for control flow.
638Node* AddControlSwitch(NodeBuilder::NodeOut input1, NodeBuilder::NodeOut input2,
639 const string& device_name,
640 const GraphDefBuilder::Options& bopts) {
641 Node* res_node =
642 ops::BinaryOp("Switch", std::move(input1), std::move(input2), bopts);
643 if (bopts.HaveError()) return nullptr;
644 res_node->set_assigned_device_name(device_name);
645 return res_node;
646}
647
648// A next_iteration node for control flow.
649Node* AddControlNext(NodeBuilder::NodeOut input, const string& device_name,

Callers 1

AddControlLoopFunction · 0.85

Calls 3

HaveErrorMethod · 0.80
BinaryOpFunction · 0.70

Tested by

no test coverage detected