Skip to content

Commit 708a35b

Browse files
test(api): add demo instructions to test the mlp api
1 parent 3d0f91c commit 708a35b

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

  • try1 (OOP Approach)/rust/src
Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
mod mlp;
22
fn main() {
3-
let layer = mlp::Layer::new(65000, 20);
4-
layer.show_neurons();
3+
let mut layers: Vec<u16> = Vec::new();
4+
let mut inputs: Vec<f32> = Vec::new();
5+
layers.push(40);
6+
layers.push(20);
7+
inputs.push(0.12);
8+
inputs.push(0.42);
9+
inputs.push(0.11);
10+
let mut mlp = mlp::Mlp::new(10, &layers, 0.03);
11+
mlp.describe();
12+
mlp.feed_forward(&inputs);
513
}

0 commit comments

Comments
 (0)