Skip to content

Commit

Permalink
block_sigmoid + block_tanh - fix test 'test_simple_positive'
Browse files Browse the repository at this point in the history
  • Loading branch information
yonatankarni committed Jan 11, 2023
1 parent 9b055ee commit 8cc0ff4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/block_sigmoid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ mod tests {
let mut pb = bg.new_port_buffer();

let fb = fb_vec();
assert_epsilon!(slearn2(&mut bg, &fb, &mut pb, true), 2.0);
assert_epsilon!(slearn2(&mut bg, &fb, &mut pb, true), 2.0); // sigmoid doesn't learn
assert_epsilon!(slearn2 (&mut bg, &fb, &mut pb, true), 0.880797);
assert_epsilon!(slearn2 (&mut bg, &fb, &mut pb, true), 0.880797); // sigmoid doesn't learn
}

fn test_simple_negative() {
Expand Down
4 changes: 2 additions & 2 deletions src/block_tanh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ mod tests {
let mut pb = bg.new_port_buffer();

let fb = fb_vec();
assert_epsilon!(slearn2(&mut bg, &fb, &mut pb, true), 2.0);
assert_epsilon!(slearn2(&mut bg, &fb, &mut pb, true), 2.0); // tanh desnt learn
assert_epsilon!(slearn2 (&mut bg, &fb, &mut pb, true), 0.9640276);
assert_epsilon!(slearn2 (&mut bg, &fb, &mut pb, true), 0.9640276); // tanh doesn't learn
}
fn test_simple_negative() {
let mi = model_instance::ModelInstance::new_empty().unwrap();
Expand Down

0 comments on commit 8cc0ff4

Please sign in to comment.