Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
masatoi committed Feb 16, 2019
2 parents e3a4ea0 + 583e86f commit 369dd14
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions example/classification/cifar10.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

;; Download CIFAR-10 binary version and extract to directory.
;; http://www.cs.toronto.edu/~kriz/cifar.html
(defparameter dir #P"/home/wiz/datasets/cifar-10-batches-bin/")
(defparameter dir (asdf:system-relative-pathname :cl-random-forest "dataset/"))
(ensure-directories-exist dir)
(uiop:run-program (format nil "cd ~a ; [ -e cifar-10-binary.tar.gz ] || wget http://www.cs.toronto.edu/~~kriz/cifar-10-binary.tar.gz ; tar xf cifar-10-binary.tar.gz" dir))

(defparameter dim 3072)
(defparameter n-class 10)
Expand All @@ -32,9 +34,9 @@
'done))

(loop for i from 0 to 4 do
(load-cifar (merge-pathnames (format nil "data_batch_~A.bin" (1+ i)) dir) x y i))
(load-cifar (merge-pathnames (format nil "cifar-10-batches-bin/data_batch_~A.bin" (1+ i)) dir) x y i))

(load-cifar (merge-pathnames "test_batch.bin" dir) x.t y.t 0)
(load-cifar (merge-pathnames "cifar-10-batches-bin/test_batch.bin" dir) x.t y.t 0)

;;; ======================================================================

Expand Down

0 comments on commit 369dd14

Please sign in to comment.