[][src]Struct tract_hir::ops::cnn::PoolSpec

pub struct PoolSpec {
    pub data_format: DataFormat,
    pub kernel_shape: SmallVec<[usize; 4]>,
    pub padding: PaddingSpec,
    pub dilations: Option<SmallVec<[usize; 4]>>,
    pub strides: Option<SmallVec<[usize; 4]>>,
    pub output_channel_override: Option<usize>,
}

Fields

data_format: DataFormatkernel_shape: SmallVec<[usize; 4]>padding: PaddingSpecdilations: Option<SmallVec<[usize; 4]>>strides: Option<SmallVec<[usize; 4]>>output_channel_override: Option<usize>

Implementations

impl PoolSpec[src]

pub fn info(&self) -> Vec<String>

Notable traits for Vec<u8>

impl Write for Vec<u8>
[src]

pub fn rank(&self) -> usize[src]

pub fn dilation(&self, geo_axis: usize) -> usize[src]

pub fn dilations(&self) -> Cow<'_, [usize]>[src]

pub fn stride(&self, geo_axis: usize) -> usize[src]

pub fn strides(&self) -> Cow<'_, [usize]>[src]

pub fn compute_geo(
    &self,
    input_full_shape: &[usize]
) -> Result<(BaseDataShape<usize, SmallVec<[usize; 4]>>, Patch, BaseDataShape<usize, SmallVec<[usize; 4]>>), TractError>
[src]

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, TractError>
[src]

pub fn pulsify(
    &self,
    _source: &Graph<TypedFact, Box<dyn TypedOp + 'static>>,
    node: &BaseNode<TypedFact, Box<dyn TypedOp + 'static>>,
    target: &mut Graph<PulsedFact, Box<dyn PulsedOp + 'static>>,
    mapping: &HashMap<OutletId, OutletId, RandomState>,
    padding_value: Option<Tensor>
) -> Result<(OutletId, PoolSpec), TractError>
[src]

pub fn dispose_n_axis(&self) -> PoolSpec[src]

pub fn pulsed_output_facts(
    &self,
    inputs: &[&PulsedFact]
) -> Result<SmallVec<[PulsedFact; 4]>, TractError>
[src]

impl PoolSpec[src]

pub fn new(
    data_format: DataFormat,
    kernel_shape: SmallVec<[usize; 4]>,
    padding: PaddingSpec,
    dilations: Option<SmallVec<[usize; 4]>>,
    strides: Option<SmallVec<[usize; 4]>>,
    output_channel_override: Option<usize>
) -> PoolSpec
[src]

Constructs a new PoolSpec.

Trait Implementations

impl Clone for PoolSpec[src]

impl Debug for PoolSpec[src]

impl Default for PoolSpec[src]

impl Hash for PoolSpec[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> DynClone for T where
    T: Clone
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.