[−][src]Struct neuro::layers::Conv2D
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]
num_filters: u64,
kernel_size: (u64, u64),
stride: (u64, u64),
padding: Padding
) -> Box<Conv2D>
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]
num_filters: u64,
kernel_size: (u64, u64),
stride: (u64, u64),
padding: Padding,
activation: Activation,
weights_initializer: Initializer,
biases_initializer: Initializer
) -> Box<Conv2D>
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]
fn name(&self) -> &str
[src]
fn initialize_parameters(&mut self, input_shape: Dim4)
[src]
fn compute_activation(&self, input: &Tensor) -> Tensor
[src]
fn compute_activation_mut(&mut self, input: &Tensor) -> Tensor
[src]
fn compute_dactivation_mut(&mut self, input: &Tensor) -> Tensor
[src]
fn output_shape(&self) -> Dim4
[src]
fn parameters(&self) -> Option<Vec<&Tensor>>
[src]
fn parameters_mut(&mut self) -> Option<(Vec<&mut Tensor>, Vec<&Tensor>)>
[src]
fn save(&self, group: &Group, layer_number: usize) -> Result<(), Error>
[src]
fn set_regularizer(&mut self, regularizer: Option<Regularizer>)
[src]
fn print(&self)
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,