From 8cc0ff4eb77ad1ccc291441b5fb93fd146cf6c75 Mon Sep 17 00:00:00 2001 From: ykarni Date: Mon, 9 Jan 2023 12:01:32 +0200 Subject: [PATCH] block_sigmoid + block_tanh - fix test 'test_simple_positive' --- src/block_sigmoid.rs | 4 ++-- src/block_tanh.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/block_sigmoid.rs b/src/block_sigmoid.rs index 88cb35c2..68124ef5 100644 --- a/src/block_sigmoid.rs +++ b/src/block_sigmoid.rs @@ -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() { diff --git a/src/block_tanh.rs b/src/block_tanh.rs index 05ef9e89..3035757d 100644 --- a/src/block_tanh.rs +++ b/src/block_tanh.rs @@ -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();