mod elu;
mod leaky_relu;
mod relu;
mod selu;
mod sigmoid;
mod softmax;
mod tanh;
pub use elu::*;
pub use leaky_relu::*;
pub use relu::*;
pub use selu::*;
pub use sigmoid::*;
pub use softmax::*;
use std::any::Any;
pub use tanh::*;
use crate::linalg::Matrix;
use crate::Float;
pub trait Function<T: Float>: Any {
fn name(&self) -> String;
fn call(&self, matrix: Matrix<T>) -> Matrix<T>;
fn derivative(&self, matrix: Matrix<T>) -> Matrix<T>;
fn is_linear(&self) -> bool {
false
}
fn get_data(&self) -> Option<Matrix<T>> {
None
}
fn set_data(&mut self, _data: Matrix<T>) {}
fn get_weights(&self) -> Option<Matrix<T>> {
None
}
fn get_bias(&self) -> Option<Matrix<T>> {
None
}
fn is_bias(&self) -> bool {false}
}