mnist reader and NN in ruby