pub struct Conv2dBuilder {
pub input_channels: i32,
pub output_channels: i32,
pub kernel_size: SingleOrPair<i32>,
pub bias: bool,
pub padding: SingleOrPair<i32>,
pub stride: SingleOrPair<i32>,
}
Expand description
Builder for the Conv2d
module.
Fields§
§input_channels: i32
Number of input channels.
output_channels: i32
Number of output channels.
kernel_size: SingleOrPair<i32>
Size of the convolution filters.
bias: bool
If true
, add a learnable bias to the output. Default to Conv2d::DEFAULT_BIAS
if not
specified.
padding: SingleOrPair<i32>
Padding. Default to Conv2d::DEFAULT_PADDING
if not specified.
stride: SingleOrPair<i32>
Stride. Default to Conv2d::DEFAULT_STRIDE
if not specified.
Implementations§
Source§impl Conv2dBuilder
impl Conv2dBuilder
Sourcepub fn new(
input_channels: impl Into<i32>,
output_channels: impl Into<i32>,
kernel_size: impl Into<SingleOrPair<i32>>,
) -> Self
pub fn new( input_channels: impl Into<i32>, output_channels: impl Into<i32>, kernel_size: impl Into<SingleOrPair<i32>>, ) -> Self
Creates a new Conv2dBuilder
.
Source§impl Conv2dBuilder
impl Conv2dBuilder
Trait Implementations§
Source§impl Builder<Conv2d> for Conv2dBuilder
impl Builder<Conv2d> for Conv2dBuilder
Source§impl Clone for Conv2dBuilder
impl Clone for Conv2dBuilder
Source§fn clone(&self) -> Conv2dBuilder
fn clone(&self) -> Conv2dBuilder
Returns a copy 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 moreAuto Trait Implementations§
impl Freeze for Conv2dBuilder
impl RefUnwindSafe for Conv2dBuilder
impl Send for Conv2dBuilder
impl Sync for Conv2dBuilder
impl Unpin for Conv2dBuilder
impl UnwindSafe for Conv2dBuilder
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 moreSource§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Convert into an
Option
.