[−][src]Struct tensorflow::Session
Manages a single graph and execution.
Methods
impl Session
[src]
pub fn new(options: &SessionOptions, graph: &Graph) -> Result<Self>
[src]
Creates a session.
graph
will be be kept alive for the lifetime of the returned session.
New nodes can still be added to graph
after this call.
pub fn from_saved_model<P: AsRef<Path>, Tag: AsRef<str>, Tags: IntoIterator<Item = Tag>>(
options: &SessionOptions,
tags: Tags,
graph: &mut Graph,
export_dir: P
) -> Result<Self>
[src]
options: &SessionOptions,
tags: Tags,
graph: &mut Graph,
export_dir: P
) -> Result<Self>
Loads a session from an exported model.
pub fn close(&mut self) -> Result<()>
[src]
Closes the session.
pub fn run(&self, step: &mut SessionRunArgs) -> Result<()>
[src]
Runs the graph, feeding the inputs and then fetching the outputs requested in the step. Note that the session has interior mutability; this may mutate variables in the graph, and the caller is responsible for handling race conditions.
pub fn device_list(&self) -> Result<Vec<Device>>
[src]
Lists all devices in a session.
Trait Implementations
impl Drop for Session
[src]
impl Sync for Session
[src]
impl Send for Session
[src]
impl Debug for Session
[src]
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,