pub struct ConvTranspose2dLayer { /* private fields */ }Expand description
Transposed 2D convolution layer (NHWC layout).
Kernel shape: [KH, KW, C_out, C_in] (note: reversed from Conv2d).
Implementations§
Source§impl ConvTranspose2dLayer
impl ConvTranspose2dLayer
pub fn new( in_channels: usize, out_channels: usize, kernel_h: usize, kernel_w: usize, stride_h: usize, stride_w: usize, weight: Tensor, bias: Option<Tensor>, ) -> Result<Self, ModelError>
pub fn kernel(&self) -> &Tensor
pub fn stride(&self) -> usize
pub fn weight_node(&self) -> Option<NodeId>
pub fn bias_node(&self) -> Option<NodeId>
pub fn register_params(&mut self, graph: &mut Graph)
pub fn sync_from_graph(&mut self, graph: &Graph) -> Result<(), ModelError>
pub fn forward( &self, graph: &mut Graph, input: NodeId, ) -> Result<NodeId, ModelError>
pub fn forward_inference(&self, input: &Tensor) -> Result<Tensor, ModelError>
Trait Implementations§
Source§impl Clone for ConvTranspose2dLayer
impl Clone for ConvTranspose2dLayer
Source§fn clone(&self) -> ConvTranspose2dLayer
fn clone(&self) -> ConvTranspose2dLayer
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 ConvTranspose2dLayer
impl Debug for ConvTranspose2dLayer
Source§impl PartialEq for ConvTranspose2dLayer
impl PartialEq for ConvTranspose2dLayer
impl StructuralPartialEq for ConvTranspose2dLayer
Auto Trait Implementations§
impl Freeze for ConvTranspose2dLayer
impl RefUnwindSafe for ConvTranspose2dLayer
impl Send for ConvTranspose2dLayer
impl Sync for ConvTranspose2dLayer
impl Unpin for ConvTranspose2dLayer
impl UnsafeUnpin for ConvTranspose2dLayer
impl UnwindSafe for ConvTranspose2dLayer
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