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

Function CreateSwitch

tensorflow/compiler/jit/deadness_analysis_test.cc:65–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65ops::Switch CreateSwitch(const Scope& root, const string& prefix) {
66 Output value = ops::Placeholder(root.WithOpName(prefix + "/value"), DT_FLOAT);
67 Output predicate =
68 ops::Placeholder(root.WithOpName(prefix + "/pred"), DT_BOOL);
69 return ops::Switch(root.WithOpName(prefix + "/switch"), value, predicate);
70}
71
72TensorId ControlOutputFor(const Output& o) {
73 return {o.node()->name(), Graph::kControlSlot};

Callers 1

TESTFunction · 0.85

Calls 3

WithOpNameMethod · 0.80
PlaceholderFunction · 0.50
SwitchFunction · 0.50

Tested by

no test coverage detected