[−][src]Struct tensorflow::WhileBuilder
A WhileBuilder is used to build a while loop.
Methods
impl<'a> WhileBuilder<'a>
[src]
pub fn new<CF: Fn(&mut Graph, &[Output]) -> Result<Output>, BF: Fn(&mut Graph, &[Output]) -> Result<Vec<Output>>>(
graph: &'a mut Graph,
cond: CF,
body: BF,
inputs: &[Output]
) -> Result<Self>
[src]
graph: &'a mut Graph,
cond: CF,
body: BF,
inputs: &[Output]
) -> Result<Self>
Creates a WhileBuilder for creating a while loop.
The loop is not actually added to the graph until finish
is called.
Arguments
graph
- graph to create the while loop incond
- takes the condition subgraph and loop variables and returns a scalar booleanbody
- takes the body subgraph and loop variables and returns the new values of the loop variablesinputs
- outputs that already exist ingraph
used as initial values for the loop variables
Returns
A unfinished WhileBuilder.
pub fn name(self, name: &str) -> Result<Self, NulError>
[src]
Sets a unique name for this while loop. This is used as a prefix for created operations. If not set, a unique prefix will be generated.
pub fn finish(self) -> Result<Vec<Output>>
[src]
Builds the while loop and returns the output tensors of the while loop.
Trait Implementations
Auto Trait Implementations
impl<'a> !Send for WhileBuilder<'a>
impl<'a> !Sync for WhileBuilder<'a>
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,