File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
- mnist /
1
+ examples / mnist /
File renamed without changes.
Original file line number Diff line number Diff line change 1
- require ' ./neural_net'
1
+ require_relative '. ./neural_net'
2
2
3
3
# This neural network will predict the species of an iris based on sepal and petal size
4
4
# Dataset: http://en.wikipedia.org/wiki/Iris_flower_data_set
5
5
6
- rows = File . readlines ( "iris.data" ) . map { |l | l . chomp . split ( ',' ) }
6
+ rows = File . readlines ( "examples/ iris.data" ) . map { |l | l . chomp . split ( ',' ) }
7
7
8
8
rows . shuffle!
9
9
Original file line number Diff line number Diff line change 1
- require ' ./neural_net'
1
+ require_relative '. ./neural_net'
2
2
require 'zlib'
3
3
4
4
# This neural net performs OCR on handwritten digits from the MNIST dataset
5
5
# MNIST datafiles can be downloaded here: http://yann.lecun.com/exdb/mnist/
6
6
7
- mnist_images_file = 'mnist/train-images-idx3-ubyte.gz'
8
- mnist_labels_file = 'mnist/train-labels-idx1-ubyte.gz'
7
+ mnist_images_file = 'examples/ mnist/train-images-idx3-ubyte.gz'
8
+ mnist_labels_file = 'examples/ mnist/train-labels-idx1-ubyte.gz'
9
9
10
10
unless File . exist? ( mnist_images_file ) && File . exist? ( mnist_labels_file )
11
11
raise "Missing MNIST datafiles\n MNIST datafiles must be present in an mnist/ directory\n Download from: http://yann.lecun.com/exdb/mnist/"
You can’t perform that action at this time.
0 commit comments