pub struct DefaultSession { /* private fields */ }Expand description
Default session implementation
Implementations§
Source§impl DefaultSession
impl DefaultSession
Sourcepub fn new(
graph: Arc<RwLock<Graph>>,
config: SessionConfig,
op_registry: Arc<OpRegistry>,
) -> Self
pub fn new( graph: Arc<RwLock<Graph>>, config: SessionConfig, op_registry: Arc<OpRegistry>, ) -> Self
Create a new session with the given graph and configuration
Trait Implementations§
Source§impl Session for DefaultSession
impl Session for DefaultSession
Source§fn run(
&mut self,
fetches: &[FetchSpec],
feed_dict: &FeedDict,
) -> Result<Vec<Tensor<f32>>, TensorError>
fn run( &mut self, fetches: &[FetchSpec], feed_dict: &FeedDict, ) -> Result<Vec<Tensor<f32>>, TensorError>
Run the graph with the given feeds and fetches
Source§fn partial_run_setup(
&mut self,
feeds: &[String],
fetches: &[FetchSpec],
targets: &[String],
) -> Result<String, TensorError>
fn partial_run_setup( &mut self, feeds: &[String], fetches: &[FetchSpec], targets: &[String], ) -> Result<String, TensorError>
Partial run - allows incrementally feeding inputs and fetching outputs
Auto Trait Implementations§
impl Freeze for DefaultSession
impl RefUnwindSafe for DefaultSession
impl Send for DefaultSession
impl Sync for DefaultSession
impl Unpin for DefaultSession
impl UnsafeUnpin for DefaultSession
impl UnwindSafe for DefaultSession
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more