Code for the project of LELEC2811 2017

Dependencies:   FreescaleIAP MMA8491Q_PG mbed

Fork of LELEC_2811_Accelerometer by LELEC2811 - I&S

Files at this revision

API Documentation at this revision

Comitter:
ATCuriosity
Date:
Sat Dec 02 21:14:53 2017 +0000
Parent:
5:79b8cd191fa8
Commit message:
finally complete ! (95% accurate on all the data sets)

Changed in this revision

Biases.txt Show diff for this revision Revisions of this file
Weights.txt Show diff for this revision Revisions of this file
biases_output_layer.txt Show annotated file Show diff for this revision Revisions of this file
biases_samples_layer.txt Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
weights_output_layer.txt Show annotated file Show diff for this revision Revisions of this file
weights_samples_layer.txt Show annotated file Show diff for this revision Revisions of this file
diff -r 79b8cd191fa8 -r 4ea2ba88338f Biases.txt
--- a/Biases.txt	Fri Dec 01 10:30:27 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
--1.0646535158157349,
--0.6977548003196716,
--0.005603725556284189,
-1.3278864622116089,
--1.2949254512786865,
diff -r 79b8cd191fa8 -r 4ea2ba88338f Weights.txt
--- a/Weights.txt	Fri Dec 01 10:30:27 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,300 +0,0 @@
--0.24571223556995392, -1.2547351121902466, -0.5151374340057373, -0.7628714442253113, 0.37868261337280273, 
--1.3155070543289185, -0.9980486035346985, -1.248487114906311, 1.7516164779663086, 0.5233801603317261, 
-0.21488504111766815, -1.421653389930725, -0.21514840424060822, -1.546012282371521, 1.9574376344680786, 
--0.7332760691642761, 0.008802240714430809, 1.3402708768844604, 0.7094124555587769, 0.8680424094200134, 
-0.7376701235771179, -0.7947062253952026, -1.770746111869812, -1.2579758167266846, -1.571648120880127, 
-1.2255042791366577, -0.5947446227073669, -0.9314478635787964, 0.6335052251815796, 0.5163283348083496, 
--0.41870394349098206, 0.6573562026023865, 2.6433796882629395, -0.8333752155303955, 0.8722538352012634, 
--0.16796894371509552, 0.44822829961776733, -1.2626208066940308, 0.10006387531757355, -0.5416926741600037, 
-0.4922594428062439, 0.6277754902839661, -0.5230848789215088, -0.027851393446326256, -0.10213196277618408, 
-0.3444811701774597, -0.5007097721099854, -0.8634229898452759, 0.9853735566139221, 0.5826707482337952, 
--0.58268141746521, -1.1399238109588623, -1.1591811180114746, -0.4172535836696625, -0.675905704498291, 
-0.5541004538536072, 1.118786334991455, 0.47804561257362366, 0.09506523609161377, 0.99432772397995, 
-1.2515294551849365, 1.5106489658355713, 1.8144276142120361, -1.5189615488052368, -1.7214127779006958, 
-0.8634423017501831, 0.14246299862861633, -2.3467140197753906, 1.9005188941955566, 0.5636882185935974, 
--0.5267627835273743, -2.2615716457366943, -1.8998039960861206, 0.9482619166374207, -0.465178519487381, 
--0.5431562662124634, -0.8052263259887695, 0.21715784072875977, 0.5588951110839844, 0.3715156316757202, 
--0.7032745480537415, 0.06473852694034576, -0.4572218954563141, 1.33938467502594, -1.4594690799713135, 
-1.9569600820541382, -0.07650212198495865, 0.2008592188358307, -0.06920762360095978, 0.7669892907142639, 
-0.09748578071594238, -2.039625883102417, -1.0427228212356567, -0.9339343905448914, -0.37214550375938416, 
-0.4919601082801819, 1.0769847631454468, 1.6066144704818726, -0.9177070260047913, -0.833859384059906, 
--1.0519349575042725, 0.4404042363166809, -0.059348806738853455, 0.14887133240699768, 1.17609703540802, 
-0.3057791590690613, -0.053948406130075455, -0.6180793046951294, -1.2960138320922852, 1.0182385444641113, 
--0.6901547312736511, 0.4454287886619568, 0.07098976522684097, -0.41709017753601074, -0.708288848400116, 
--0.906055748462677, 0.9643391370773315, -0.6229026913642883, -0.02340785413980484, -0.33625367283821106, 
--1.0426050424575806, -0.3092651069164276, 1.3727495670318604, -0.3035429120063782, 0.6868094801902771, 
--0.1329808533191681, 0.44369158148765564, 0.5352257490158081, -0.2325095236301422, 0.3791239857673645, 
-0.012751354835927486, -0.39815086126327515, 0.7395178079605103, -0.0667930319905281, -2.4468376636505127, 
--0.46066877245903015, 0.4471665918827057, 0.5783914923667908, -0.23629647493362427, -0.8173512816429138, 
-0.35208365321159363, -0.2866388261318207, 0.42006155848503113, 1.8313897848129272, 0.1369742453098297, 
-0.6457799077033997, 0.3547916114330292, -1.066206455230713, -0.7046169638633728, -0.5847052931785583, 
-0.31599247455596924, 0.5625064373016357, 1.2450339794158936, -1.2586579322814941, -0.11513615399599075, 
-0.1993674784898758, 0.3520318865776062, 0.392048716545105, 1.150580883026123, 2.520535707473755, 
--0.5278898477554321, 1.2984645366668701, -0.6736398339271545, -1.0732347965240479, -0.2994939088821411, 
-0.9622821807861328, 0.4513672888278961, 1.1722640991210938, -1.4861440658569336, -1.9754559993743896, 
-0.03928925469517708, -0.4988533556461334, 1.3048021793365479, 2.5928637981414795, 0.4710122048854828, 
-1.6462607383728027, -1.7644948959350586, -0.3180577754974365, 0.9002344012260437, -0.36363860964775085, 
-0.2824018895626068, -1.5526151657104492, -0.10547073930501938, 0.1844588816165924, -0.4531194269657135, 
-0.6490976214408875, 0.6607931852340698, -0.19158025085926056, -0.43727222084999084, 0.42218223214149475, 
-2.376615047454834, -0.6994840502738953, -1.8859736919403076, -0.030698826536536217, -0.17685429751873016, 
--0.3499170243740082, 0.43359214067459106, 1.2608072757720947, -0.6052184104919434, -1.8603475093841553, 
--0.2730920910835266, 1.1910473108291626, 0.2258511632680893, 1.433384895324707, 1.234363317489624, 
-0.6804731488227844, -0.6520032286643982, -0.18788062036037445, 0.008547370322048664, -1.2115668058395386, 
--1.2350103855133057, 0.2963707149028778, 0.9701659083366394, -1.0835926532745361, -0.11917296797037125, 
--0.37895825505256653, -1.7771995067596436, -0.019534138962626457, 2.9615883827209473, 0.25121763348579407, 
-0.8339133262634277, 0.22713664174079895, 0.9965538382530212, 0.5968238711357117, -1.5828763246536255, 
-0.4517742395401001, 0.11238501220941544, 0.31505200266838074, -0.07267434895038605, 1.9646930694580078, 
--2.162511110305786, 0.7899621725082397, -0.15857213735580444, 0.28261488676071167, 2.414595127105713, 
--0.4284278154373169, 0.042749449610710144, 0.7660313248634338, -0.9601739048957825, 0.8656898736953735, 
-1.283633828163147, -1.4839468002319336, 0.6427890062332153, -2.781512975692749, 1.1513934135437012, 
--0.5617250800132751, 1.0422673225402832, 1.6266191005706787, 1.7717909812927246, -0.7754138708114624, 
--0.04814531281590462, 0.7567602396011353, 0.9582327008247375, -2.6317636966705322, 0.8783372640609741, 
--0.27144351601600647, -1.9862209558486938, -0.9538099765777588, 0.6054468750953674, 0.9940077662467957, 
--0.06766536831855774, 0.11968550831079483, 0.05768483132123947, -0.5280429720878601, 1.1563289165496826, 
--0.7475485801696777, -0.3628635108470917, 0.4201650619506836, -0.7420871257781982, 0.09786992520093918, 
--0.45682311058044434, -0.19020363688468933, 0.23911628127098083, -0.7581648230552673, 0.14203113317489624, 
-0.8022302985191345, -1.2480902671813965, 0.47768324613571167, 0.21117296814918518, 1.9149134159088135, 
-1.7242094278335571, 0.8336970210075378, 0.41345974802970886, -0.9379270076751709, 2.1104962825775146, 
--2.49871563911438, 0.010669699870049953, 0.7397603392601013, -1.4014956951141357, -1.9628691673278809, 
--0.11874690651893616, -0.8464556336402893, -0.42584142088890076, 0.017458681017160416, -1.8545551300048828, 
--1.1118367910385132, 1.0244462490081787, 1.4800677299499512, 0.07721935212612152, 0.7700855135917664, 
-1.473382592201233, -0.05448349565267563, -0.6568040251731873, 1.2385793924331665, 1.117518663406372, 
-0.3603997230529785, -1.1282596588134766, -0.4976402819156647, 1.8075124025344849, -0.2777664363384247, 
--0.25131914019584656, 0.6798037886619568, -0.48410695791244507, -0.5080237984657288, 0.058485954999923706, 
--0.037989646196365356, 1.3258992433547974, -0.7108741402626038, -0.8191260099411011, 1.5472145080566406, 
-0.41374653577804565, 0.1592237949371338, 1.2638742923736572, -2.1136622428894043, -0.3212655782699585, 
-1.6053071022033691, -0.5155417919158936, 0.11141051352024078, -1.617645502090454, 0.9590891003608704, 
-0.17005574703216553, 0.833899974822998, -0.7972658276557922, -0.6435285210609436, -2.0923526287078857, 
-1.023192048072815, -0.29334649443626404, -0.6297960877418518, 1.136114478111267, 0.03520612791180611, 
--0.18912947177886963, -1.2379231452941895, -2.0603222846984863, -0.7299221754074097, 1.1001360416412354, 
-1.0139005184173584, 1.240451693534851, 0.5343283414840698, 1.1729710102081299, 0.7688093185424805, 
--1.8992074728012085, 0.6157780885696411, 0.25491926074028015, 0.3645287752151489, -1.6406471729278564, 
--0.9560879468917847, 0.959143877029419, -0.017925290390849113, -0.5446258783340454, 1.4396666288375854, 
--1.420528531074524, 0.03796866908669472, -0.29537075757980347, -0.8458269834518433, -0.6738583445549011, 
--0.03177834302186966, -1.3860054016113281, 0.0018310340819880366, 1.0835442543029785, 0.03270955756306648, 
-0.46865975856781006, -0.9675189852714539, 0.625529944896698, -1.888829231262207, 0.13126681745052338, 
-0.33906811475753784, -0.42603597044944763, -0.754728376865387, -1.8630437850952148, 1.5741990804672241, 
-1.7277284860610962, 1.6250970363616943, 0.947969377040863, -0.09351341426372528, 0.4289342761039734, 
-0.48613616824150085, -0.7337805032730103, 0.24329917132854462, -1.2541319131851196, 0.7328484654426575, 
--2.016120672225952, 0.6257203221321106, 1.0507885217666626, -0.029885414987802505, -2.5440011024475098, 
-1.6460753679275513, 1.1059083938598633, -1.5741223096847534, 0.5004421472549438, -0.28274595737457275, 
--0.6780849695205688, 1.1578879356384277, 2.211224317550659, 1.4035290479660034, -1.8716883659362793, 
--0.29758763313293457, 0.4424312710762024, -2.5813848972320557, -0.9491724371910095, -0.07292648404836655, 
-1.6435173749923706, -0.9982559680938721, -0.5513395667076111, -0.13698966801166534, 0.6702286601066589, 
--0.5954411625862122, -0.017594752833247185, -0.3557453751564026, 0.3944736123085022, -1.0058554410934448, 
-0.09694129973649979, -0.7331564426422119, -0.047980599105358124, -0.7003052234649658, -1.3043899536132812, 
--1.4033223390579224, 0.1664753258228302, 0.4766818583011627, 1.5686628818511963, -0.6600256562232971, 
--0.335094153881073, -0.5906346440315247, -2.035036563873291, 0.583794116973877, -0.06896258890628815, 
-0.6271167397499084, 1.6893646717071533, -1.3936697244644165, -1.381980538368225, 1.6566559076309204, 
-0.9331648945808411, 1.3965694904327393, 1.2559661865234375, -0.7581304907798767, 0.6103880405426025, 
-0.5754871964454651, -0.6872775554656982, -0.644254744052887, -0.5469565391540527, -0.25627803802490234, 
--1.3854694366455078, 0.8130932450294495, 1.0910412073135376, 0.20034046471118927, -0.5161378383636475, 
-0.6738014817237854, -0.28084802627563477, -0.8554669618606567, -0.35599467158317566, -0.4830954670906067, 
--0.32575589418411255, -1.1952637434005737, 0.8877434730529785, 0.11238182336091995, -1.5014374256134033, 
--1.3295249938964844, -1.0996168851852417, 1.843910813331604, -0.9227277636528015, 0.2040606588125229, 
-1.141229271888733, 0.3572704493999481, -1.6801209449768066, -1.5719687938690186, -0.1922655552625656, 
--0.29146111011505127, -0.24147692322731018, -0.2600655257701874, -1.8025357723236084, 0.8647507429122925, 
--0.1681271195411682, 0.28574103116989136, -0.43706080317497253, 0.41124245524406433, 0.5147752165794373, 
--0.2775876522064209, -0.4952861964702606, -0.2667485773563385, 0.3210819661617279, -0.40817344188690186, 
--0.06622244417667389, 0.8583413362503052, 0.14687955379486084, 0.05935690179467201, 0.5819144248962402, 
--0.7063305377960205, 0.43360021710395813, 1.095748782157898, -0.5009535551071167, 1.002533197402954, 
-1.6958024501800537, 1.5603951215744019, 0.6500629186630249, 0.9580153226852417, 0.680774450302124, 
-2.635349750518799, 1.5755101442337036, -1.0930161476135254, -0.12411762773990631, -0.11593357473611832, 
-0.6586732268333435, -0.27060210704803467, -1.7435308694839478, -0.42545679211616516, -0.684691846370697, 
-0.37311720848083496, 0.9464867115020752, -0.14042189717292786, 0.5192921161651611, -0.7122104167938232, 
--0.43224114179611206, 1.0758882761001587, 0.2726796865463257, 0.0005450983881019056, 0.48274311423301697, 
--0.013604583218693733, 0.5066549181938171, -2.1614344120025635, 0.9588053226470947, -0.2388698160648346, 
--0.397980660200119, 0.9987998604774475, 1.6461561918258667, 0.8425766229629517, 1.51308012008667, 
--1.047377109527588, 1.3987879753112793, -0.5345917344093323, -0.9388144612312317, 0.7743181586265564, 
--1.6612881422042847, -0.8800246715545654, -0.4126180410385132, -0.7180327773094177, 0.27906370162963867, 
-1.022125244140625, -0.4781849682331085, -0.005470101721584797, 0.13923582434654236, 0.0854799747467041, 
-0.3635421395301819, 1.0309289693832397, 0.853963315486908, -0.6370217800140381, 1.1516035795211792, 
-0.539087176322937, 0.75653475522995, -0.24916782975196838, 1.0410552024841309, 0.8980614542961121, 
--0.5642552375793457, 0.017567146569490433, 0.7231954336166382, -0.13913965225219727, 1.3970544338226318, 
--0.14319008588790894, 0.5959615707397461, -0.23391467332839966, 0.9660151600837708, 1.0580672025680542, 
--0.6308073401451111, -0.2844630479812622, -0.9570762515068054, -0.17585760354995728, 0.6175369620323181, 
--0.4797804653644562, -0.7332133650779724, 1.0722174644470215, -0.5180562734603882, 0.44341766834259033, 
-0.2633477449417114, 1.3432724475860596, -0.5329375863075256, 0.9167234897613525, 0.3354828953742981, 
--0.5283777713775635, -0.13056285679340363, 1.7861558198928833, 1.1118049621582031, 0.023035619407892227, 
-0.8867878317832947, 0.20952709019184113, -1.0908615589141846, 0.44646450877189636, 0.1203150674700737, 
--0.08161653578281403, -0.9132283926010132, 1.2480424642562866, 1.043677568435669, 1.4476314783096313, 
-0.9541173577308655, 0.5862772464752197, -0.5088291764259338, 1.5552773475646973, -0.3268165588378906, 
--0.8960882425308228, -0.706878662109375, 0.4968663454055786, 0.043684981763362885, -0.1972479522228241, 
-0.03657980635762215, 0.6149055361747742, -0.03446078673005104, -0.2132982611656189, 0.7714595198631287, 
--0.270560085773468, -0.04509641230106354, 1.7853329181671143, 0.006397714838385582, -2.7257449626922607, 
--1.3830292224884033, -1.2513301372528076, -1.2270413637161255, -2.2081449031829834, 1.068936824798584, 
--0.9967105388641357, -1.4176737070083618, -1.617468237876892, 0.039301976561546326, 0.09694920480251312, 
-1.0827531814575195, -1.1814264059066772, 1.0057880878448486, 0.8533228635787964, -0.7631391882896423, 
--0.24893881380558014, 0.5981446504592896, 0.7981404066085815, -1.655669927597046, 0.22737352550029755, 
-0.12930887937545776, 1.8057129383087158, 1.5131651163101196, 2.1643309593200684, -1.3595128059387207, 
-0.5336093306541443, 1.9204450845718384, -0.03952101990580559, 0.637104868888855, -0.7934021949768066, 
--0.5868478417396545, -1.510240912437439, -0.524418294429779, 1.0649091005325317, 0.05972880497574806, 
--1.0382444858551025, -0.012967342510819435, 0.5729777812957764, 2.0507876873016357, -2.8616888523101807, 
-1.250059723854065, 1.6747651100158691, 0.5358275175094604, -1.3041059970855713, 1.4657577276229858, 
--0.31538471579551697, -0.16719190776348114, 1.357993721961975, -0.11212803423404694, 0.8421339988708496, 
--1.7066630125045776, -0.10603433847427368, 1.6580501794815063, 0.8335152268409729, 1.0102025270462036, 
-0.4938548803329468, 0.362338125705719, -1.206067442893982, 1.3892029523849487, -0.19357240200042725, 
--0.3922188878059387, 0.10690675675868988, 0.32008758187294006, 1.8203095197677612, 0.591988742351532, 
--0.4966576397418976, 0.00580607820302248, 0.844944953918457, 0.33273762464523315, 1.2646454572677612, 
-0.7739227414131165, 1.583108901977539, 0.410776823759079, 0.8327687382698059, -1.7758195400238037, 
--0.759372889995575, -0.0356706939637661, -0.12336110323667526, 0.3210195004940033, -1.8825874328613281, 
--0.16823963820934296, 0.5235546231269836, -0.037861090153455734, -0.2774212658405304, -1.3357977867126465, 
--0.25447559356689453, -0.9409592747688293, -0.4950021505355835, 0.20604264736175537, -1.372945785522461, 
-1.0733623504638672, 0.8108218908309937, -1.8777872323989868, -0.4558943808078766, -0.19966039061546326, 
-0.34224486351013184, -0.474256694316864, 0.7173314690589905, 0.5382103323936462, 0.1558445394039154, 
--0.9937874674797058, 1.5274988412857056, 1.6436188220977783, 0.4879588484764099, -0.0455688051879406, 
--0.17023444175720215, -0.8190378546714783, 0.5665439367294312, 0.8219445943832397, -0.5749495029449463, 
-0.5257431864738464, -0.632213830947876, 1.4793148040771484, -0.5781370997428894, -0.13768716156482697, 
-2.063453435897827, -1.472749948501587, -1.393918514251709, 0.5929126739501953, 1.350251317024231, 
--0.5676105618476868, 0.19563230872154236, 0.14220485091209412, -0.7228379249572754, 0.2624388039112091, 
-1.8941563367843628, -0.09321978688240051, -0.9016468524932861, 0.7969010472297668, 0.6370030641555786,
--0.24571223556995392, -1.2547351121902466, -0.5151374340057373, -0.7628714442253113, 0.37868261337280273, 
--1.3155070543289185, -0.9980486035346985, -1.248487114906311, 1.7516164779663086, 0.5233801603317261, 
-0.21488504111766815, -1.421653389930725, -0.21514840424060822, -1.546012282371521, 1.9574376344680786, 
--0.7332760691642761, 0.008802240714430809, 1.3402708768844604, 0.7094124555587769, 0.8680424094200134, 
-0.7376701235771179, -0.7947062253952026, -1.770746111869812, -1.2579758167266846, -1.571648120880127, 
-1.2255042791366577, -0.5947446227073669, -0.9314478635787964, 0.6335052251815796, 0.5163283348083496, 
--0.41870394349098206, 0.6573562026023865, 2.6433796882629395, -0.8333752155303955, 0.8722538352012634, 
--0.16796894371509552, 0.44822829961776733, -1.2626208066940308, 0.10006387531757355, -0.5416926741600037, 
-0.4922594428062439, 0.6277754902839661, -0.5230848789215088, -0.027851393446326256, -0.10213196277618408, 
-0.3444811701774597, -0.5007097721099854, -0.8634229898452759, 0.9853735566139221, 0.5826707482337952, 
--0.58268141746521, -1.1399238109588623, -1.1591811180114746, -0.4172535836696625, -0.675905704498291, 
-0.5541004538536072, 1.118786334991455, 0.47804561257362366, 0.09506523609161377, 0.99432772397995, 
-1.2515294551849365, 1.5106489658355713, 1.8144276142120361, -1.5189615488052368, -1.7214127779006958, 
-0.8634423017501831, 0.14246299862861633, -2.3467140197753906, 1.9005188941955566, 0.5636882185935974, 
--0.5267627835273743, -2.2615716457366943, -1.8998039960861206, 0.9482619166374207, -0.465178519487381, 
--0.5431562662124634, -0.8052263259887695, 0.21715784072875977, 0.5588951110839844, 0.3715156316757202, 
--0.7032745480537415, 0.06473852694034576, -0.4572218954563141, 1.33938467502594, -1.4594690799713135, 
-1.9569600820541382, -0.07650212198495865, 0.2008592188358307, -0.06920762360095978, 0.7669892907142639, 
-0.09748578071594238, -2.039625883102417, -1.0427228212356567, -0.9339343905448914, -0.37214550375938416, 
-0.4919601082801819, 1.0769847631454468, 1.6066144704818726, -0.9177070260047913, -0.833859384059906, 
--1.0519349575042725, 0.4404042363166809, -0.059348806738853455, 0.14887133240699768, 1.17609703540802, 
-0.3057791590690613, -0.053948406130075455, -0.6180793046951294, -1.2960138320922852, 1.0182385444641113, 
--0.6901547312736511, 0.4454287886619568, 0.07098976522684097, -0.41709017753601074, -0.708288848400116, 
--0.906055748462677, 0.9643391370773315, -0.6229026913642883, -0.02340785413980484, -0.33625367283821106, 
--1.0426050424575806, -0.3092651069164276, 1.3727495670318604, -0.3035429120063782, 0.6868094801902771, 
--0.1329808533191681, 0.44369158148765564, 0.5352257490158081, -0.2325095236301422, 0.3791239857673645, 
-0.012751354835927486, -0.39815086126327515, 0.7395178079605103, -0.0667930319905281, -2.4468376636505127, 
--0.46066877245903015, 0.4471665918827057, 0.5783914923667908, -0.23629647493362427, -0.8173512816429138, 
-0.35208365321159363, -0.2866388261318207, 0.42006155848503113, 1.8313897848129272, 0.1369742453098297, 
-0.6457799077033997, 0.3547916114330292, -1.066206455230713, -0.7046169638633728, -0.5847052931785583, 
-0.31599247455596924, 0.5625064373016357, 1.2450339794158936, -1.2586579322814941, -0.11513615399599075, 
-0.1993674784898758, 0.3520318865776062, 0.392048716545105, 1.150580883026123, 2.520535707473755, 
--0.5278898477554321, 1.2984645366668701, -0.6736398339271545, -1.0732347965240479, -0.2994939088821411, 
-0.9622821807861328, 0.4513672888278961, 1.1722640991210938, -1.4861440658569336, -1.9754559993743896, 
-0.03928925469517708, -0.4988533556461334, 1.3048021793365479, 2.5928637981414795, 0.4710122048854828, 
-1.6462607383728027, -1.7644948959350586, -0.3180577754974365, 0.9002344012260437, -0.36363860964775085, 
-0.2824018895626068, -1.5526151657104492, -0.10547073930501938, 0.1844588816165924, -0.4531194269657135, 
-0.6490976214408875, 0.6607931852340698, -0.19158025085926056, -0.43727222084999084, 0.42218223214149475, 
-2.376615047454834, -0.6994840502738953, -1.8859736919403076, -0.030698826536536217, -0.17685429751873016, 
--0.3499170243740082, 0.43359214067459106, 1.2608072757720947, -0.6052184104919434, -1.8603475093841553, 
--0.2730920910835266, 1.1910473108291626, 0.2258511632680893, 1.433384895324707, 1.234363317489624, 
-0.6804731488227844, -0.6520032286643982, -0.18788062036037445, 0.008547370322048664, -1.2115668058395386, 
--1.2350103855133057, 0.2963707149028778, 0.9701659083366394, -1.0835926532745361, -0.11917296797037125, 
--0.37895825505256653, -1.7771995067596436, -0.019534138962626457, 2.9615883827209473, 0.25121763348579407, 
-0.8339133262634277, 0.22713664174079895, 0.9965538382530212, 0.5968238711357117, -1.5828763246536255, 
-0.4517742395401001, 0.11238501220941544, 0.31505200266838074, -0.07267434895038605, 1.9646930694580078, 
--2.162511110305786, 0.7899621725082397, -0.15857213735580444, 0.28261488676071167, 2.414595127105713, 
--0.4284278154373169, 0.042749449610710144, 0.7660313248634338, -0.9601739048957825, 0.8656898736953735, 
-1.283633828163147, -1.4839468002319336, 0.6427890062332153, -2.781512975692749, 1.1513934135437012, 
--0.5617250800132751, 1.0422673225402832, 1.6266191005706787, 1.7717909812927246, -0.7754138708114624, 
--0.04814531281590462, 0.7567602396011353, 0.9582327008247375, -2.6317636966705322, 0.8783372640609741, 
--0.27144351601600647, -1.9862209558486938, -0.9538099765777588, 0.6054468750953674, 0.9940077662467957, 
--0.06766536831855774, 0.11968550831079483, 0.05768483132123947, -0.5280429720878601, 1.1563289165496826, 
--0.7475485801696777, -0.3628635108470917, 0.4201650619506836, -0.7420871257781982, 0.09786992520093918, 
--0.45682311058044434, -0.19020363688468933, 0.23911628127098083, -0.7581648230552673, 0.14203113317489624, 
-0.8022302985191345, -1.2480902671813965, 0.47768324613571167, 0.21117296814918518, 1.9149134159088135, 
-1.7242094278335571, 0.8336970210075378, 0.41345974802970886, -0.9379270076751709, 2.1104962825775146, 
--2.49871563911438, 0.010669699870049953, 0.7397603392601013, -1.4014956951141357, -1.9628691673278809, 
--0.11874690651893616, -0.8464556336402893, -0.42584142088890076, 0.017458681017160416, -1.8545551300048828, 
--1.1118367910385132, 1.0244462490081787, 1.4800677299499512, 0.07721935212612152, 0.7700855135917664, 
-1.473382592201233, -0.05448349565267563, -0.6568040251731873, 1.2385793924331665, 1.117518663406372, 
-0.3603997230529785, -1.1282596588134766, -0.4976402819156647, 1.8075124025344849, -0.2777664363384247, 
--0.25131914019584656, 0.6798037886619568, -0.48410695791244507, -0.5080237984657288, 0.058485954999923706, 
--0.037989646196365356, 1.3258992433547974, -0.7108741402626038, -0.8191260099411011, 1.5472145080566406, 
-0.41374653577804565, 0.1592237949371338, 1.2638742923736572, -2.1136622428894043, -0.3212655782699585, 
-1.6053071022033691, -0.5155417919158936, 0.11141051352024078, -1.617645502090454, 0.9590891003608704, 
-0.17005574703216553, 0.833899974822998, -0.7972658276557922, -0.6435285210609436, -2.0923526287078857, 
-1.023192048072815, -0.29334649443626404, -0.6297960877418518, 1.136114478111267, 0.03520612791180611, 
--0.18912947177886963, -1.2379231452941895, -2.0603222846984863, -0.7299221754074097, 1.1001360416412354, 
-1.0139005184173584, 1.240451693534851, 0.5343283414840698, 1.1729710102081299, 0.7688093185424805, 
--1.8992074728012085, 0.6157780885696411, 0.25491926074028015, 0.3645287752151489, -1.6406471729278564, 
--0.9560879468917847, 0.959143877029419, -0.017925290390849113, -0.5446258783340454, 1.4396666288375854, 
--1.420528531074524, 0.03796866908669472, -0.29537075757980347, -0.8458269834518433, -0.6738583445549011, 
--0.03177834302186966, -1.3860054016113281, 0.0018310340819880366, 1.0835442543029785, 0.03270955756306648, 
-0.46865975856781006, -0.9675189852714539, 0.625529944896698, -1.888829231262207, 0.13126681745052338, 
-0.33906811475753784, -0.42603597044944763, -0.754728376865387, -1.8630437850952148, 1.5741990804672241, 
-1.7277284860610962, 1.6250970363616943, 0.947969377040863, -0.09351341426372528, 0.4289342761039734, 
-0.48613616824150085, -0.7337805032730103, 0.24329917132854462, -1.2541319131851196, 0.7328484654426575, 
--2.016120672225952, 0.6257203221321106, 1.0507885217666626, -0.029885414987802505, -2.5440011024475098, 
-1.6460753679275513, 1.1059083938598633, -1.5741223096847534, 0.5004421472549438, -0.28274595737457275, 
--0.6780849695205688, 1.1578879356384277, 2.211224317550659, 1.4035290479660034, -1.8716883659362793, 
--0.29758763313293457, 0.4424312710762024, -2.5813848972320557, -0.9491724371910095, -0.07292648404836655, 
-1.6435173749923706, -0.9982559680938721, -0.5513395667076111, -0.13698966801166534, 0.6702286601066589, 
--0.5954411625862122, -0.017594752833247185, -0.3557453751564026, 0.3944736123085022, -1.0058554410934448, 
-0.09694129973649979, -0.7331564426422119, -0.047980599105358124, -0.7003052234649658, -1.3043899536132812, 
--1.4033223390579224, 0.1664753258228302, 0.4766818583011627, 1.5686628818511963, -0.6600256562232971, 
--0.335094153881073, -0.5906346440315247, -2.035036563873291, 0.583794116973877, -0.06896258890628815, 
-0.6271167397499084, 1.6893646717071533, -1.3936697244644165, -1.381980538368225, 1.6566559076309204, 
-0.9331648945808411, 1.3965694904327393, 1.2559661865234375, -0.7581304907798767, 0.6103880405426025, 
-0.5754871964454651, -0.6872775554656982, -0.644254744052887, -0.5469565391540527, -0.25627803802490234, 
--1.3854694366455078, 0.8130932450294495, 1.0910412073135376, 0.20034046471118927, -0.5161378383636475, 
-0.6738014817237854, -0.28084802627563477, -0.8554669618606567, -0.35599467158317566, -0.4830954670906067, 
--0.32575589418411255, -1.1952637434005737, 0.8877434730529785, 0.11238182336091995, -1.5014374256134033, 
--1.3295249938964844, -1.0996168851852417, 1.843910813331604, -0.9227277636528015, 0.2040606588125229, 
-1.141229271888733, 0.3572704493999481, -1.6801209449768066, -1.5719687938690186, -0.1922655552625656, 
--0.29146111011505127, -0.24147692322731018, -0.2600655257701874, -1.8025357723236084, 0.8647507429122925, 
--0.1681271195411682, 0.28574103116989136, -0.43706080317497253, 0.41124245524406433, 0.5147752165794373, 
--0.2775876522064209, -0.4952861964702606, -0.2667485773563385, 0.3210819661617279, -0.40817344188690186, 
--0.06622244417667389, 0.8583413362503052, 0.14687955379486084, 0.05935690179467201, 0.5819144248962402, 
--0.7063305377960205, 0.43360021710395813, 1.095748782157898, -0.5009535551071167, 1.002533197402954, 
-1.6958024501800537, 1.5603951215744019, 0.6500629186630249, 0.9580153226852417, 0.680774450302124, 
-2.635349750518799, 1.5755101442337036, -1.0930161476135254, -0.12411762773990631, -0.11593357473611832, 
-0.6586732268333435, -0.27060210704803467, -1.7435308694839478, -0.42545679211616516, -0.684691846370697, 
-0.37311720848083496, 0.9464867115020752, -0.14042189717292786, 0.5192921161651611, -0.7122104167938232, 
--0.43224114179611206, 1.0758882761001587, 0.2726796865463257, 0.0005450983881019056, 0.48274311423301697, 
--0.013604583218693733, 0.5066549181938171, -2.1614344120025635, 0.9588053226470947, -0.2388698160648346, 
--0.397980660200119, 0.9987998604774475, 1.6461561918258667, 0.8425766229629517, 1.51308012008667, 
--1.047377109527588, 1.3987879753112793, -0.5345917344093323, -0.9388144612312317, 0.7743181586265564, 
--1.6612881422042847, -0.8800246715545654, -0.4126180410385132, -0.7180327773094177, 0.27906370162963867, 
-1.022125244140625, -0.4781849682331085, -0.005470101721584797, 0.13923582434654236, 0.0854799747467041, 
-0.3635421395301819, 1.0309289693832397, 0.853963315486908, -0.6370217800140381, 1.1516035795211792, 
-0.539087176322937, 0.75653475522995, -0.24916782975196838, 1.0410552024841309, 0.8980614542961121, 
--0.5642552375793457, 0.017567146569490433, 0.7231954336166382, -0.13913965225219727, 1.3970544338226318, 
--0.14319008588790894, 0.5959615707397461, -0.23391467332839966, 0.9660151600837708, 1.0580672025680542, 
--0.6308073401451111, -0.2844630479812622, -0.9570762515068054, -0.17585760354995728, 0.6175369620323181, 
--0.4797804653644562, -0.7332133650779724, 1.0722174644470215, -0.5180562734603882, 0.44341766834259033, 
-0.2633477449417114, 1.3432724475860596, -0.5329375863075256, 0.9167234897613525, 0.3354828953742981, 
--0.5283777713775635, -0.13056285679340363, 1.7861558198928833, 1.1118049621582031, 0.023035619407892227, 
-0.8867878317832947, 0.20952709019184113, -1.0908615589141846, 0.44646450877189636, 0.1203150674700737, 
--0.08161653578281403, -0.9132283926010132, 1.2480424642562866, 1.043677568435669, 1.4476314783096313, 
-0.9541173577308655, 0.5862772464752197, -0.5088291764259338, 1.5552773475646973, -0.3268165588378906, 
--0.8960882425308228, -0.706878662109375, 0.4968663454055786, 0.043684981763362885, -0.1972479522228241, 
-0.03657980635762215, 0.6149055361747742, -0.03446078673005104, -0.2132982611656189, 0.7714595198631287, 
--0.270560085773468, -0.04509641230106354, 1.7853329181671143, 0.006397714838385582, -2.7257449626922607, 
--1.3830292224884033, -1.2513301372528076, -1.2270413637161255, -2.2081449031829834, 1.068936824798584, 
--0.9967105388641357, -1.4176737070083618, -1.617468237876892, 0.039301976561546326, 0.09694920480251312, 
-1.0827531814575195, -1.1814264059066772, 1.0057880878448486, 0.8533228635787964, -0.7631391882896423, 
--0.24893881380558014, 0.5981446504592896, 0.7981404066085815, -1.655669927597046, 0.22737352550029755, 
-0.12930887937545776, 1.8057129383087158, 1.5131651163101196, 2.1643309593200684, -1.3595128059387207, 
-0.5336093306541443, 1.9204450845718384, -0.03952101990580559, 0.637104868888855, -0.7934021949768066, 
--0.5868478417396545, -1.510240912437439, -0.524418294429779, 1.0649091005325317, 0.05972880497574806, 
--1.0382444858551025, -0.012967342510819435, 0.5729777812957764, 2.0507876873016357, -2.8616888523101807, 
-1.250059723854065, 1.6747651100158691, 0.5358275175094604, -1.3041059970855713, 1.4657577276229858, 
--0.31538471579551697, -0.16719190776348114, 1.357993721961975, -0.11212803423404694, 0.8421339988708496, 
--1.7066630125045776, -0.10603433847427368, 1.6580501794815063, 0.8335152268409729, 1.0102025270462036, 
-0.4938548803329468, 0.362338125705719, -1.206067442893982, 1.3892029523849487, -0.19357240200042725, 
--0.3922188878059387, 0.10690675675868988, 0.32008758187294006, 1.8203095197677612, 0.591988742351532, 
--0.4966576397418976, 0.00580607820302248, 0.844944953918457, 0.33273762464523315, 1.2646454572677612, 
-0.7739227414131165, 1.583108901977539, 0.410776823759079, 0.8327687382698059, -1.7758195400238037, 
--0.759372889995575, -0.0356706939637661, -0.12336110323667526, 0.3210195004940033, -1.8825874328613281, 
--0.16823963820934296, 0.5235546231269836, -0.037861090153455734, -0.2774212658405304, -1.3357977867126465, 
--0.25447559356689453, -0.9409592747688293, -0.4950021505355835, 0.20604264736175537, -1.372945785522461, 
-1.0733623504638672, 0.8108218908309937, -1.8777872323989868, -0.4558943808078766, -0.19966039061546326, 
-0.34224486351013184, -0.474256694316864, 0.7173314690589905, 0.5382103323936462, 0.1558445394039154, 
--0.9937874674797058, 1.5274988412857056, 1.6436188220977783, 0.4879588484764099, -0.0455688051879406, 
--0.17023444175720215, -0.8190378546714783, 0.5665439367294312, 0.8219445943832397, -0.5749495029449463, 
-0.5257431864738464, -0.632213830947876, 1.4793148040771484, -0.5781370997428894, -0.13768716156482697, 
-2.063453435897827, -1.472749948501587, -1.393918514251709, 0.5929126739501953, 1.350251317024231, 
--0.5676105618476868, 0.19563230872154236, 0.14220485091209412, -0.7228379249572754, 0.2624388039112091, 
-1.8941563367843628, -0.09321978688240051, -0.9016468524932861, 0.7969010472297668, 0.6370030641555786
\ No newline at end of file
diff -r 79b8cd191fa8 -r 4ea2ba88338f biases_output_layer.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/biases_output_layer.txt	Sat Dec 02 21:14:53 2017 +0000
@@ -0,0 +1,5 @@
+1.046273112297058,
+1.2933000326156616,
+-2.6970293521881104,
+0.22565095126628876,
+-1.3082348108291626
\ No newline at end of file
diff -r 79b8cd191fa8 -r 4ea2ba88338f biases_samples_layer.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/biases_samples_layer.txt	Sat Dec 02 21:14:53 2017 +0000
@@ -0,0 +1,100 @@
+1.2839854955673218,
+0.844560444355011,
+-0.9599889516830444,
+-0.28173181414604187,
+-0.7556612491607666,
+0.4844706952571869,
+-0.41522833704948425,
+0.11125683784484863,
+-0.13264158368110657,
+-1.4656951427459717,
+-0.6944068670272827,
+0.06977055966854095,
+1.4905098676681519,
+0.5831243395805359,
+-1.1652263402938843,
+1.3002569675445557,
+1.369484543800354,
+1.1341967582702637,
+0.4264237582683563,
+0.14997832477092743,
+0.6767251491546631,
+-0.5880087018013,
+-0.24395346641540527,
+-0.5318885445594788,
+3.139577865600586,
+-0.30305585265159607,
+0.050287120044231415,
+0.9818302989006042,
+0.3075530529022217,
+-0.8817423582077026,
+0.20989981293678284,
+-1.3815406560897827,
+0.09841000288724899,
+-1.6288092136383057,
+1.0597361326217651,
+-0.33830392360687256,
+2.407935380935669,
+-0.46230483055114746,
+0.15525832772254944,
+0.7853626012802124,
+0.8132264018058777,
+-1.3183537721633911,
+0.17298023402690887,
+-0.6979860067367554,
+0.7119547724723816,
+-1.392679214477539,
+-0.26977643370628357,
+-0.3344902992248535,
+-0.4499512314796448,
+0.7309167385101318,
+0.4638931453227997,
+-0.3446531891822815,
+-0.4022730588912964,
+-0.5872006416320801,
+1.0412873029708862,
+-0.6543596386909485,
+-0.573635995388031,
+0.5825256109237671,
+0.26941901445388794,
+-0.05702151730656624,
+-0.45687413215637207,
+-1.2664389610290527,
+0.24614040553569794,
+-1.6083775758743286,
+-0.24198085069656372,
+0.352922260761261,
+-0.3957057297229767,
+1.6292335987091064,
+-1.6753135919570923,
+0.44008755683898926,
+-0.4512365460395813,
+-0.7904369831085205,
+-1.2897789478302002,
+-0.19778940081596375,
+0.6819683313369751,
+-0.9121500253677368,
+0.24416685104370117,
+0.441783607006073,
+-0.07064472138881683,
+-0.01949775405228138,
+0.5159420371055603,
+0.15058153867721558,
+-0.635097861289978,
+0.1641169637441635,
+0.11039312928915024,
+-0.8112671971321106,
+0.5832013487815857,
+0.7378504872322083,
+-0.2872060537338257,
+0.03293687477707863,
+-1.7732337713241577,
+-0.6498776078224182,
+-0.19854162633419037,
+-0.1391322910785675,
+-1.0905576944351196,
+-0.8330727815628052,
+-0.04723380133509636,
+0.651992678642273,
+-1.4250738620758057,
+-0.6021254658699036
\ No newline at end of file
diff -r 79b8cd191fa8 -r 4ea2ba88338f main.cpp
--- a/main.cpp	Fri Dec 01 10:30:27 2017 +0000
+++ b/main.cpp	Sat Dec 02 21:14:53 2017 +0000
@@ -30,8 +30,8 @@
 #define ACQ_TIMER_PERIOD        0.005  // Time between 2 acquisitions (here 5 mSec)
 #define N_PTS                   100    // Number of points for each axis used to detect mvt
 #define N_MVTS                  5      // Number of mvts detected
-#define THRESHOLD_MVT           0.5    // threshold to validate a mvt
-#define THRESHOLD_SHOCK         0.5    // threshold to detect shock
+#define THRESHOLD_MVT           0.4    // threshold to validate a mvt
+#define THRESHOLD_SHOCK         0.45   // threshold to detect shock
 
 MMA8491Q my8491(PTE0, PTE1, MMA8491_I2C_ADDRESS); // Setup I2C for MMA8491
 
@@ -83,14 +83,20 @@
 int flash_base_address = RESERVED_SECTOR * SECTOR_SIZE ; // Store Flash Base Address
 int flash_next_address; // next address for saving data in flash
 int flash_base_address_cmd; // base address where the parameters are saved
-/*
-const float Weights[3*N_PTS*N_MVTS] = {
-    #include "Weights.txt"
+
+const float w_s_l [3*N_PTS] = {
+    #include "weights_samples_layer.txt"
+};
+const float b_s_l [N_PTS] = {
+    #include "biases_samples_layer.txt"
 };
-const float Biases[N_MVTS] = {
-    #include "Biases.txt"
+const float w_o_l [N_PTS*N_MVTS] = {
+    #include "weights_output_layer.txt"
 };
-*/
+const float b_o_l [N_MVTS] = {
+    #include "biases_output_layer.txt"
+};
+
 // ------------------------ Function Declaration ------------------------
 void Init(void);
 void DisplayFlashInfos(void);   // display memory use
@@ -111,7 +117,10 @@
 void Log(void);                 // read data, detect shock and movement
 void Rotate(int16_t *AccDataLog, int amount, int16_t *inputs); // inputs = AccDataLog rotated of amount
 void PrintSet(MvtSet mvtSet);   // display set of data
-void Softmax (float *inputs, float *result); // softmax function (used by neural network)
+
+float Map (float x);            // inputs mapped between 0 and 1
+float Sigmoid (float x);        // sigmoid function
+void Softmax (float *inputs, float *result); // softmax function
 Mvt SelectMvt(int16_t *inputs); // compute probabilities for each mvt based on the inputs
 
 // -------------------------------------------------------------------------------------------------------
@@ -260,9 +269,18 @@
     {
         char cmd = Host_Comm.getc();
         if ((cmd == 'E') || (cmd == 'e')) {
-            EraseAllSectors();
-            flash_next_address = flash_base_address;
-            Host_Comm.printf("Erase done.\n\r");
+            Host_Comm.printf("Press 'E' again to confirm.\n\r");
+            wait_ms(1000);
+            if(Host_Comm.readable()) {
+                cmd = Host_Comm.getc();
+                if ((cmd == 'E') || (cmd == 'e')) {
+                    EraseAllSectors();
+                    flash_next_address = flash_base_address;
+                    Host_Comm.printf("Erase done.\n\r");
+                }
+            }
+            else
+                Host_Comm.printf("Erase aborded.\n\r");
         }
         else if ((cmd == 'C') || (cmd == 'c')) {
             mode = CONSOLE;
@@ -555,6 +573,15 @@
     Host_Comm.printf("------- End Set -------\n\n\r");
 }
 
+// -------------------------------------------------------------------------------------------------------
+// -------------------------------------------------------------------------------------------------------
+
+// -------------------------------- Map ---------------------------------
+float Map (float x) { return (x+OFFSET)/RANGE; }
+
+// ------------------------------ Sigmoid -------------------------------
+float Sigmoid (float x) { return 1/(1+exp(-x)); }
+
 // ------------------------------ Softmax -------------------------------
 void Softmax (float *inputs, float *result)
 {
@@ -573,26 +600,28 @@
 // ----------------------------- SelectMvt ------------------------------
 Mvt SelectMvt(int16_t *inputs)
 {
-    /*
     int i, j;
-    float selection [N_MVTS] = {};
+    
+    float samples [N_PTS];
+    for (i = 0; i < N_PTS; i++)
+        samples[i] = Sigmoid( Map(inputs[i*3])*w_s_l[i*3] + Map(inputs[i*3+1])*w_s_l[i*3+1] + Map(inputs[i*3+2])*w_s_l[i*3+2] + b_s_l[i] );
+    
+    float probabilities [N_MVTS] = {};
     for (j = 0; j < N_MVTS; j++) {
-        for (i = 0; i < N_PTS*3; i++)
-            selection[j] += (inputs[i]+OFFSET)/RANGE * Weights[i*N_MVTS+j];
-        selection[j] = selection[j]+Biases[j];
+        for (i = 0; i < N_PTS; i++)
+            probabilities[j] += samples[i] * w_o_l[i*N_MVTS+j];
+        probabilities[j] = probabilities[j] + b_o_l[j];
     }
-    Softmax(selection,selection);
+    Softmax(probabilities,probabilities);
     
     Mvt mvt = Undefined;
     Host_Comm.printf("Proba mvt : ");
     for (i = 0; i < N_MVTS; i++) {
-        if (selection[i] > THRESHOLD_MVT)
+        if (probabilities[i] > THRESHOLD_MVT)
             mvt = static_cast<Mvt>(i+1);
-        Host_Comm.printf("%f ",selection[i]);
+        Host_Comm.printf("%f ",probabilities[i]);
     }
     Host_Comm.printf("\n\r");
     
     return mvt;
-    */
-    return SmashShot;
 }
diff -r 79b8cd191fa8 -r 4ea2ba88338f weights_output_layer.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/weights_output_layer.txt	Sat Dec 02 21:14:53 2017 +0000
@@ -0,0 +1,100 @@
+-0.5420050024986267, 0.5869160890579224, 0.05389264225959778, -0.5913965702056885, -2.425096273422241, 
+-1.0003925561904907, -1.097780704498291, -0.497514009475708, 0.5402132272720337, -0.05606909841299057, 
+-1.2179789543151855, 2.8080153465270996, 1.855914831161499, -1.713951826095581, 0.07847507297992706, 
+-0.34620946645736694, 2.2162039279937744, -0.7811248898506165, 1.7119351625442505, 1.3000222444534302, 
+-1.7032727003097534, 0.7473033666610718, 2.55963397026062, -0.020724013447761536, -0.058701686561107635, 
+-1.146972417831421, -0.6883780360221863, -1.0168401002883911, 1.5918679237365723, -0.942190945148468, 
+0.8738690614700317, 0.9838008284568787, -0.3479006588459015, -0.5306583046913147, 0.5928286910057068, 
+-1.719947338104248, -0.5982359647750854, 1.2436224222183228, 2.302950143814087, -0.5401427745819092, 
+3.218435287475586, -1.681931495666504, -0.686454713344574, -0.32819968461990356, -1.8301751613616943, 
+2.1310229301452637, -2.1517865657806396, -1.49229097366333, 2.464606761932373, 1.999384880065918, 
+0.004270622972398996, 1.8081399202346802, -0.011434733867645264, -2.3271262645721436, -2.212893009185791, 
+0.7184558510780334, -1.0307955741882324, -0.7180132865905762, 0.35149073600769043, 1.6023848056793213, 
+0.23912695050239563, -1.6560893058776855, -0.3102853298187256, 0.49882519245147705, -0.8210393786430359, 
+0.6601875424385071, -0.8467012047767639, -0.9936848878860474, 1.3616466522216797, -0.5011084079742432, 
+-0.4480504095554352, -0.41098976135253906, -0.5623169541358948, -1.9099231958389282, 1.8095148801803589, 
+-0.4095626473426819, -1.950249195098877, 2.1593422889709473, 1.5186766386032104, 2.4168291091918945, 
+1.4452499151229858, -2.2494218349456787, -0.9457398056983948, 1.785435438156128, -0.4546569883823395, 
+0.7416169047355652, 0.8451859951019287, -0.5794363617897034, -2.3219375610351562, -0.7256390452384949, 
+1.363082766532898, 1.1644762754440308, 1.862135648727417, 1.4282236099243164, 0.7071892023086548, 
+0.5689799785614014, -1.5707505941390991, -0.8106523752212524, 2.284257411956787, -0.2780626714229584, 
+-2.475621461868286, 0.1691378802061081, 0.8523005247116089, 0.2483048439025879, -1.0642287731170654, 
+0.7954976558685303, 0.6172756552696228, 0.17866340279579163, -0.3454923629760742, -1.470583438873291, 
+0.7271879315376282, -0.9981744885444641, 0.37179291248321533, 0.40470579266548157, -0.8385488390922546, 
+-0.6225678324699402, 0.5945202112197876, -0.9467309713363647, -0.9023900628089905, 0.6371555328369141, 
+1.1418726444244385, 0.9950755834579468, 1.8041619062423706, 0.34004074335098267, 0.666019082069397, 
+0.2614748775959015, 0.42842522263526917, -2.3186583518981934, -2.005371332168579, -1.8435148000717163, 
+1.0420829057693481, 0.1422950029373169, -0.7643609642982483, -1.7621790170669556, 0.5736599564552307, 
+-1.1088721752166748, 0.18634285032749176, 0.9781844615936279, 1.2332329750061035, -0.9322507977485657, 
+-1.4038994312286377, -0.9415439963340759, 1.5316177606582642, 0.4681934118270874, -0.8548004031181335, 
+0.6384441256523132, -1.095425009727478, -0.39444220066070557, 1.8779120445251465, -0.3315019905567169, 
+-0.8844460844993591, 0.14576086401939392, -0.4931512773036957, -0.0697573721408844, 0.7411240935325623, 
+1.6301919221878052, 0.5407447814941406, -0.6377338767051697, -1.1087183952331543, 0.4083869457244873, 
+-0.8850370049476624, 1.8101463317871094, -1.0377956628799438, -0.28760141134262085, 0.0828467607498169, 
+-2.354719877243042, -1.1407394409179688, 1.2025127410888672, -1.2221732139587402, 0.2924901843070984, 
+-0.05922567471861839, -0.25534579157829285, -0.5538048148155212, 0.6969662308692932, -0.9525737166404724, 
+-0.7511162161827087, 1.5659133195877075, -0.4630027711391449, -1.1789740324020386, 0.2689231336116791, 
+-1.1909459829330444, -0.8603720664978027, 0.266989141702652, 2.237668752670288, -2.0933094024658203, 
+-0.2440924048423767, 0.14280320703983307, -2.2440097332000732, -1.4528840780258179, -1.165468454360962, 
+2.08687424659729, -0.2811565101146698, 2.1448957920074463, -0.9812307357788086, 0.20641054213047028, 
+-1.1596295833587646, -0.7266793847084045, 2.4136745929718018, 2.074136257171631, -1.8820635080337524, 
+-0.5704321265220642, 0.2878738343715668, 1.107737421989441, 1.0902378559112549, -0.5265740752220154, 
+0.5759156942367554, 0.0027505161706358194, -1.0212979316711426, -0.6176536083221436, 1.1884822845458984, 
+0.6715343594551086, 0.28546208143234253, -2.1922881603240967, -0.4935512840747833, 1.0969864130020142, 
+0.6625165939331055, 0.031181124970316887, 1.0069235563278198, 0.24820789694786072, 0.8428484201431274, 
+1.1217116117477417, 1.1215202808380127, 0.4332121014595032, -0.8598718047142029, 0.3062036633491516, 
+0.1926257461309433, 0.04433423653244972, -0.14373481273651123, -1.229382038116455, 1.5442436933517456, 
+-0.06550875306129456, 1.4575330018997192, 1.055457353591919, 0.07608682662248611, -1.5590652227401733, 
+0.8883983492851257, 1.839592456817627, -2.7235398292541504, 0.7644257545471191, 0.5214201807975769, 
+2.034032106399536, -0.7020300030708313, -1.65997314453125, -0.8499199151992798, -1.1935635805130005, 
+-1.4579304456710815, 0.18285299837589264, 2.1511547565460205, 1.953677773475647, 0.5573573708534241, 
+1.6866153478622437, -0.7569347023963928, 1.899158239364624, -0.8357212543487549, -0.20892971754074097, 
+-0.8778461217880249, 0.2819739282131195, -0.1830386370420456, 1.090872883796692, 2.2920193672180176, 
+-0.4373854100704193, -1.467817783355713, 0.1918545365333557, 0.8191410899162292, -0.3475996255874634, 
+-0.036278802901506424, 0.9167468547821045, -0.5862241983413696, -1.236244559288025, 3.1927413940429688, 
+0.44191744923591614, 0.1882963478565216, 3.2094671726226807, 0.45941710472106934, -0.14979718625545502, 
+-1.0386567115783691, 0.2264356166124344, 2.953505277633667, 0.8200938105583191, 0.605014443397522, 
+-0.34969350695610046, 0.16189375519752502, 0.4665754437446594, -0.5144088268280029, 0.8208640813827515, 
+-1.4562268257141113, -0.9879682660102844, 1.7292652130126953, 1.4167839288711548, -0.521511435508728, 
+-0.20867227017879486, 0.6805467009544373, 2.0681934356689453, -0.3437185287475586, 0.6444591283798218, 
+-0.18892982602119446, -0.3403419852256775, 0.3413688838481903, 0.9090991020202637, -0.6130063533782959, 
+-0.3993053436279297, -0.22835983335971832, -3.773871898651123, -0.5195704698562622, 1.0217938423156738, 
+-0.45211270451545715, -1.3742860555648804, 0.7451322674751282, 2.07186222076416, 0.1798185557126999, 
+1.314328908920288, -1.080318570137024, -0.04175315424799919, 1.5622094869613647, 0.13621726632118225, 
+1.3595151901245117, -0.05113501846790314, 2.017774820327759, -2.5239627361297607, -0.627364456653595, 
+0.14979921281337738, -2.1009554862976074, 1.012874722480774, 1.2677595615386963, 0.8585178852081299, 
+0.09988638758659363, -0.44080090522766113, 0.7665157914161682, 0.016586877405643463, -0.7994748950004578, 
+0.10664643347263336, 0.16539372503757477, -0.19432376325130463, 0.6058536767959595, -1.3604260683059692, 
+-0.44693970680236816, -1.298148274421692, 0.45410192012786865, -0.554864764213562, 0.335803359746933, 
+0.9546852111816406, 0.624933123588562, 0.9768459796905518, 0.25842005014419556, -0.4054300785064697, 
+-1.6996837854385376, 0.20135314762592316, 0.8382725119590759, -0.03342894837260246, -2.76994252204895, 
+-0.023481864482164383, 1.9825886487960815, 0.06252804398536682, 1.9526125192642212, -1.0262318849563599, 
+-0.36829259991645813, 0.520388662815094, 1.7190419435501099, -1.2842885255813599, -1.7430235147476196, 
+-0.025869449600577354, -2.025484323501587, -0.4836043119430542, 0.23350125551223755, -0.22818070650100708, 
+-1.1153591871261597, 0.9934449195861816, -0.7161685824394226, 3.1856656074523926, 0.04865140840411186, 
+0.5151664614677429, -0.4664056897163391, 0.14041246473789215, 1.448596477508545, -0.7770887613296509, 
+0.17830130457878113, -0.2252204716205597, -1.2667378187179565, 0.9610496759414673, 1.9300105571746826, 
+-0.12258834391832352, -0.5268173217773438, 2.0762722492218018, 0.6260075569152832, -1.060702919960022, 
+1.312591314315796, -1.0897393226623535, -0.5517043471336365, 0.9224475026130676, 0.2609403729438782, 
+-2.512582540512085, 1.2950735092163086, 2.187084436416626, -1.7288422584533691, -0.5108821392059326, 
+-0.6434899568557739, -1.9548152685165405, -0.7637574672698975, 0.040594566613435745, 1.3754372596740723, 
+-0.3229776918888092, -1.868459701538086, -0.38640567660331726, -0.5314695239067078, 0.7233745455741882, 
+1.013132095336914, 0.14989662170410156, -1.481152892112732, -1.4715774059295654, 0.6556555032730103, 
+-0.69462651014328, 1.5715010166168213, -0.6675571203231812, 0.5907279253005981, -0.10922682285308838, 
+0.1150754764676094, -1.557976484298706, -1.3343995809555054, 1.144504189491272, 1.530625820159912, 
+-1.4132360219955444, 0.23218610882759094, -1.2135885953903198, 0.8163027763366699, -0.005583086982369423, 
+2.408255100250244, -2.29474139213562, 0.38779640197753906, 0.5610303282737732, 1.1082075834274292, 
+0.7555709481239319, -1.2329012155532837, 1.1368998289108276, -1.5387259721755981, 0.924216628074646, 
+-1.7694638967514038, -0.9657350182533264, 0.13636994361877441, -0.4481450319290161, 0.5049679279327393, 
+-0.8726932406425476, 0.20933207869529724, -1.2035185098648071, -0.8774356245994568, 0.017210369929671288, 
+1.2871423959732056, 1.6381969451904297, -1.2139216661453247, 0.32403504848480225, -0.7347640991210938, 
+-1.7952628135681152, 2.335822582244873, 0.20393972098827362, -0.44631385803222656, -0.9749850034713745, 
+1.9182950258255005, 1.862349271774292, 0.37142977118492126, -0.4424037039279938, -0.980487585067749, 
+0.8568188548088074, 1.4276903867721558, 0.3497353196144104, 0.1244051456451416, 0.8642684817314148, 
+-0.7915222644805908, -0.2343575358390808, 1.082565426826477, 0.4904420077800751, -1.0186747312545776, 
+1.1152315139770508, 0.6301456689834595, -0.3523968458175659, -0.3674444258213043, -0.6464170217514038, 
+-1.208842396736145, 0.5436532497406006, 1.1162910461425781, 0.3799380362033844, -0.4323980510234833, 
+-0.7974149584770203, -0.6664898991584778, 1.3442004919052124, 0.7428063750267029, -0.6915124654769897, 
+-1.4761401414871216, -1.0757232904434204, 1.3738008737564087, 0.13863621652126312, -1.3750499486923218, 
+0.7871050834655762, 1.2882057428359985, 0.4536629021167755, 0.320407897233963, -0.8852686882019043, 
+-0.7346636652946472, 2.0025229454040527, -0.23541156947612762, -0.4407753646373749, -0.7370651960372925
\ No newline at end of file
diff -r 79b8cd191fa8 -r 4ea2ba88338f weights_samples_layer.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/weights_samples_layer.txt	Sat Dec 02 21:14:53 2017 +0000
@@ -0,0 +1,100 @@
+0.05279841274023056, -1.733291745185852, -1.2278205156326294, 
+-1.429957389831543, 1.4384803771972656, 0.2619542181491852, 
+3.141296625137329, -0.3991163372993469, -0.5408545732498169, 
+1.5105302333831787, 1.0833921432495117, -0.7503972053527832, 
+1.8623473644256592, 1.3361053466796875, -1.1293799877166748, 
+-2.195751667022705, 1.468363881111145, -1.1127214431762695, 
+1.5815802812576294, -1.3982094526290894, 1.4465190172195435, 
+-1.079756498336792, 1.9226034879684448, -1.5495846271514893, 
+-1.8352645635604858, -1.0779410600662231, 2.53961443901062, 
+-1.4018564224243164, 1.0208971500396729, 1.3709357976913452, 
+2.930365800857544, -3.10469388961792, 0.8051547408103943, 
+-1.764528512954712, 0.24678745865821838, 2.11614727973938, 
+-2.292834758758545, 2.050809383392334, -1.087786316871643, 
+-1.8131085634231567, -1.572060465812683, 1.4053893089294434, 
+1.1540645360946655, 1.6814545392990112, 0.8811408877372742, 
+-0.7504298090934753, 0.8176472187042236, 0.30539679527282715, 
+-3.6291353702545166, -1.521715521812439, 2.026301622390747, 
+1.0513101816177368, -0.672660768032074, 0.7444250583648682, 
+-0.7370855808258057, -0.7541303038597107, -0.17796792089939117, 
+-3.1919972896575928, 0.6428942084312439, 1.4327900409698486, 
+0.4546475112438202, 0.3294161558151245, -2.7381186485290527, 
+0.12458384782075882, -0.0648316890001297, 0.47836852073669434, 
+-1.9210553169250488, 0.6443702578544617, 0.23975244164466858, 
+3.516342878341675, -0.5654531121253967, -0.5211353302001953, 
+1.3109056949615479, -0.6221874952316284, -0.4635767936706543, 
+0.3666786253452301, 0.3126975893974304, 0.7862853407859802, 
+1.8183794021606445, -2.0528078079223633, 1.9176493883132935, 
+-1.1176953315734863, 0.35550451278686523, -2.606173038482666, 
+-0.1057177484035492, -1.2271008491516113, -1.911115050315857, 
+-1.7595438957214355, 0.3800531327724457, 0.8889488577842712, 
+1.8730332851409912, 0.8819770216941833, -0.6152868866920471, 
+2.13071608543396, -0.3214806020259857, 2.29609751701355, 
+1.4242233037948608, -0.16777369379997253, -0.376604825258255, 
+-0.47600147128105164, 1.58083176612854, 0.5259484052658081, 
+-1.1247974634170532, 0.016737423837184906, -1.2009589672088623, 
+2.0727744102478027, -0.4586576521396637, 1.2213371992111206, 
+-2.7064030170440674, -1.783210039138794, -1.558905005455017, 
+1.2916147708892822, -0.48552802205085754, 0.641270101070404, 
+-0.39497923851013184, 1.58747398853302, -0.08154822885990143, 
+-3.3826956748962402, 1.6636273860931396, -1.4067013263702393, 
+-2.47812819480896, 1.5870569944381714, -2.0655510425567627, 
+2.440186023712158, -0.40678054094314575, 1.480538010597229, 
+4.139857292175293, -1.3341865539550781, -1.187088131904602, 
+1.4137892723083496, 2.5057950019836426, -0.6302675604820251, 
+-0.7703343033790588, -0.4658913314342499, 1.9169780015945435, 
+0.6224626302719116, 0.821179986000061, 0.7439038157463074, 
+-0.8621246218681335, 0.31524136662483215, 0.2212299108505249, 
+3.17201828956604, -1.2136622667312622, 0.5538533926010132, 
+1.1453591585159302, -1.6010303497314453, 1.3002146482467651, 
+-1.9103041887283325, 0.8758500814437866, -1.990999698638916, 
+0.7106482982635498, 1.5508531332015991, -1.2271124124526978, 
+0.05338333174586296, 1.3239855766296387, 1.2707302570343018, 
+-0.617136538028717, 1.6834137439727783, -1.7916539907455444, 
+1.305169939994812, -0.08131352812051773, 0.9696412086486816, 
+-3.1341612339019775, -0.8632379770278931, -0.017133524641394615, 
+-1.501175045967102, 0.52006596326828, -0.7893193364143372, 
+0.3314734995365143, -0.16718615591526031, 1.6278190612792969, 
+-2.347837209701538, 0.3084670305252075, -0.6203591823577881, 
+-1.6283236742019653, 0.6903172731399536, 0.14117580652236938, 
+-0.7632104754447937, -0.7274360060691833, -0.6113850474357605, 
+3.49922513961792, -0.3233855664730072, -0.7802674770355225, 
+0.6564523577690125, -0.6898549795150757, -0.4233964681625366, 
+-0.07158664613962173, -0.9206117987632751, -1.2735505104064941, 
+-0.30989208817481995, -0.12203694134950638, 1.465224266052246, 
+0.13906404376029968, 1.667748212814331, 0.9268525838851929, 
+-1.167473554611206, -1.1739442348480225, 0.5760869979858398, 
+0.6161013245582581, 0.4588852524757385, 0.4932396411895752, 
+-0.198497012257576, -0.516573965549469, -1.0691982507705688, 
+-1.4368919134140015, 0.22822490334510803, -0.9127119183540344, 
+-2.7373244762420654, -0.0017302322667092085, -0.304362952709198, 
+-1.6907564401626587, 0.1539621651172638, -1.0290770530700684, 
+-1.545198917388916, -0.8335516452789307, 3.240861177444458, 
+1.7268465757369995, -0.557794988155365, -0.21004730463027954, 
+0.23948876559734344, -0.4321350157260895, -1.513711929321289, 
+0.29415374994277954, 0.4840068221092224, 0.38123267889022827, 
+2.557450532913208, 0.6250896453857422, -0.6122658848762512, 
+-1.341346263885498, -2.248708486557007, 1.8351263999938965, 
+1.162818193435669, -1.1475790739059448, -1.2738033533096313, 
+-2.6102747917175293, 0.9246301054954529, 1.1018162965774536, 
+1.8298653364181519, -1.0019667148590088, -0.7976879477500916, 
+0.5317116975784302, -0.1464250385761261, -0.9617149829864502, 
+1.0902233123779297, 0.2388421595096588, -0.0971737802028656, 
+0.3859193027019501, -1.3775304555892944, 0.36790308356285095, 
+2.357349395751953, -0.6877498030662537, -1.5665541887283325, 
+0.49283066391944885, 0.7799434065818787, -1.3221218585968018, 
+0.29128125309944153, -0.33285725116729736, -0.9248268008232117, 
+-0.1690068393945694, -0.46229979395866394, 0.24799156188964844, 
+-0.48546019196510315, 1.3080989122390747, -1.3623580932617188, 
+0.37113767862319946, 1.7071683406829834, -0.5764961838722229, 
+-1.3320995569229126, 1.3328678607940674, 1.2234537601470947, 
+-1.5496186017990112, 1.4047062397003174, 1.8811678886413574, 
+-2.0354011058807373, 0.7650592923164368, 1.9785354137420654, 
+-1.5573701858520508, 1.238064169883728, 1.0393661260604858, 
+-1.1653738021850586, -1.7923096418380737, 0.6451001167297363, 
+-1.2677029371261597, -1.6866627931594849, 1.79912269115448, 
+0.5401389598846436, 0.624437689781189, 1.4214742183685303, 
+-0.21196621656417847, -0.5661278963088989, -0.7638283371925354, 
+-0.8819727897644043, -0.5658701062202454, -0.7832599878311157, 
+-1.3925007581710815, 0.6573151350021362, 1.9029452800750732, 
+-1.9299737215042114, 1.0803725719451904, 1.2761074304580688
\ No newline at end of file