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

all the input arrays must have same number of dimensions, but the array at index 0 has 1 dimension(s) and the array at index 1 has 0 dimension(s) #115

Open
Tian14267 opened this issue Jul 8, 2020 · 4 comments
Labels

Comments

@Tian14267
Copy link

Describe the bug
I get this error:
Traceback (most recent call last):
File "torch2keras.py", line 83, in
transforms_2()
File "torch2keras.py", line 76, in transforms_2
k_model = pytorch_to_keras(model.module, input_var, (3, 448, 448), verbose=True, name_policy='short')
File "/home/fffan/.local/lib/python3.7/site-packages/pytorch2keras/converter.py", line 83, in pytorch_to_keras
verbose=verbose, change_ordering=change_ordering)
File "/home/fffan/.local/lib/python3.7/site-packages/onnx2keras/converter.py", line 181, in onnx_to_keras
keras_names
File "/home/fffan/.local/lib/python3.7/site-packages/onnx2keras/reshape_layers.py", line 107, in convert_concat
layers[node_name] = np.concatenate(layer_input, axis=params['axis'])
File "<array_function internals>", line 6, in concatenate
ValueError: all the input arrays must have same number of dimensions, but the array at index 0 has 1 dimension(s) and the array at index 1 has 0 dimension(s)

Code
9CD1FD67666CB11EC1E3C893B041C267

Environment (please complete the following information):

  • onnx: 1.7
  • Python 3.7
  • pyotrch2keras: 0.2.4

Does somebody know how solve this problem?

@Tian14267 Tian14267 added the bug label Jul 8, 2020
@SWHL
Copy link

SWHL commented Sep 1, 2020

I have the same problem with you.

@thbupt
Copy link

thbupt commented Sep 11, 2020

same problem too.

1 similar comment
@thbupt
Copy link

thbupt commented Sep 11, 2020

same problem too.

@nikhilbyte
Copy link

did someone manage to solve it
?

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

No branches or pull requests

4 participants