Skip to content

Commit

Permalink
Add more inputs to test
Browse files Browse the repository at this point in the history
  • Loading branch information
BradenEverson committed Feb 12, 2024
1 parent 94ea0c0 commit 3a486d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ async fn main() {
println!("Done Generating MNIST");

outputs = to_categorical(outputs_uncat);
for i in 0..600{
for i in 0..3000{
inputs.push(&inputs_undyn[i]);
true_outputs.push(outputs[i].clone());
}
loop{
let mut network = Network::new(128);

network.set_input(InputTypes::DENSE(784));
network.add_layer(LayerTypes::DENSE(256, Activations::RELU, 0.001));
network.add_layer(LayerTypes::DENSE(64, Activations::RELU, 0.001));
network.add_layer(LayerTypes::DENSE(32, Activations::RELU, 0.001));
network.add_layer(LayerTypes::DENSE(10, Activations::SOFTMAX, 0.001));

//network.set_log(false);

network.compile();

network.fit(&inputs, &true_outputs, 5, ErrorTypes::CategoricalCrossEntropy);
network.fit(&inputs, &true_outputs, 1, ErrorTypes::CategoricalCrossEntropy);
for i in 0..10{
println!("predicted: {:?} \n\n actual: {:?}\n", network.predict(inputs[i]), true_outputs[i]);
}
Expand Down

0 comments on commit 3a486d4

Please sign in to comment.