-
Notifications
You must be signed in to change notification settings - Fork 28
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
C3D model crashes with shape mismatch #15
Comments
Ok, I have this working. I have patched the c3d model to take the correct input dimensions depending on you |
How do you solve this problem? I have added data_format='channels_first' in each layer, such that the shape mismatch is solved. But when I run c3d_model.load_weights(filepath), it will result in KeyError: "Can't open attribute (Can't locate attribute: 'layer_names')". |
Hi @lihengbit as I said above, I patched keras to reshuffle the weights. It's quite some time ago and I haven't used it since. So it would be a bit more work to actually dig it out again. Also, I feel that your code has diverged a bit from my solution anyway. Could you at least provide a bit more detail about your error message? |
@lihengbit I'm hitting the same issue, any luck? |
I got the same error when I use: Traceback (most recent call last): Anyone has solution? |
Hi,
I'm trying to run the c3d model from the keras model zoo, but it doesn't even initialize. When I do:
The model crashed in line 33 of the c3d module when it tries to add a MaxPooling3D layer. Here is the tail of the backtrace:
The error message is pretty clear but it really happens in the depth of the keras backend and it's not quite obvious which statement actually resulted in this dimension mismatch. I went to the place where the tensorflow max-pooling operation is actually created by the keras backend and looked at the dimensions. Pooling is actually applied with a pool size of
(1, 2, 2, 2 , 1)
and strides of(1, 2, 2, 2, 1)
to a relu-tensor of shape(?, 1, 4, 28, 256)
. The error probably results from the second dimensions.I suspected that this might be due to differences in dimension ordering between tensorflow and theano and tried with theano as well. Indeed it gets further but then crashes in line 56 when the
Flatten()
operation is added. Given that I am not really interested in getting it to run with the theano backend, I didn't investigate any further.Did anybody have success running the c3d model with tensorflow? Am I missing something important? Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: