pub struct BoundaryTensorSpec { /* private fields */ }Expand description
Semantic role, symbolic shape, and logical dtype of one boundary tensor.
Implementations§
Source§impl BoundaryTensorSpec
impl BoundaryTensorSpec
Sourcepub fn new(
role: impl Into<String>,
shape: impl IntoIterator<Item = BoundaryTensorDimension>,
dtype: BoundaryTensorDtype,
) -> Self
pub fn new( role: impl Into<String>, shape: impl IntoIterator<Item = BoundaryTensorDimension>, dtype: BoundaryTensorDtype, ) -> Self
Declares one tensor in canonical transport order.
Sourcepub fn primary_activation(hidden_size: i32) -> Self
pub fn primary_activation(hidden_size: i32) -> Self
Declares the standard evolving batch/sequence/hidden activation.
Sourcepub fn shape(&self) -> &[BoundaryTensorDimension]
pub fn shape(&self) -> &[BoundaryTensorDimension]
Returns the symbolic shape.
Sourcepub const fn dtype(&self) -> BoundaryTensorDtype
pub const fn dtype(&self) -> BoundaryTensorDtype
Returns the logical scalar kind.
Trait Implementations§
Source§impl Clone for BoundaryTensorSpec
impl Clone for BoundaryTensorSpec
Source§fn clone(&self) -> BoundaryTensorSpec
fn clone(&self) -> BoundaryTensorSpec
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 BoundaryTensorSpec
impl Debug for BoundaryTensorSpec
impl Eq for BoundaryTensorSpec
Source§impl Hash for BoundaryTensorSpec
impl Hash for BoundaryTensorSpec
Source§impl PartialEq for BoundaryTensorSpec
impl PartialEq for BoundaryTensorSpec
impl StructuralPartialEq for BoundaryTensorSpec
Auto Trait Implementations§
impl Freeze for BoundaryTensorSpec
impl RefUnwindSafe for BoundaryTensorSpec
impl Send for BoundaryTensorSpec
impl Sync for BoundaryTensorSpec
impl Unpin for BoundaryTensorSpec
impl UnsafeUnpin for BoundaryTensorSpec
impl UnwindSafe for BoundaryTensorSpec
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