pub struct Sam3PixelDecoderStepCompiled {
pub out_h: usize,
pub out_w: usize,
/* private fields */
}Expand description
One pixel-decoder layer: upsample prev 2×, add curr, conv3×3, GN, ReLU.
Fields§
§out_h: usize§out_w: usizeImplementations§
Source§impl Sam3PixelDecoderStepCompiled
impl Sam3PixelDecoderStepCompiled
pub fn compile( prev_h: usize, prev_w: usize, out_h: usize, out_w: usize, conv_w: &[f32], conv_b: &[f32], gn_w: &[f32], gn_b: &[f32], device: Device, ) -> Result<Sam3PixelDecoderStepCompiled, Error>
pub fn compile_with_profile( prev_h: usize, prev_w: usize, out_h: usize, out_w: usize, conv_w: &[f32], conv_b: &[f32], gn_w: &[f32], gn_b: &[f32], device: Device, profile: &CompileProfile, ) -> Result<Sam3PixelDecoderStepCompiled, Error>
pub fn run(&mut self, prev: &[f32], curr: &[f32]) -> Result<Vec<f32>, Error>
Auto Trait Implementations§
impl !RefUnwindSafe for Sam3PixelDecoderStepCompiled
impl !Sync for Sam3PixelDecoderStepCompiled
impl !UnwindSafe for Sam3PixelDecoderStepCompiled
impl Freeze for Sam3PixelDecoderStepCompiled
impl Send for Sam3PixelDecoderStepCompiled
impl Unpin for Sam3PixelDecoderStepCompiled
impl UnsafeUnpin for Sam3PixelDecoderStepCompiled
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more