tensorflow::ops::Switch

#include <control_flow_ops.h>

Forwards data to the output port determined by pred.

Summary

If pred is true, the data input is forwarded to output_true. Otherwise, the data goes to output_false.

See also RefSwitch and Merge.

Arguments:

  • scope: A Scope object
  • data: The tensor to be forwarded to the appropriate output.
  • pred: A scalar that specifies which output port will receive data.

Returns:

  • Output output_false: If pred is false, data will be forwarded to this output.
  • Output output_true: If pred is true, data will be forwarded to this output.

Constructors and Destructors

Switch(const ::tensorflow::Scope & scope, ::tensorflow::Input data, ::tensorflow::Input pred)

Public attributes

operation
output_false
output_true

Public attributes

operation

Operation operation

output_false

::tensorflow::Output output_false

output_true

::tensorflow::Output output_true

Public functions

Switch

 Switch(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input data,
  ::tensorflow::Input pred
)