pub struct Conv1d<D: Dtype, IT, OT, const RANK: usize> {
pub in_channels: usize,
pub out_channels: usize,
pub kernel_l: usize,
pub stride: usize,
pub padding: usize,
pub has_bias: bool,
/* private fields */
}Expand description
1-D convolution layer: output = conv1d(input, weight) [+ b]
Input shape: [N, C_in, L_in ]
Output shape: [N, C_out, L_out]
where: L_out = (L_in + 2*padding - kernel_l) / stride + 1
Fields§
§in_channels: usizeNumber of input channels.
out_channels: usizeNumber of output channels.
kernel_l: usizeConvolution kernel length.
stride: usizeStride.
padding: usizeZero-padding applied to both sides of the input.
has_bias: boolWhether to add a learned bias.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<D, IT, OT, const RANK: usize> Freeze for Conv1d<D, IT, OT, RANK>
impl<D, IT, OT, const RANK: usize> RefUnwindSafe for Conv1d<D, IT, OT, RANK>
impl<D, IT, OT, const RANK: usize> Send for Conv1d<D, IT, OT, RANK>
impl<D, IT, OT, const RANK: usize> Sync for Conv1d<D, IT, OT, RANK>
impl<D, IT, OT, const RANK: usize> Unpin for Conv1d<D, IT, OT, RANK>
impl<D, IT, OT, const RANK: usize> UnsafeUnpin for Conv1d<D, IT, OT, RANK>
impl<D, IT, OT, const RANK: usize> UnwindSafe for Conv1d<D, IT, OT, RANK>
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