pub struct UpsampleLayer { /* private fields */ }Expand description
Upsample layer: nearest or bilinear upsampling.
Implementations§
Source§impl UpsampleLayer
impl UpsampleLayer
pub fn new(scale_factor: usize, bilinear: bool) -> Self
pub fn scale_factor(&self) -> usize
pub fn is_bilinear(&self) -> bool
pub fn forward_inference(&self, input: &Tensor) -> Result<Tensor, ModelError>
pub fn forward( &self, graph: &mut Graph, input: NodeId, ) -> Result<NodeId, ModelError>
Trait Implementations§
Source§impl Clone for UpsampleLayer
impl Clone for UpsampleLayer
Source§fn clone(&self) -> UpsampleLayer
fn clone(&self) -> UpsampleLayer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UpsampleLayer
impl Debug for UpsampleLayer
Source§impl PartialEq for UpsampleLayer
impl PartialEq for UpsampleLayer
impl Copy for UpsampleLayer
impl StructuralPartialEq for UpsampleLayer
Auto Trait Implementations§
impl Freeze for UpsampleLayer
impl RefUnwindSafe for UpsampleLayer
impl Send for UpsampleLayer
impl Sync for UpsampleLayer
impl Unpin for UpsampleLayer
impl UnsafeUnpin for UpsampleLayer
impl UnwindSafe for UpsampleLayer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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