Skip to content

Commit 48f94de

Browse files
committed
move examples into directory
1 parent 4bd5f6b commit 48f94de

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
mnist/
1+
examples/mnist/
File renamed without changes.

iris.rb renamed to examples/iris.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
require './neural_net'
1+
require_relative '../neural_net'
22

33
# This neural network will predict the species of an iris based on sepal and petal size
44
# Dataset: http://en.wikipedia.org/wiki/Iris_flower_data_set
55

6-
rows = File.readlines("iris.data").map {|l| l.chomp.split(',') }
6+
rows = File.readlines("examples/iris.data").map {|l| l.chomp.split(',') }
77

88
rows.shuffle!
99

mnist.rb renamed to examples/mnist.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
require './neural_net'
1+
require_relative '../neural_net'
22
require 'zlib'
33

44
# This neural net performs OCR on handwritten digits from the MNIST dataset
55
# MNIST datafiles can be downloaded here: http://yann.lecun.com/exdb/mnist/
66

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'
99

1010
unless File.exist?(mnist_images_file) && File.exist?(mnist_labels_file)
1111
raise "Missing MNIST datafiles\nMNIST datafiles must be present in an mnist/ directory\nDownload from: http://yann.lecun.com/exdb/mnist/"

0 commit comments

Comments
 (0)