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

when i change the number of train pictures,I got error #13

Open
zcx9112040 opened this issue Jan 11, 2017 · 0 comments
Open

when i change the number of train pictures,I got error #13

zcx9112040 opened this issue Jan 11, 2017 · 0 comments

Comments

@zcx9112040
Copy link

At first i put 1000 photos in data/train ,then i run "python train_nn.py --cnf configs/c_128_5x5_32.py",there is nothing wrong, but when i put 35000 photos in data/train, i got error, I sure i have changed the labels too,failed as this:
Traceback (most recent call last):
File "train_nn.py", line 41, in
main()
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "train_nn.py", line 38, in main
net.fit(files, labels)
File "/usr/local/lib/python2.7/dist-packages/nolearn-0.6a0.dev0-py2.7.egg/nolearn/lasagne/base.py", line 416, in fit
self.train_loop(X, y)
File "/home/zcx/kaggle_diabetic-deterministic/nn.py", line 219, in train_loop
X, y, self.eval_size)
File "/home/zcx/kaggle_diabetic-deterministic/nn.py", line 126, in train_test_split
X, y, test_size=eval_size)
File "/home/zcx/kaggle_diabetic-deterministic/data.py", line 293, in split
train, test = split_indices(files, labels, test_size, random_state)
File "/home/zcx/kaggle_diabetic-deterministic/data.py", line 281, in split_indices
labels = get_labels(names, per_patient=True)
File "/home/zcx/kaggle_diabetic-deterministic/data.py", line 222, in get_labels
return np.vstack([labels[left], labels[~left]]).T
File "/usr/local/lib/python2.7/dist-packages/numpy/core/shape_base.py", line 228, in vstack
return _nx.concatenate([atleast_2d(_m) for _m in tup], 0)
ValueError: all the input array dimensions except for the concatenation axis must match exactly
what should i do? can you give me some advice?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant