Struct alumina::shape::NodeShape
[−]
[src]
pub struct NodeShape { pub channels: usize, pub spatial_dimensions: SmallVec<[Dimension; 4]>, }
Fields
channels: usize
spatial_dimensions: SmallVec<[Dimension; 4]>
Methods
impl NodeShape
[src]
fn new(channels: usize, higher_dims: &[usize]) -> NodeShape
fn new_flex(channels: usize, num_higher_dims: usize) -> NodeShape
Creates a new NodeShape, with higher timensions to be determined at runtime
fn new_flat(size: usize) -> NodeShape
fn collapse_ranges_to_minimum(&mut self) -> Result<(), ShapeError>
Should be called and only called by operations prior to propagating shape constraints The higher dimension ranges are collapsed to the lower bound, and all None entries are replaced with the range 0:0
fn flat_size(&self) -> Dimension
fn force_flat_size(&self) -> Result<usize, ShapeError>
fn to_data_shape(&self, n: usize) -> Result<DataShape, ShapeError>
If range upper != lower, lowe will be used.
fn is_fixed(&self) -> bool
fn rank(&self) -> usize
fn merge(&self, other: &NodeShape) -> Result<NodeShape, ShapeError>
Trait Implementations
impl Clone for NodeShape
[src]
fn clone(&self) -> NodeShape
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more