SciSharp / SiaNet

An easy to use C# deep learning library with CUDA/OpenCL support
https://scisharp.github.io/SiaNet
MIT License
380 stars 83 forks source link

Example not reducing loss #3

Closed Sam7 closed 6 years ago

Sam7 commented 6 years ago

Thanks a lot for making a start on this great library. It's much appreciated! I have high hopes for CNTK on .NET so great work on pioneering a Keras style library!!

I've just tried to run the example. It runs fine, but it's not actually learning. (Based on last commit Wednesday, 8 November 2017 8:45:12 AM):

Epoch: 1, Loss: 2.30605627276727, Accuracy: 0.890608324439701
Epoch: 2, Loss: 2.30215639003322, Accuracy: 0.892077323717949
Epoch: 3, Loss: 2.30211564978006, Accuracy: 0.890541622198506
Epoch: 4, Loss: 2.30210599838159, Accuracy: 0.889840411324786
Epoch: 5, Loss: 2.30213043173197, Accuracy: 0.890474919957311
Epoch: 6, Loss: 2.30217392449705, Accuracy: 0.890992254273504
Epoch: 7, Loss: 2.30216704488691, Accuracy: 0.890641675560299
Epoch: 8, Loss: 2.30213429097436, Accuracy: 0.889823717948718
Epoch: 9, Loss: 2.30213692781129, Accuracy: 0.889891275346852
Epoch: 10, Loss: 2.30221930833963, Accuracy: 0.890591613247863

Am I missing something?

deepakkumar1984 commented 6 years ago

Thanks Sam for the nice words. Let see how this library evolves. I have made the fix in the code for the learning issue and also reduced the learning rate in the example. Have implemented the batch-wise event to give you more information how the training goes every batch. Please pull the latest code and test it out.

batchwiselogs
Sam7 commented 6 years ago

Great, thanks! It's working now.