NeuraLegion / shainet

SHAInet - a pure Crystal machine learning library
MIT License
181 stars 19 forks source link

Fix to load and save #50

Closed drujensen closed 6 years ago

drujensen commented 6 years ago

This tests demonstrates that you will get different results before and after loading a nn:

I, [2018-01-06 07:58:22 -08:00 #40476]  INFO -- : Network saved to: ./xor.nn
I, [2018-01-06 07:58:22 -08:00 #40476]  INFO -- : Input => [0, 0], network output => [0.0416752276619
8796]
I, [2018-01-06 07:58:22 -08:00 #40476]  INFO -- : Input => [1, 0], network output => [0.9590614710119
355]
I, [2018-01-06 07:58:22 -08:00 #40476]  INFO -- : Input => [0, 1], network output => [0.9504523596048
097]
I, [2018-01-06 07:58:22 -08:00 #40476]  INFO -- : Input => [1, 1], network output => [0.0445074066223
7179]
.I, [2018-01-06 07:58:22 -08:00 #40476]  INFO -- : Network loaded from: ./xor.nn
I, [2018-01-06 07:58:22 -08:00 #40476]  INFO -- : Input => [0, 0], network output => [0.0416752276619
8802]
I, [2018-01-06 07:58:22 -08:00 #40476]  INFO -- : Input => [1, 0], network output => [0.9979832038121
226]
I, [2018-01-06 07:58:22 -08:00 #40476]  INFO -- : Input => [0, 1], network output => [0.9922736775944
813]
I, [2018-01-06 07:58:22 -08:00 #40476]  INFO -- : Input => [1, 1], network output => [0.0762687867509
8049]
bararchy commented 6 years ago

@drujensen Can you just remove the xor.nn file?