Struct tensorflow::Operation
[−]
[src]
pub struct Operation { /* fields omitted */ }An Operation is a node in a Graph.
It is a computation which accepts inputs and produces outputs.
Methods
impl Operation[src]
fn name(&self) -> Result<String, Utf8Error>
Returns the name of the operation.
This is the name of the specific computational step,
not an operation type, so it may look like 'add_x_and_y' instead of 'Add',
although it may be a generated ID like 'Add_123'.
fn op_type(&self) -> Result<String, Utf8Error>
Returns the type of operation.
This will be something like 'Add', 'Mul', etc.
fn device(&self) -> Result<String, Utf8Error>
Returns the device for this operation. The empty string means unconstrained.
fn num_outputs(&self) -> usize
Returns the number of outputs.
fn output_type(&self, index: usize) -> DataType
Returns the type of a specific output.
fn output_list_length(&self, arg_name: &str) -> Result<usize>
fn num_inputs(&self) -> usize
Returns the number of inputs.
fn input_type(&self, index: usize) -> DataType
Returns the type of a specific input.
fn input_list_length(&self, arg_name: &str) -> Result<usize>
fn input(&self, index: usize) -> (Operation, usize)
Returns the given input edge. The index argument is the index into the current operation's input array, and the return value is the source operation and the index into its output array.
fn output_num_consumers(&self, index: usize) -> usize
Returns the number of consumers of a specific output.
fn output_consumers(&self, index: usize) -> Vec<(Operation, usize)>
Returns the consumers of a specific output. The index argument is the index into the current operation's output array, and the return value is a vector of the destination operation and the index into its input array.
fn num_control_inputs(&self) -> usize
Returns the number of control inputs.
fn control_inputs(&self) -> Vec<Operation>
Returns the control inputs.
fn num_control_outputs(&self) -> usize
Returns the number of control outputs.
fn control_outputs(&self) -> Vec<Operation>
Returns the control outputs.
Trait Implementations
impl Debug for Operation[src]
impl Clone for Operation[src]
fn clone(&self) -> Operation
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more