use smyl::prelude::*;

fn main() {
    let mut ann = ann!(4, 6, 4);

    let input = mat!(1.0 0.0 1.0 0.5);
    let expected = mat!(1.0 0.0 0.0 0.0);
    let batch = 100;
    let learning_rate = 0.01;

    for i in 0..10000 {
        let output = ann.forward(input.clone());
        ann.backward(expected.clone());

        if i % batch == 0 {
            ann.apply_chunk_gradient(learning_rate * f64::from(batch));

            println!("{output:?}");
        }
    }
}
