pub struct IGridSampleLayer { /* private fields */ }Expand description
IGridSampleLayer
A GridSample layer in a network definition.
This layer uses an input tensor and a grid tensor to produce an interpolated output tensor. The input and grid tensors must be shape tensors of rank 4. The only supported SampleMode values are SampleMode::kCLAMP, SampleMode::kFILL, and SampleMode::kREFLECT.
Do not inherit from this class, as doing so will break forward-compatibility of the API and ABI.
Implementations§
Source§impl IGridSampleLayer
impl IGridSampleLayer
Sourcepub fn setInterpolationMode(
self: Pin<&mut IGridSampleLayer>,
mode: InterpolationMode,
)
pub fn setInterpolationMode( self: Pin<&mut IGridSampleLayer>, mode: InterpolationMode, )
Set the grid sample interpolation mode.
See [getInterpolationMode()]
Sourcepub fn getInterpolationMode(self: &IGridSampleLayer) -> InterpolationMode
pub fn getInterpolationMode(self: &IGridSampleLayer) -> InterpolationMode
Get the grid sample interpolation mode.
See [setInterpolationMode()]
The value specified by setInterpolationMode, or InterpolationMode::kLINEAR otherwise.
Sourcepub fn setAlignCorners(self: Pin<&mut IGridSampleLayer>, alignCorners: bool)
pub fn setAlignCorners(self: Pin<&mut IGridSampleLayer>, alignCorners: bool)
Set the align corners mode.
See [getAlignCorners()]
Sourcepub fn getAlignCorners(self: &IGridSampleLayer) -> bool
pub fn getAlignCorners(self: &IGridSampleLayer) -> bool
Get the align corners mode.
See [setAlignCorners()]
The value specified by setAlignCorners(), or false otherwise.
Sourcepub fn setSampleMode(self: Pin<&mut IGridSampleLayer>, mode: SampleMode) -> bool
pub fn setSampleMode(self: Pin<&mut IGridSampleLayer>, mode: SampleMode) -> bool
Set the sample mode.
See [getSampleMode()]
true if layer’s sample mode was set to mode, false otherwise.
Sourcepub fn getSampleMode(self: &IGridSampleLayer) -> SampleMode
pub fn getSampleMode(self: &IGridSampleLayer) -> SampleMode
Get the sample mode.
See [setSampleMode()]
- Returns the value specified by a successful call to setSampleMode(), or SampleMode::kFILL otherwise.