concision_neural/layers/types/
aliases.rs

1/*
2    appellation: aliases <module>
3    authors: @FL03
4*/
5#[cfg(feature = "alloc")]
6use crate::layers::Activator;
7use crate::layers::{LayerBase, Linear, ReLU, Sigmoid, Tanh};
8#[cfg(feature = "alloc")]
9use alloc::boxed::Box;
10
11#[cfg(feature = "alloc")]
12/// A type alias for a [`LayerBase`] configured with a dynamic [`Activator`].
13pub type LayerDyn<A, S, D> = LayerBase<Box<dyn Activator<A, Output = A> + 'static>, S, D>;
14
15/// A type alias for a [`LayerBase`] configured with a [`Linear`] activation function.
16pub type LinearLayer<S, D> = LayerBase<Linear, S, D>;
17/// A type alias for a [`LayerBase`] configured with a [`Sigmoid`] activation function.
18pub type SigmoidLayer<S, D> = LayerBase<Sigmoid, S, D>;
19/// A type alias for a [`LayerBase`] configured with a [`Tanh`] activation function.
20pub type TanhLayer<S, D> = LayerBase<Tanh, S, D>;
21/// A type alias for a [`LayerBase`] configured with a [`ReLU`] activation function.
22pub type ReluLayer<S, D> = LayerBase<ReLU, S, D>;