[][src]Struct tensorflow::VariableBuilder

pub struct VariableBuilder<'a> { /* fields omitted */ }

Builds a Variable.

Methods

impl<'a> VariableBuilder<'a>[src]

pub fn const_initial_value<T: TensorType, TT: Into<Tensor<T>>>(
    self,
    value: TT
) -> Self
[src]

Sets the initial value from anything that can be converted into a Tensor. This also sets the type and shape.

pub fn const_initial_tensor<T: TensorType>(self, value: &'a Tensor<T>) -> Self[src]

Sets the initial value from a Tensor. This also sets the type and shape.

pub fn initial_value<T: Into<Output>>(self, value: T) -> Self[src]

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.

pub fn shape(self, shape: Shape) -> Self[src]

Sets the shape of the variable.

pub fn data_type(self, data_type: DataType) -> Self[src]

Sets the data type of the variable.

pub fn build(self, scope: &mut Scope) -> Result<Variable>[src]

Builds the Variable.

Trait Implementations

impl<'a> Default for VariableBuilder<'a>[src]

impl<'a> Debug for VariableBuilder<'a>[src]

Auto Trait Implementations

impl<'a> !Send for VariableBuilder<'a>

impl<'a> !Sync for VariableBuilder<'a>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]