Neural Network code in Julia based on http://cs.stanford.edu/people/karpathy/convnetjs/index.html