[][src]Struct tensorflow::SessionRunArgs

pub struct SessionRunArgs<'l> { /* fields omitted */ }

Manages the inputs and outputs for a single execution of a graph.

Typical usage involves creating an instance of this struct, adding some inputs to it, requesting some outputs, passing it to Session::run and then taking the outputs out of it.

Example:

This example is not tested
let mut args = SessionRunArgs::new();
args.add_feed(&op1, 0, &tensor1);
args.add_feed(&op2, 0, &tensor2);
let result_token = args.request_fetch(&op3, 0);
session.run(&mut args)?;
let result_tensor = args.fetch(result_token)?;

See examples/addition.rs for a more concrete example.

Methods

impl<'l> SessionRunArgs<'l>
[src]

Creates a SessionRunArgs.

Adds an input to be fed to the graph. The index selects which output of the operation to feed. For most operations, there is only one output, so the index should be 0.

Deprecated since 0.10.0

: Use add_feed instead.

Deprecated alias for add_feed.

Requests that an output is fetched from the graph after running this step. The index selects which output of the operation to return. For most operations, there is only one output, so the index should be 0. Returns a token that you can then use to fetch this output from the args after running it.

Deprecated since 0.10.0

: Use request_fetch instead.

Deprecated alias for request_fetch.

Extracts a tensor output given a token. A given token can only be extracted once per Session::run. Returns an error if the token is invalid, output is unavailable or the requested type does not match the type of the actual tensor.

Deprecated since 0.10.0

: Use fetch instead.

Deprecated alias for fetch.

Adds a target operation to be executed when running the graph.

Retuns the type of the tensor given an index. Returns None if the index is out of range or the output is not yet available.

Trait Implementations

impl<'l> Drop for SessionRunArgs<'l>
[src]

impl<'l> Debug for SessionRunArgs<'l>
[src]

Auto Trait Implementations

impl<'l> !Send for SessionRunArgs<'l>

impl<'l> !Sync for SessionRunArgs<'l>

Blanket Implementations

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

impl<T> From for T
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.