Struct TensorShape
pub struct TensorShape { /* private fields */ }Implementations§
§impl TensorShape
impl TensorShape
pub fn new(dims: impl Into<Vec<usize>>) -> Result<TensorShape, TensorShapeError>
pub fn scalar() -> TensorShape
pub fn rank(&self) -> usize
pub fn dims(&self) -> &[usize]
pub fn num_elements(&self) -> Option<usize>
pub fn is_scalar(&self) -> bool
pub fn is_vector(&self) -> bool
pub fn is_matrix(&self) -> bool
Trait Implementations§
§impl Clone for TensorShape
impl Clone for TensorShape
§fn clone(&self) -> TensorShape
fn clone(&self) -> TensorShape
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for TensorShape
impl Debug for TensorShape
§impl Hash for TensorShape
impl Hash for TensorShape
§impl Ord for TensorShape
impl Ord for TensorShape
§impl PartialEq for TensorShape
impl PartialEq for TensorShape
§impl PartialOrd for TensorShape
impl PartialOrd for TensorShape
impl Eq for TensorShape
impl StructuralPartialEq for TensorShape
Auto Trait Implementations§
impl Freeze for TensorShape
impl RefUnwindSafe for TensorShape
impl Send for TensorShape
impl Sync for TensorShape
impl Unpin for TensorShape
impl UnsafeUnpin for TensorShape
impl UnwindSafe for TensorShape
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