[−][src]Struct pyrus_nn::network::Sequential
Fields
lr: f32
n_epoch: usize
batch_size: usize
cost: CostFunc
verbose: bool
Methods
impl Sequential
[src]
pub fn new(lr: f32, n_epoch: usize, batch_size: usize, cost: CostFunc) -> Self
[src]
Create a new Sequential
network, with perhaps sensible defaults.
pub fn add(&mut self, layer: impl Layer + 'static) -> Result<(), &'static str>
[src]
Add a layer to the network
pub fn len(&self) -> usize
[src]
Determine how many layers on held in the network
pub fn predict(&mut self, x: ArrayView2<f32>) -> Array2<f32>
[src]
Use the network to predict the outcome of x
pub fn forward(&mut self, x: ArrayView2<f32>) -> Array2<f32>
[src]
Apply the network against an input
pub fn backward(&mut self, output: ArrayView2<f32>, expected: ArrayView2<f32>)
[src]
Run back propagation on output vs expected
pub fn fit(&mut self, x: ArrayView2<f32>, y: ArrayView2<f32>)
[src]
Train the network according to the parameters set given training and target data
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut Box<dyn Layer>>
[src]
Mutably iterate over the layers in the network.
pub fn iter(&self) -> impl Iterator<Item = &Box<dyn Layer>>
[src]
Iterate over the layers in the network.
Trait Implementations
impl Default for Sequential
[src]
fn default() -> Sequential
[src]
impl<'de> Deserialize<'de> for Sequential
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for Sequential
[src]
Auto Trait Implementations
impl !Send for Sequential
impl !Sync for Sequential
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto 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<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> Serialize for T where
T: Serialize + ?Sized,
[src]
T: Serialize + ?Sized,