Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix download #398

Merged
merged 4 commits into from Apr 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitattributes
Expand Up @@ -13,8 +13,9 @@

# Declare files that will always have CRLF line endings on checkout.
*.sln text eol=crlf
*.bat text eol=crlf

# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
*.svg text
*.svg text
8 changes: 7 additions & 1 deletion .gitignore
Expand Up @@ -26,4 +26,10 @@ _testmain.go
cudamodules.go

# vendor
/vendor
/vendor

# Example files
examples/convnet/tmp.dot
examples/iris/cmd/theta.bin
examples/iris/theta.bin
examples/testdata
15 changes: 15 additions & 0 deletions examples/mnist/download.bat
@@ -0,0 +1,15 @@
@echo off

setlocal
set PWD=%~dp0
mkdir ..\testdata\mnist 2>NUL
cd /D..\testdat\mnista

curl -O http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz
curl -O http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz
curl -O http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz
curl -O http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz

gzip -f -d t*-ubyte.gz

cd /D %PWD%
7 changes: 5 additions & 2 deletions examples/mnist/download.sh
@@ -1,11 +1,14 @@
#!/bin/bash

DST=${1:-$GOPATH/src/gorgonia.org/gorgonia/examples/testdata}
set -e

DST=$(cd $(dirname $0)/../testdata/mnist; pwd)
mkdir -p $DST 2> /dev/null
cd "$DST"

curl -O http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz
curl -O http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz
curl -O http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz
curl -O http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz

gunzip t*-ubyte.gz
gzip -f -d t*-ubyte.gz