pytorch2keras icon indicating copy to clipboard operation
pytorch2keras copied to clipboard

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)

Open Tian14267 opened this issue 5 years ago • 4 comments
trafficstars

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 avatar Jul 08 '20 01:07 Tian14267

I have the same problem with you.

SWHL avatar Sep 01 '20 09:09 SWHL

same problem too.

thbupt avatar Sep 11 '20 09:09 thbupt

same problem too.

thbupt avatar Sep 11 '20 09:09 thbupt

did someone manage to solve it ?

nikhilbyte avatar Jan 13 '21 17:01 nikhilbyte