hughperkins / DeepCL

OpenCL library to train deep convolutional neural networks
Mozilla Public License 2.0
865 stars 199 forks source link

ManifestLoader bug fix #88

Closed merceyz closed 7 years ago

merceyz commented 7 years ago

Fixes issue with a image path having a space in it

hughperkins commented 7 years ago

Hmmm, on linux, when I run the test script I get:

ubuntu@peach:~/git/DeepCL/build$ bash ../test/scripts/test_manifestloader.sh 
+ set -e
+ [[ -d /tmp/testmanifest ]]
+ rm -Rf /tmp/testmanifest
+ [[ -f /bin/sync ]]
+ sync
+ mkdir /tmp/testmanifest
+ source ../dist/bin/activate.sh
+ MNISTDIR=../data/mnist
+ MNISTFILE=../data/mnist/train-images-idx3-ubyte
+ '[' -f ../data/mnist/train-images.idx3-ubyte ']'
+ mnist-to-jpegs ../data/mnist/train-images-idx3-ubyte /tmp/testmanifest 1280
+ deepcl_train datadir=/tmp/testmanifest trainfile=manifest.txt validatefile=manifest.txt numtrain=1280 numtest=1280 learningrate=0.002 numepochs=3
Statefultimer enabled: 0
ManifestLoaderv1 checking format for /tmp/testmanifest/manifest.txt
matched: 1
ManifestLoaderv1 checking format for /tmp/testmanifest/manifest.txt
matched: 1
read file int=0
N is: 1280
read file int=1
doing alloc N=1280
manifest /tmp/testmanifest/manifest.txt read. N=1280 planes=1 size=28 labels? 1
Ntrain 1280 numPlanes 1 imageSize 28
Something went wrong: can't open /tmp/testmanifest/R1315130/0.JPEG 

Strangely, this file exists:

ubuntu@peach:~/git/DeepCL/build$ ls -lh /tmp/testmanifest/R1315130/0.JPEG 
-rw-rw-r-- 1 ubuntu ubuntu 610 Aug 22 13:11 /tmp/testmanifest/R1315130/0.JPEG

Thoughts?

merceyz commented 7 years ago

Windows didn't care that there was a space at the end, I think linux does. Try again now

hughperkins commented 7 years ago

re: fix => Works better now :-)

re: PR => Cool! :-) Thank you Chris