pub struct TensorCatalog { /* private fields */ }Expand description
Validated name-indexed tensor catalog.
Implementations§
Source§impl TensorCatalog
impl TensorCatalog
Sourcepub fn new(
tensors: impl IntoIterator<Item = TensorDescriptor>,
) -> Result<Self, CatalogError>
pub fn new( tensors: impl IntoIterator<Item = TensorDescriptor>, ) -> Result<Self, CatalogError>
Validates unique names and non-zero dimensions. An empty shape is a valid rank-zero scalar with one element.
Sourcepub fn get(&self, name: &str) -> Option<&TensorDescriptor>
pub fn get(&self, name: &str) -> Option<&TensorDescriptor>
Looks up a descriptor by canonical name.
Sourcepub fn descriptors(&self) -> impl Iterator<Item = &TensorDescriptor>
pub fn descriptors(&self) -> impl Iterator<Item = &TensorDescriptor>
Iterates over descriptors in deterministic name order.
Trait Implementations§
Source§impl Clone for TensorCatalog
impl Clone for TensorCatalog
Source§fn clone(&self) -> TensorCatalog
fn clone(&self) -> TensorCatalog
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 TensorCatalog
impl Debug for TensorCatalog
Source§impl<'de> Deserialize<'de> for TensorCatalog
impl<'de> Deserialize<'de> for TensorCatalog
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TensorCatalog
Source§impl PartialEq for TensorCatalog
impl PartialEq for TensorCatalog
Source§impl Serialize for TensorCatalog
impl Serialize for TensorCatalog
impl StructuralPartialEq for TensorCatalog
Auto Trait Implementations§
impl Freeze for TensorCatalog
impl RefUnwindSafe for TensorCatalog
impl Send for TensorCatalog
impl Sync for TensorCatalog
impl Unpin for TensorCatalog
impl UnsafeUnpin for TensorCatalog
impl UnwindSafe for TensorCatalog
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