@@ -64,7 +64,7 @@ Real64 BenchmarkHotgym::run(UInt EPOCHS, bool useSPlocal, bool useSPglobal, bool
6464 SpatialPooler spLocal (enc.dimensions , vector<UInt>{COLS}); // Spatial pooler with local inh
6565 spGlobal.setGlobalInhibition (true );
6666 spLocal.setGlobalInhibition (false );
67- Random rnd (1 ); // uses fixed seed for deterministic output checks
67+ Random rnd (42 ); // uses fixed seed for deterministic output checks
6868
6969 TemporalMemory tm (vector<UInt>{COLS}, CELLS);
7070
@@ -166,29 +166,29 @@ Real64 BenchmarkHotgym::run(UInt EPOCHS, bool useSPlocal, bool useSPglobal, bool
166166 // check deterministic SP, TM output
167167 SDR goldEnc ({DIM_INPUT});
168168 const SDR_sparse_t deterministicEnc{
169- 0 , 4 , 13 , 21 , 24 , 30 , 32 , 37 , 40 , 46 , 47 , 48 , 50 , 51 , 64 , 68 , 79 , 81 , 89 , 97 , 99 , 114 , 120 , 135 , 136 , 140 , 141 , 143 , 144 , 147 , 151 , 155 , 161 , 162 , 164 , 165 , 169 , 172 , 174 , 179 , 181 , 192 , 201 , 204 , 205 , 210 , 213 , 226 , 237 , 242 , 247 , 249 , 254 , 255 , 262 , 268 , 271 , 282 , 283 , 295 , 302 , 306 , 307 , 317 , 330 , 349 , 353 , 366 , 368 , 380 , 393 , 399 , 404 , 409 , 410 , 420 , 422 , 441 ,446 , 447 , 456 , 458 , 464 , 468 , 476 , 497 , 499 , 512 , 521 , 528 , 531 , 534 , 538 , 539 , 541 , 545 , 550 , 557 , 562 , 565 , 575 , 581 , 589 , 592 , 599 , 613 , 617 , 622 , 647 , 652 , 686 , 687 , 691 , 699 , 704 , 710 , 713 , 716 , 722 , 729 , 736 , 740 , 747 , 749 , 753 , 754 , 758 , 766 , 778 , 790 , 791 , 797 , 800 , 808 , 809 , 812 , 815 , 826 , 828 , 830 , 837 , 838 , 852 , 853 , 856 , 863 , 864 , 873 , 878 , 882 , 885 , 893 , 894 , 895 , 905 , 906 , 914 , 915 , 920 , 924 , 927 , 937 , 939 , 944 , 947 , 951 , 954 , 956 , 967 , 968 , 969 , 973 , 975 , 976 , 981 , 991 , 998
169+ 0 , 4 , 13 , 21 , 24 , 30 , 32 , 37 , 40 , 46 , 47 , 48 , 50 , 51 , 64 , 68 , 79 , 81 , 89 , 97 , 99 , 114 , 120 , 135 , 136 , 140 , 141 , 143 , 144 , 147 , 151 , 155 , 161 , 162 , 164 , 165 , 169 , 172 , 174 , 179 , 181 , 192 , 201 , 204 , 205 , 210 , 213 , 226 , 227 , 237 , 242 , 247 , 249 , 254 , 255 , 262 , 268 , 271 , 282 , 283 , 295 , 302 , 306 , 307 , 317 , 330 , 349 , 353 , 366 , 380 , 383 , 393 , 404 , 409 , 410 , 420 , 422 , 441 ,446 , 447 , 456 , 458 , 464 , 468 , 476 , 497 , 499 , 512 , 521 , 528 , 531 , 534 , 538 , 539 , 541 , 545 , 550 , 557 , 562 , 565 , 575 , 581 , 589 , 592 , 599 , 613 , 617 , 622 , 647 , 652 , 686 , 687 , 691 , 699 , 704 , 710 , 713 , 716 , 722 , 729 , 736 , 740 , 747 , 749 , 753 , 754 , 758 , 766 , 778 , 790 , 791 , 797 , 800 , 808 , 809 , 812 , 815 , 826 , 828 , 830 , 837 , 852 , 853 , 856 , 863 , 864 , 873 , 878 , 882 , 885 , 893 , 894 , 895 , 905 , 906 , 914 , 915 , 920 , 924 , 927 , 937 , 939 , 944 , 947 , 951 , 954 , 956 , 967 , 968 , 969 , 973 , 975 , 976 , 979 , 981 , 991 , 998
170170 };
171171 goldEnc.setSparse (deterministicEnc);
172172
173173 SDR goldSP ({COLS});
174174 const SDR_sparse_t deterministicSP{
175- 72 , 75 , 284 , 303 , 305 , 317 , 329 , 525 , 1095 , 2027
175+ 72 , 308 , 337 , 1512 , 1518 , 1956 , 1965 , 1975 , 1994 , 2008
176176 };
177177 goldSP.setSparse (deterministicSP);
178178
179179 SDR goldSPlocal ({COLS});
180180 const SDR_sparse_t deterministicSPlocal{
181- 6, 12, 26, 57, 63, 72, 75, 76, 77, 80, 82, 103, 105, 124, 135, 154, 171, 174, 175, 185, 192, 193, 195, 198, 263, 284, 296, 302, 303, 305, 313, 317, 319, 320, 356, 363, 364, 401, 403, 404, 410, 413, 425, 426, 428, 449, 491, 496, 511, 515, 516, 518, 520, 525, 529, 536, 550, 556, 574, 583, 592, 597, 598, 603, 609, 622, 626, 636, 645, 652, 704, 706, 722, 726, 727, 728, 729, 747, 751, 766, 779, 808, 833, 837, 838, 840, 848, 850, 853, 860, 908, 912, 918, 919, 923, 927, 929, 930, 931, 932, 970, 989, 1006, 1038, 1066, 1082, 1085, 1087, 1092, 1094, 1095, 1113, 1115, 1125, 1128, 1174, 1179, 1180, 1182, 1185, 1205, 1206, 1232, 1236, 1238, 1239, 1240, 1245, 1271, 1292, 1295, 1300, 1303, 1307, 1311, 1319, 1320, 1322, 1382, 1401, 1412, 1415, 1421, 1426, 1431, 1434, 1438, 1470, 1474, 1492, 1501, 1511, 1521, 1524, 1525, 1530, 1532, 1537, 1540, 1600, 1617, 1620, 1622, 1632, 1638, 1641, 1667, 1672, 1680, 1684, 1686, 1690, 1699, 1702, 1742, 1744, 1745, 1746, 1765, 1770, 1774, 1801, 1807, 1808, 1816, 1830, 1834, 1849, 1861, 1867, 1871, 1882, 1902, 1907, 1943, 1945, 1955, 1956, 1966, 1968, 1969, 1971, 1986, 2018, 2025, 2027
181+ 12, 17, 36, 39, 62, 71, 72, 74, 75, 82, 83, 85, 93, 102, 131, 147, 171, 179, 186, 188, 189, 192, 194, 201, 260, 263, 277, 287, 298, 308, 319, 322, 323, 326, 334, 337, 340, 355, 365, 407, 422, 423, 425, 427, 429, 432, 434, 443, 445, 493, 494, 498, 502, 508, 513, 523, 534, 540, 542, 554, 559, 580, 585, 586, 610, 611, 612, 629, 631, 637, 644, 645, 646, 647, 691, 697, 698, 702, 703, 707, 709, 746, 749, 767, 806, 809, 810, 811, 825, 832, 833, 838, 839, 847, 889, 906, 920, 923, 928, 929, 931, 934, 935, 936, 952, 989, 1003, 1005, 1018, 1073, 1076, 1078, 1089, 1094, 1095, 1100, 1102, 1114, 1115, 1133, 1134, 1147, 1168, 1169, 1184, 1193, 1196, 1203, 1204, 1209, 1232, 1233, 1236, 1244, 1253, 1254, 1268, 1278, 1284, 1294, 1297, 1298, 1303, 1306, 1310, 1331, 1342, 1402, 1410, 1415, 1423, 1427, 1428, 1430, 1434, 1463, 1487, 1488, 1494, 1507, 1508, 1512, 1515, 1518, 1532, 1547, 1550, 1561, 1563, 1564, 1612, 1622, 1623, 1624, 1626, 1627, 1630, 1640, 1647, 1651, 1689, 1691, 1694, 1703, 1711, 1714, 1729, 1745, 1746, 1760, 1771, 1797, 1803, 1804, 1805, 1812, 1827, 1828, 1831, 1858, 1859, 1860, 1861, 1862, 1880, 1918, 1929, 1937, 1956, 1961, 1965, 1967, 1971, 1980, 1985, 1994, 2008, 2011, 2013
182182 };
183183 goldSPlocal.setSparse (deterministicSPlocal);
184184
185185 SDR goldTM ({COLS});
186186 const SDR_sparse_t deterministicTM{
187- 26 , 75 // FIXME this is a really bad representation -> improve the params
187+ 1965 // FIXME this is a really bad representation -> improve the params
188188 };
189189 goldTM.setSparse (deterministicTM);
190190
191- const float goldAn = 0 . 8f ;
191+ const float goldAn = 1 . 0f ;
192192
193193 if (EPOCHS == 5000 ) { // these hand-written values are only valid for EPOCHS = 5000 (default), but not for debug and custom runs.
194194 NTA_CHECK (input == goldEnc) << " Deterministic output of Encoder failed!\n " << input << " should be:\n " << goldEnc;
@@ -197,7 +197,7 @@ Real64 BenchmarkHotgym::run(UInt EPOCHS, bool useSPlocal, bool useSPglobal, bool
197197 NTA_CHECK (outTM == goldTM) << " Deterministic output of TM failed!\n " << outTM << " should be:\n " << goldTM;
198198 NTA_CHECK (static_cast <UInt>(an *10000 .0f ) == static_cast <UInt>(goldAn *10000 .0f )) // compare to 4 decimal places
199199 << " Deterministic output of Anomaly failed! " << an << " should be: " << goldAn;
200- NTA_CHECK (avgAnom10.getCurrentAvg () <= 0 .82f ) << " Deterministic average anom score failed:" << avgAnom10.getCurrentAvg ();
200+ NTA_CHECK (avgAnom10.getCurrentAvg () <= 0 .8f ) << " Deterministic average anom score failed:" << avgAnom10.getCurrentAvg ();
201201 }
202202
203203 // check runtime speed
0 commit comments