PaddlePaddle / PaddleHub

Awesome pre-trained models toolkit based on PaddlePaddle. (400+ models including Image, Text, Audio, Video and Cross-Modal with Easy Inference & Serving)【安全加固,暂停交互,请耐心等待】
https://www.paddlepaddle.org.cn/hub
Apache License 2.0
12.73k stars 2.07k forks source link

模型运行报错:operands could not be broadcast together with remapped shapes #1128

Closed yanchaoguo closed 3 years ago

yanchaoguo commented 3 years ago

Traceback (most recent call last):

File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap self.run()

File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/multiprocessing/process.py", line 99, in run self._target(*self._args, **self._kwargs)

File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlex/cv/datasets/dataset.py", line 166, in _read_into_queue six.reraise(*sys.exc_info())

File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/six.py", line 703, in reraise raise value

File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlex/cv/datasets/dataset.py", line 158, in _read_into_queue result = mapper(sample[0], sample[1], sample[2])

File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlex/cv/transforms/seg_transforms.py", line 152, in call outputs = op(im, im_info, label)

File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddlex/cv/transforms/seg_transforms.py", line 759, in call self.label_padding_value)) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/numpy/lib/arraypad.py", line 1172, in pad pad_width = _as_pairs(pad_width, narray.ndim, as_index=True) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/numpy/lib/arraypad.py", line 953, in _as_pairs return np.broadcast_to(x, (ndim, 2)).tolist() File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/numpy/lib/stride_tricks.py", line 182, in broadcast_to return _broadcast_to(array, shape, subok=subok, readonly=True) File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/numpy/lib/stride_tricks.py", line 129, in _broadcast_to op_flags=[op_flag], itershape=shape, order='C') ValueError: operands could not be broadcast together with remapped shapes [original->remapped]: (2,2) and requested shape (3,2)

haoyuying commented 3 years ago

请问是paddlehub的模型吗,如果是,请给出具体的运行脚本,运行环境等信息,方便我们复现问题。