pub mod dense;
pub mod activation;
pub use activation::*;
pub use crate::tensor::*;
pub use crate::tensor::error::ShapeMismatchError;
pub type Result<T> = std::result::Result<T, ShapeMismatchError>;
pub trait Layer<T: NumT> {
fn get_activation(&self) -> Activation<T>;
fn get_input_shape(&self) -> Shape;
fn get_output_shape(&self) -> Shape;
fn get_weight_count(&self) -> usize;
fn forward_propagate(&self, input: &Tensor<T>, activate: bool) -> Result<Tensor<T>>;
fn activate(&self, output: &Tensor<T>) -> Result<Tensor<T>>;
fn backpropagate_delta(&self, delta: &Tensor<T>, z_lst: &Tensor<T>, sigma_lst: &Activation<T>) -> Result<Tensor<T>>;
fn add_weight_delta_to(&self, delta: &Tensor<T>, a_lst: &Tensor<T>, cum_dw: &mut Vec<T>, cum_db: &mut Tensor<T>) -> Result<()>;
fn descend(&mut self, rate: T, dw: &Vec<T>, db: &Tensor<T>) -> Result<()>;
}