HuwCampbell / grenade

Deep Learning in Haskell
BSD 2-Clause "Simplified" License
1.44k stars 84 forks source link

I can't seem to get the examples to produce decent results #53

Closed sholland1 closed 6 years ago

sholland1 commented 6 years ago

I can't seem to get the examples to produce decent results.

OS: Ubuntu 16.04 LTS 64-bit

I installed blas and lapack with

sudo apt-get install libblas-dev sudo apt-get install liblapack-dev

I ran ../mafia build from the examples directory.

This gist contains the output I got from running the mnist, gan-mnist, and shakespeare examples: https://gist.github.com/sholland1/e4c9047ea683f4bf8dbc6516006f85ad

MNIST data: https://pjreddie.com/projects/mnist-in-csv/ Shakespeare data: https://raw.githubusercontent.com/karpathy/char-rnn/master/data/tinyshakespeare/input.txt

I also tried checking out the code at v0.1.0 and running the mnist example, but I got similar results.

Please assist me in figuring out what the problem is.

HuwCampbell commented 6 years ago

For MNIST I have normalised the input data to between 0 and 1, so I would start there. For the classifier, I would also advise using the network from the README, as it's much simpler than the inception style one in the demo file.

The Shakespeare one takes a considerable amount of time. I think I sped things up by bootstrapping it by training first with a smaller number of characters (20 or 30) to get word recognition down before lengthening it later to start seeing more interesting structure.

I think really I should just put the example data and maybe a Shakespeare model in the repo, so people have an easier place to start.

sholland1 commented 6 years ago

Yep. Normalizing the MNIST data did the trick. On the 15th iteration, I got 9896 out of 10000.

Thanks.