Struct tract_pulse::internal::tract_core::ops::cnn::Patch[]

pub struct Patch {
    pub spec: PatchSpec,
    pub pad_before: SmallVec<[usize; 4]>,
    pub pad_after: SmallVec<[usize; 4]>,
    pub padded: bool,
    pub output_shape: SmallVec<[usize; 4]>,
    pub data_field: ArrayBase<OwnedRepr<isize>, Dim<[usize; 2]>>,
    pub data_field_min_max: SmallVec<[(isize, isize); 4]>,
    pub standard_layout_data_field: Vec<isize, Global>,
    pub op_strides_times_input_storage_strides: SmallVec<[isize; 4]>,
    pub valid_output_zone: SmallVec<[Range<usize>; 4]>,
    pub invalid_output_zones: SmallVec<[SmallVec<[Range<usize>; 4]>; 4]>,
    pub zones: Vec<Zone, Global>,
    pub valid_zone: Option<usize>,
    pub zone_strides: SmallVec<[isize; 4]>,
    pub input_layout_strides: SmallVec<[isize; 4]>,
}

Fields

spec: PatchSpecpad_before: SmallVec<[usize; 4]>pad_after: SmallVec<[usize; 4]>padded: booloutput_shape: SmallVec<[usize; 4]>data_field: ArrayBase<OwnedRepr<isize>, Dim<[usize; 2]>>data_field_min_max: SmallVec<[(isize, isize); 4]>standard_layout_data_field: Vec<isize, Global>op_strides_times_input_storage_strides: SmallVec<[isize; 4]>valid_output_zone: SmallVec<[Range<usize>; 4]>invalid_output_zones: SmallVec<[SmallVec<[Range<usize>; 4]>; 4]>zones: Vec<Zone, Global>valid_zone: Option<usize>zone_strides: SmallVec<[isize; 4]>input_layout_strides: SmallVec<[isize; 4]>

Implementations

impl Patch

pub fn rank(&self) -> usize

pub fn visit_output(&self, acceptor: impl FnMut(&Scanner<'_>))

pub fn centers_offsets(&self) -> Vec<isize, Global>

Notable traits for Vec<u8, A>

impl<A> Write for Vec<u8, A> where
    A: Allocator

pub fn at(&'p self, coords: &[usize]) -> PatchIterator<'p>

pub fn at_hint(
    &'p self,
    coords: &[usize],
    hint: Option<bool>
) -> PatchIterator<'p>

pub fn global_offset_for(&self, coords: &[usize], patch_index: usize) -> usize

Trait Implementations

impl Clone for Patch

impl Debug for Patch

impl Hash for Patch

impl PartialEq<Patch> for Patch

impl StructuralPartialEq for Patch

Auto Trait Implementations

impl RefUnwindSafe for Patch

impl Send for Patch

impl Sync for Patch

impl Unpin for Patch

impl UnwindSafe for Patch

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
[src]

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

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.