Skip to content

Commit

Permalink
- test_memory_management.py : print NRMSE obtained with test_memory_m…
Browse files Browse the repository at this point in the history
…anagement_input_recreation_random_200neurons_ridge1000_32bits to see the difference in Travis CI.
  • Loading branch information
nschaetti committed Jun 29, 2020
1 parent d9544d2 commit d038357
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions test/test_memory_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def memory_management(self, data_dir, expected_NRMSEs, reservoir_size=100, spect
ridge_param_wout=0.01, aperture=1000, places=3, value_test_divider=1.0,
torch_seed=1, np_seed=1, interpolation_rate=20, conceptor_test_length=200,
signal_plot_length=20, loading_method=ecnc.SPESNCell.INPUTS_SIMULATION,
use_matlab_params=True, dtype=torch.float64):
use_matlab_params=True, dtype=torch.float64, print_debug=False):
"""
Memory management
"""
Expand Down Expand Up @@ -589,6 +589,12 @@ def memory_management(self, data_dir, expected_NRMSEs, reservoir_size=100, spect
interpolation_rate
)

# Print results ?
if print_debug:
print("NRMSE aligned : {}".format(NRMSE_aligned / value_test_divider))
print("Expected NRMSE : {}".format(expected_NRMSEs[p] / value_test_divider))
# end if

# Check NRMSE
self.assertAlmostEqual(NRMSE_aligned / value_test_divider, expected_NRMSEs[p] / value_test_divider, places)
# end for
Expand Down Expand Up @@ -884,7 +890,7 @@ def test_memory_management_input_recreation_random_200neurons_ridge1000_32bits(s
loading_method=ecnc.SPESNCell.INPUTS_RECREATION,
dtype=torch.float32,
places=1,
value_test_divider=100.0,
value_test_divider=1.0,
torch_seed=5,
np_seed=5,
expected_NRMSEs=[
Expand All @@ -904,7 +910,8 @@ def test_memory_management_input_recreation_random_200neurons_ridge1000_32bits(s
1.0386132437866693,
1.7007420519130423,
1.241360755120375
]
],
print_debug=True
)
# end test_memory_management_random_200neurons

Expand Down

0 comments on commit d038357

Please sign in to comment.