Home
last modified time | relevance | path

Searched refs:switch_op (Results 1 – 6 of 6) sorted by relevance

/external/tensorflow/tensorflow/lite/toco/graph_transformations/
Dresolve_tensorflow_switch.cc33 const auto* switch_op = switch_it->get(); in Run() local
34 if (switch_op->type != OperatorType::kSwitch) { in Run()
38 CHECK_EQ(switch_op->inputs.size(), 2); in Run()
39 CHECK_EQ(switch_op->outputs.size(), 2); in Run()
40 const std::string& predicate_name = switch_op->inputs[1]; in Run()
46 LogName(*switch_op)); in Run()
79 if (input == switch_op->outputs[selected_output_index]) { in Run()
80 input = switch_op->inputs[0]; in Run()
96 if (*input_it == switch_op->outputs[nonselected_output_index]) { in Run()
119 if (!GetOpWithInput(*model, switch_op->outputs[i])) { in Run()
[all …]
/external/tensorflow/tensorflow/python/framework/
Dauto_control_deps.py248 def _process_switch(self, switch_op, ops_which_must_run, argument
285 inp = switch_op.inputs[0]
290 output = switch_op.outputs[0]
295 switch_op.outputs, name="artificial_merge")
297 switch_op._control_flow_context.outer_context)
302 switch_op._add_control_input(last_write_to_resource[input_id])
307 for o in switch_op.outputs:
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/tests/tf_saved_model/
Dcontrol_flow_upgrade_legacy_v1.py40 switch_op = control_flow_ops.switch(data, less_op)
41 merge_op = control_flow_ops.merge(switch_op)[0]
/external/tensorflow/tensorflow/compiler/tf2xla/
Dfunctionalize_cond_test.cc127 auto switch_op = ops::Switch(root.WithOpName("switch"), arg_1_op, arg_0_op); in TEST() local
130 {switch_op.output_false, const_op, const_op}); in TEST()
133 {switch_op.output_true, const_op, const_op}); in TEST()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/ir/
Dtf_executor.cc438 void Print(SwitchOp switch_op, OpAsmPrinter &p) { in Print() argument
439 p << switch_op.getOperationName() << ' '; in Print()
440 p.printOperands(switch_op.getOperands()); in Print()
441 Type data_operand_ty = switch_op.data().getType(); in Print()
445 if (switch_op.trueOutput().getType() != data_operand_ty || in Print()
446 switch_op.falseOutput().getType() != data_operand_ty || in Print()
447 switch_op.predicate().getType().isa<UnrankedTensorType>()) { in Print()
448 p.printFunctionalType(switch_op.getOperation()); in Print()
450 p << switch_op.getType(0); in Print()
452 p.printOptionalAttrDict(switch_op.getAttrs()); in Print()
/external/tensorflow/tensorflow/python/kernel_tests/
Dcontrol_flow_ops_py_test.py239 switch_op = control_flow_ops.switch(data, pred)
240 merge_op = control_flow_ops.merge(switch_op)[0]
252 switch_op = control_flow_ops.switch(data, ports)
253 dead_branch = array_ops.identity(switch_op[0])
267 switch_op = control_flow_ops.switch(data, less_op)
268 merge_op = control_flow_ops.merge(switch_op)[0]
278 switch_op = control_flow_ops.switch(data, ports)
280 add_op = math_ops.add(switch_op[0], one)
281 id_op = array_ops.identity(switch_op[1])
292 switch_op = control_flow_ops.switch(data, ports)
[all …]