pub struct TensorBatch {
pub tensors: IndexMap<String, TensorValue>,
}Fields§
§tensors: IndexMap<String, TensorValue>Implementations§
Source§impl TensorBatch
impl TensorBatch
pub fn new() -> Self
pub fn insert( &mut self, name: impl Into<String>, value: TensorValue, ) -> Option<TensorValue>
pub fn get(&self, name: &str) -> Option<&TensorValue>
pub fn into_tensors(self) -> IndexMap<String, TensorValue>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for TensorBatch
impl Clone for TensorBatch
Source§fn clone(&self) -> TensorBatch
fn clone(&self) -> TensorBatch
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TensorBatch
impl Debug for TensorBatch
Source§impl Default for TensorBatch
impl Default for TensorBatch
Source§fn default() -> TensorBatch
fn default() -> TensorBatch
Returns the “default value” for a type. Read more
Source§impl PartialEq for TensorBatch
impl PartialEq for TensorBatch
impl StructuralPartialEq for TensorBatch
Auto Trait Implementations§
impl Freeze for TensorBatch
impl RefUnwindSafe for TensorBatch
impl Send for TensorBatch
impl Sync for TensorBatch
impl Unpin for TensorBatch
impl UnsafeUnpin for TensorBatch
impl UnwindSafe for TensorBatch
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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