[][src]Struct neuro::layers::Conv2D

pub struct Conv2D { /* fields omitted */ }

Defines a 2D convolution layer.

Methods

impl Conv2D[src]

pub fn new(
    num_filters: u64,
    kernel_size: (u64, u64),
    stride: (u64, u64),
    padding: Padding
) -> Box<Conv2D>
[src]

Creates a 2D convolution layer with the given parameters.

By default, a ReLU activation is used and the parameters of the kernels are initialized using a HeNormal initializer and the biases of the layer a Zeros initializer.

Arguments

  • num_filters - The number of filters in the layer.
  • kernel_size - The height and width of the convolution kernels.
  • stride - The vertical and horizontal stride used for the convolution.
  • padding - The padding used for the convolution. Must be a variant of Padding.

pub fn with_param(
    num_filters: u64,
    kernel_size: (u64, u64),
    stride: (u64, u64),
    padding: Padding,
    activation: Activation,
    weights_initializer: Initializer,
    biases_initializer: Initializer
) -> Box<Conv2D>
[src]

Creates a 2D convolution layer with the given parameters.

By default, the parameters of the kernels are initialized using a HeUniform initializer and the biases of the layer a Zeros initializer.

Arguments

  • num_filters - The number of filters in the layer.
  • kernel_size - The height and width of the convolution kernels.
  • stride - The vertical and horizontal stride used for the convolution.
  • padding - The padding used for the convolution. Must be a variant of Padding.
  • activation - The activation function used by the layer.
  • weights_initializer - The initializer used to initialize the weights of the layer.
  • biases_initializer - The initializer used to initialize the biases of the layer.

Trait Implementations

impl Display for Conv2D[src]

impl Layer for Conv2D[src]

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> SetParameter for T

impl<T> ToString for T where
    T: Display + ?Sized
[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>,