| 63 | } |
| 64 | |
| 65 | ops::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 | |
| 72 | TensorId ControlOutputFor(const Output& o) { |
| 73 | return {o.node()->name(), Graph::kControlSlot}; |
no test coverage detected