Struct tensorflow::VariableBuilder
source · pub struct VariableBuilder<'a> { /* private fields */ }
Expand description
Builds a Variable.
Implementations§
source§impl<'a> VariableBuilder<'a>
impl<'a> VariableBuilder<'a>
sourcepub fn const_initial_value<T: TensorType, TT: Into<Tensor<T>>>(
self,
value: TT
) -> Self
pub fn const_initial_value<T: TensorType, TT: Into<Tensor<T>>>( self, value: TT ) -> Self
Sets the initial value from anything that can be converted into a Tensor. This also sets the type and shape.
sourcepub fn const_initial_tensor<T: TensorType>(self, value: &'a Tensor<T>) -> Self
pub fn const_initial_tensor<T: TensorType>(self, value: &'a Tensor<T>) -> Self
Sets the initial value from a Tensor. This also sets the type and shape.
sourcepub fn initial_value<T: Into<Output>>(self, value: T) -> Self
pub fn initial_value<T: Into<Output>>(self, value: T) -> Self
Sets the initial value from an existing output in the graph. The type and shape are not set and will need to be set manually.
Trait Implementations§
source§impl<'a> Debug for VariableBuilder<'a>
impl<'a> Debug for VariableBuilder<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for VariableBuilder<'a>
impl<'a> !Send for VariableBuilder<'a>
impl<'a> !Sync for VariableBuilder<'a>
impl<'a> Unpin for VariableBuilder<'a>
impl<'a> !UnwindSafe for VariableBuilder<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more