[−][src]Struct tensorflow::OperationDescription
An OperationDescription
is an Operation
in the process of being built
(i.e. the builder pattern).
An OperationDescription
is required to be finished before the graph
goes out of scope,
so finish()
will be called on drop if it was not already called.
Methods
impl<'a> OperationDescription<'a>
[src]
impl<'a> OperationDescription<'a>
pub fn finish(self) -> Result<Operation>
[src]
pub fn finish(self) -> Result<Operation>
Builds the operation and adds it to the graph.
pub fn set_device(&mut self, device: &str) -> Result<(), NulError>
[src]
pub fn set_device(&mut self, device: &str) -> Result<(), NulError>
Sets the preferred device. The empty string means unconstrained.
pub fn add_input(&mut self, input: Output)
[src]
pub fn add_input(&mut self, input: Output)
Adds an input to this operation.
The index in the port is an index into the source operation's output array.
pub fn add_input_list(&mut self, inputs: &[Output])
[src]
pub fn add_input_list(&mut self, inputs: &[Output])
Adds multiple inputs to this operation.
The index in the ports is an index into the source operation's output array.
pub fn add_control_input(&mut self, input: &Operation)
[src]
pub fn add_control_input(&mut self, input: &Operation)
Adds a control input.
pub fn set_attr_string(
&mut self,
attr_name: &str,
value: &str
) -> Result<(), NulError>
[src]
pub fn set_attr_string(
&mut self,
attr_name: &str,
value: &str
) -> Result<(), NulError>
Sets the value of a string attribute.
pub fn set_attr_string_list<S: AsRef<str>>(
&mut self,
attr_name: &str,
value: &[S]
) -> Result<(), NulError>
[src]
pub fn set_attr_string_list<S: AsRef<str>>(
&mut self,
attr_name: &str,
value: &[S]
) -> Result<(), NulError>
Sets the value of an attribute which holds a list of strings.
pub fn set_attr_func_name(
&mut self,
attr_name: &str,
value: &str
) -> Result<(), NulError>
[src]
pub fn set_attr_func_name(
&mut self,
attr_name: &str,
value: &str
) -> Result<(), NulError>
Sets the value of a function attribute.
pub fn set_attr_int(
&mut self,
attr_name: &str,
value: i64
) -> Result<(), NulError>
[src]
pub fn set_attr_int(
&mut self,
attr_name: &str,
value: i64
) -> Result<(), NulError>
Sets an int-valued attribute.
pub fn set_attr_int_list(
&mut self,
attr_name: &str,
value: &[i64]
) -> Result<(), NulError>
[src]
pub fn set_attr_int_list(
&mut self,
attr_name: &str,
value: &[i64]
) -> Result<(), NulError>
Sets an attribute which holds an array of ints.
pub fn set_attr_float(
&mut self,
attr_name: &str,
value: f32
) -> Result<(), NulError>
[src]
pub fn set_attr_float(
&mut self,
attr_name: &str,
value: f32
) -> Result<(), NulError>
Sets a float-valued attribute.
pub fn set_attr_float_list(
&mut self,
attr_name: &str,
value: &[f32]
) -> Result<(), NulError>
[src]
pub fn set_attr_float_list(
&mut self,
attr_name: &str,
value: &[f32]
) -> Result<(), NulError>
Sets an attribute which holds an array of floats.
pub fn set_attr_bool(
&mut self,
attr_name: &str,
value: bool
) -> Result<(), NulError>
[src]
pub fn set_attr_bool(
&mut self,
attr_name: &str,
value: bool
) -> Result<(), NulError>
Sets a boolean-valued attribute.
pub fn set_attr_bool_list(
&mut self,
attr_name: &str,
value: &[bool]
) -> Result<(), NulError>
[src]
pub fn set_attr_bool_list(
&mut self,
attr_name: &str,
value: &[bool]
) -> Result<(), NulError>
Sets an attribute which holds an array of booleans.
pub fn set_attr_type(
&mut self,
attr_name: &str,
value: DataType
) -> Result<(), NulError>
[src]
pub fn set_attr_type(
&mut self,
attr_name: &str,
value: DataType
) -> Result<(), NulError>
Sets a type-valued attribute.
pub fn set_attr_type_list(
&mut self,
attr_name: &str,
value: &[DataType]
) -> Result<(), NulError>
[src]
pub fn set_attr_type_list(
&mut self,
attr_name: &str,
value: &[DataType]
) -> Result<(), NulError>
Sets an attribute which holds an array of types.
pub fn set_attr_shape(
&mut self,
attr_name: &str,
value: &Shape
) -> Result<(), NulError>
[src]
pub fn set_attr_shape(
&mut self,
attr_name: &str,
value: &Shape
) -> Result<(), NulError>
Sets a shape-valued attribute.
pub fn set_attr_shape_list(
&mut self,
attr_name: &str,
value: &[Shape]
) -> Result<(), NulError>
[src]
pub fn set_attr_shape_list(
&mut self,
attr_name: &str,
value: &[Shape]
) -> Result<(), NulError>
Sets an attribute which holds an array of shapes.
pub fn set_attr_tensor_shape_proto(
&mut self,
attr_name: &str,
value: &[u8]
) -> Result<()>
[src]
pub fn set_attr_tensor_shape_proto(
&mut self,
attr_name: &str,
value: &[u8]
) -> Result<()>
Sets an attribute with a TensorShapeProto
protobuf.
pub fn set_attr_tensor_shape_proto_list<T: AsRef<[u8]>>(
&mut self,
attr_name: &str,
value: &[T]
) -> Result<()>
[src]
pub fn set_attr_tensor_shape_proto_list<T: AsRef<[u8]>>(
&mut self,
attr_name: &str,
value: &[T]
) -> Result<()>
Sets an attribute with an array of TensorShapeProto
protobufs.
pub fn set_attr_tensor<T: TensorType>(
&mut self,
attr_name: &str,
value: Tensor<T>
) -> Result<()>
[src]
pub fn set_attr_tensor<T: TensorType>(
&mut self,
attr_name: &str,
value: Tensor<T>
) -> Result<()>
Sets a tensor-valued attribute.
pub fn set_attr_tensor_list<I, T>(
&mut self,
attr_name: &str,
value: I
) -> Result<()> where
I: IntoIterator<Item = Tensor<T>>,
T: TensorType,
[src]
pub fn set_attr_tensor_list<I, T>(
&mut self,
attr_name: &str,
value: I
) -> Result<()> where
I: IntoIterator<Item = Tensor<T>>,
T: TensorType,
Sets an attribute which holds an array of tensors.
pub fn set_attr_to_attr_value_proto(
&mut self,
attr_name: &str,
value: &[u8]
) -> Result<()>
[src]
pub fn set_attr_to_attr_value_proto(
&mut self,
attr_name: &str,
value: &[u8]
) -> Result<()>
: Use set_attr_value_proto instead.
Sets an attribute with an AttrValue
proto.
pub fn set_attr_value_proto(
&mut self,
attr_name: &str,
value: &[u8]
) -> Result<()>
[src]
pub fn set_attr_value_proto(
&mut self,
attr_name: &str,
value: &[u8]
) -> Result<()>
Sets an attribute with an AttrValue
proto.
Trait Implementations
impl<'a> Drop for OperationDescription<'a>
[src]
impl<'a> Drop for OperationDescription<'a>
impl<'a> Debug for OperationDescription<'a>
[src]
impl<'a> Debug for OperationDescription<'a>
Auto Trait Implementations
impl<'a> !Send for OperationDescription<'a>
impl<'a> !Send for OperationDescription<'a>
impl<'a> !Sync for OperationDescription<'a>
impl<'a> !Sync for OperationDescription<'a>
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more