pub struct ShapeExpr {
pub dims: Vec<String>,
pub dtype: Option<String>,
}Expand description
A tensor shape expression with dimension list and optional dtype.
Fields§
§dims: Vec<String>Dimension expressions, e.g. ["batch", "seq", "config.num_heads * config.head_dim"].
dtype: Option<String>Optional dtype constraint, e.g. "config.compute_dtype" or "f32".
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ShapeExpr
impl<'de> Deserialize<'de> for ShapeExpr
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
Auto Trait Implementations§
impl Freeze for ShapeExpr
impl RefUnwindSafe for ShapeExpr
impl Send for ShapeExpr
impl Sync for ShapeExpr
impl Unpin for ShapeExpr
impl UnsafeUnpin for ShapeExpr
impl UnwindSafe for ShapeExpr
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