Closed LanaSina closed 7 years ago
Hmm I just tested again and everything works fine for me. What version of keras are you using? And can you check K.dim_ordering?
Sorry about the Python 3 issue, I'll add a note in the readme.
Hi, thanks for your answer!
I am using Keras 1.1.1, Theano backend. I just noticed you used version 1.0.7 so I installed it. I use Python 2.7. Still getting the same error. BTW dim_ordering is "th"
Not sure if relevant but I am running the code on CPU, planning to move to our GPU machine if it looks like I can get it to run without errors on my computer.
Ah gotcha, I've never actually tried on CPU. Not sure why it wouldn't work/what would make it different, but I'll look into it. In the meantime, I would suggest trying it with the GPU.
Ok I'll do that. Can you just tell me the version of theano you are using?
I'm using 0.9.0. I would just install the bleeding edge version: pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git
Hi, I tried on GPU and got the exact same error: "all the input array dimensions except for the concatenation axis must match exactly". I wonder if other people managed to get your code to work on other machines or if it is just me missing something obvious.
It seems that I have other problems in my configuration, so let me fix that first
I've got same problem Already tried to use Keras 1.0.7 and Theano 0.9.0, both CPU and GPU
GPU raises
ValueError: GpuJoin: Wrong inputs for input 3 related to inputs 0.!
Apply node that caused the error: GpuJoin(TensorConstant{1}, <CudaNdarrayType(float32, 4D)>, <CudaNdarrayType(float32, 4D)>, GpuReshape{4}.0)
GPU output in attachement prednet.txt
Sorry for the delay. I have not managed to run the code yet, but I am trying it on different configurations to see if I can pin down what is going wrong.
Can you tell me which version of cudnn and cuda you are using?
Or maybe you don't use cudnn? When I deactivate cudnn use but still run on gpu, I get a different kind of super cryptic error for kitti_evaluate.py so I tried kitti_train.py; that gave me a new input shape error
File "kitti_train.py", line 75, in <module> validation_data=val_generator, nb_val_samples=N_seq_val) File "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 1461, in fit_generator class_weight=class_weight) File "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 1233, in train_on_batch check_batch_dim=True) File "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 979, in _standardize_user_data exception_prefix='model input') File "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 111, in standardize_input_data str(array.shape)) Exception: Error when checking model input: expected input_1 to have shape (None, 10, 3, 128, 160) but got array with shape (4, 10, 128, 160, 3)
Any idea what kind of global setting might cause all these shape errors?
I am also getting the same exact input shape error as above when running kitti_train.py. Tried running prednet on various GPUs (k80, gtx980, m40) and on various systems as user and sudo, but no luck.
Using Theano backend.
Epoch 1/150
Traceback (most recent call last):
File "kitti_train.py", line 75, in <module>
validation_data=val_generator, nb_val_samples=N_seq_val)
File "/home-2/roblim1/theano/lib/python2.7/site-packages/Keras-1.1.1-py2.7.egg/keras/engine/training.py", line 1475, in fit_generator
class_weight=class_weight)
File "/home-2/roblim1/theano/lib/python2.7/site-packages/Keras-1.1.1-py2.7.egg/keras/engine/training.py", line 1244, in train_on_batch
check_batch_dim=True)
File "/home-2/roblim1/theano/lib/python2.7/site-packages/Keras-1.1.1-py2.7.egg/keras/engine/training.py", line 987, in _standardize_user_data
exception_prefix='model input')
File "/home-2/roblim1/theano/lib/python2.7/site-packages/Keras-1.1.1-py2.7.egg/keras/engine/training.py", line 111, in standardize_input_data
str(array.shape))
Exception: Error when checking model input: expected input_1 to have shape (None, 10, 3, 128, 160) but got array with shape (4, 10, 128, 160, 3)
This fix https://github.com/coxlab/prednet/pull/5/files from @EderSantana worked. Plus not using cudnn (I think that's an issue in my configuration). Thank you!
Update: that fixed the kitti_evaluate bug, but not the shape bug from kitty_train. Can someone confirm?
There is a default setting in the keras.json file in .keras mine had as default
"image_dim_ordering": "tf",
I just changed it back to th. Everything works now. In the end @bill-lotter 's 1st message was very close to the issue - it wasn't K.dim_ordering or the backend setting itself, but image_dim_ordering. I will mark the issue as closed.
Sorry about this, I tried to make it compatible with both dimension orderings (e.g. https://github.com/coxlab/prednet/blob/master/data_utils.py#L22), but guess it didn't work. I'll work to make it compatible for both.
I am trying to run PredNet using the pre-processed data and the pretrained model, nothing modified in the code. (Unrelated: It would be nice to indicate somewhere that your model doesn't support Python 3! Or maybe it was written and I missed it?)
For
python kitti_evaluate.py
I get the following error: