[][src]Struct auto_diff::op::convolution::Conv2d

pub struct Conv2d { /* fields omitted */ }

Implementations

impl Conv2d[src]

pub fn new(
    in_channels: usize,
    out_channels: usize,
    kernel_size: (usize, usize),
    stride: (usize, usize),
    padding: (usize, usize),
    dilation: (usize, usize),
    bias: bool,
    padding_mode: PaddingMode
) -> Conv2d
[src]

Trait Implementations

impl OpTrait for Conv2d[src]

fn apply(&mut self, input: &[&Tensor], output: &[&Tensor])[src]

Forward pass

fn grad(
    &self,
    input: &[&Tensor],
    output_grad: &[&Tensor],
    input_grad: &[&Tensor]
)
[src]

Given the forward input value and backward output_grad, Update weight gradient. return backward input gradeint.

fn get_values(&self) -> Vec<&Tensor>[src]

access weight values

fn get_grads(&self) -> Vec<&Tensor>[src]

access gradient values

Auto Trait Implementations

impl !RefUnwindSafe for Conv2d

impl !Send for Conv2d

impl !Sync for Conv2d

impl Unpin for Conv2d

impl !UnwindSafe for Conv2d

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,