XifengGuo / DEC-keras

Keras implementation for Deep Embedding Clustering (DEC)
MIT License
477 stars 162 forks source link

train_y.bin #7

Closed dnnguifever closed 5 years ago

dnnguifever commented 6 years ago

Thank you for your contribution!

python DEC.py --dataset mnist

This runs fine.

However,

python run_exp.py yields this:

Reached tolerance threshold. Stopping training. ('saving model to:', './results/exp1/reuters10k/trial9/DEC_model_final.h5') Traceback (most recent call last): File "run_exp.py", line 26, in x, y = load_data(db) File "./datasets.py", line 324, in load_data return load_stl() File "./datasets.py", line 283, in load_stl y1 = np.fromfile(data_path + '/train_y.bin', dtype=np.uint8) - 1 IOError: [Errno 2] No such file or directory: './data/stl/train_y.bin'

Any ideas on what the problem is? Much appreciated. Thanks.

XifengGuo commented 6 years ago

@dnnguifever You need prepare the data before running the code. E.g., you can prepare STL dataset by using the following commands:

cd data/stl      
bash get_data.sh      
cd ../..      

Other datasets can be prepared according to README

dnnguifever commented 6 years ago

Thank you for your response. I have re-performed that step, just to make sure I have done it, and still, I get the same " IOError: [Errno 2] No such file or directory: './data/stl/train_y.bin' " error.

Any other ideas? I appreciate your help. Thanks.

dnnguifever commented 6 years ago

Whoops, did not unpack the data enough before. I've unpacked it, will try it again now. Thanks.

dnnguifever commented 6 years ago
"No data! Use %s/get_data.sh to get data ready, then come back" % data_path

AssertionError: No data! Use ./data/stl/get_data.sh to get data ready, then come back

I have run: cd data/stl
bash get_data.sh
cd ../..

And unpacked the data, revealing train_y.bin and other files. Now, instead of getting the train_y.bin error, I am getting the error above.

Am I doing something wrong?

Thanks!

XifengGuo commented 6 years ago

@dnnguifever After unpacking, there should be at least four files existing in 'data/stl': train_X.bin, test_X.bin, train_y.bin, test_y.bin. Please make sure that satisfied. See details on http://ai.stanford.edu/~acoates/stl10/

dnnguifever commented 6 years ago

-rw-r--r-- 1 221184000 Sep 21 10:43 test_X.bin -rw-r--r-- 1 8000 Sep 21 10:43 test_y.bin -rw-r--r-- 1 138240000 Sep 21 10:43 train_X.bin -rw-r--r-- 1 5000 Sep 21 10:42 train_y.bin

Those are four files in my data/stl folder. I am still getting that error.

Thank you for your help!

XifengGuo commented 6 years ago

@dnnguifever Maybe you can implement load_stl() by yourself according to http://ai.stanford.edu/~acoates/stl10/. It is very easy.