model export error
Created by: sukkyusun1
i tried to export model before infering
following error occured
python -u tools/export_model.py -c configs/ppyolo/ppyolo.yml --output_dir=./inference_model -o weights=output/ppyolo1/model_final Traceback (most recent call last): File "tools/export_model.py", line 225, in main() File "tools/export_model.py", line 200, in main test_fetches = model.test(feed_vars, exclude_nms=FLAGS.exclude_nms) File "/home/sk/PaddleDetection/ppdet/modeling/architectures/yolo.py", line 165, in test return self.build(feed_vars, mode='test', exclude_nms=exclude_nms) File "/home/sk/PaddleDetection/ppdet/modeling/architectures/yolo.py", line 93, in build body_feats, im_size, exclude_nms=exclude_nms) File "/home/sk/PaddleDetection/ppdet/modeling/anchor_heads/yolo_head.py", line 416, in get_prediction outputs = self._get_outputs(input, is_train=False) File "/home/sk/PaddleDetection/ppdet/modeling/anchor_heads/yolo_head.py", line 341, in _get_outputs name=self.prefix_name + "yolo_block.{}".format(i)) File "/home/sk/PaddleDetection/ppdet/modeling/anchor_heads/yolo_head.py", line 226, in _detection_block conv = self._add_coord(conv, is_test=is_test) File "/home/sk/PaddleDetection/ppdet/modeling/anchor_heads/yolo_head.py", line 147, in _add_coord return fluid.layers.concat([input, x_range, y_range], axis=1) File "/home/sk/anaconda3/envs/paddle3.6/lib/python3.6/site-packages/paddle/fluid/layers/tensor.py", line 375, in concat type='concat', inputs=inputs, outputs={'Out': [out]}, attrs=attrs) File "/home/sk/anaconda3/envs/paddle3.6/lib/python3.6/site-packages/paddle/fluid/layer_helper.py", line 43, in append_op return self.main_program.current_block().append_op(*args, **kwargs) File "/home/sk/anaconda3/envs/paddle3.6/lib/python3.6/site-packages/paddle/fluid/framework.py", line 2610, in append_op attrs=kwargs.get("attrs", None)) File "/home/sk/anaconda3/envs/paddle3.6/lib/python3.6/site-packages/paddle/fluid/framework.py", line 1971, in init self.desc.infer_shape(self.block.desc) paddle.fluid.core_avx.EnforceNotMet:
C++ Call Stacks (More useful to developers): 0 std::string paddle::platform::GetTraceBackString<std::string const&>(std::string const&, char const*, int) 1 paddle::platform::EnforceNotMet::EnforceNotMet(std::string const&, char const*, int) 2 paddle::operators::ConcatOp::InferShape(paddle::framework::InferShapeContext*) const 3 paddle::framework::OpDesc::InferShape(paddle::framework::BlockDesc const&) const
Python Call Stacks (More useful to users): File "/home/sk/anaconda3/envs/paddle3.6/lib/python3.6/site-packages/paddle/fluid/framework.py", line 2610, in append_op attrs=kwargs.get("attrs", None)) File "/home/sk/anaconda3/envs/paddle3.6/lib/python3.6/site-packages/paddle/fluid/layer_helper.py", line 43, in append_op return self.main_program.current_block().append_op(*args, **kwargs) File "/home/sk/anaconda3/envs/paddle3.6/lib/python3.6/site-packages/paddle/fluid/layers/tensor.py", line 375, in concat type='concat', inputs=inputs, outputs={'Out': [out]}, attrs=attrs) File "/home/sk/PaddleDetection/ppdet/modeling/anchor_heads/yolo_head.py", line 147, in _add_coord return fluid.layers.concat([input, x_range, y_range], axis=1) File "/home/sk/PaddleDetection/ppdet/modeling/anchor_heads/yolo_head.py", line 226, in _detection_block conv = self._add_coord(conv, is_test=is_test) File "/home/sk/PaddleDetection/ppdet/modeling/anchor_heads/yolo_head.py", line 341, in _get_outputs name=self.prefix_name + "yolo_block.{}".format(i)) File "/home/sk/PaddleDetection/ppdet/modeling/anchor_heads/yolo_head.py", line 416, in get_prediction outputs = self._get_outputs(input, is_train=False) File "/home/sk/PaddleDetection/ppdet/modeling/architectures/yolo.py", line 93, in build body_feats, im_size, exclude_nms=exclude_nms) File "/home/sk/PaddleDetection/ppdet/modeling/architectures/yolo.py", line 165, in test return self.build(feed_vars, mode='test', exclude_nms=exclude_nms) File "tools/export_model.py", line 200, in main test_fetches = model.test(feed_vars, exclude_nms=FLAGS.exclude_nms) File "tools/export_model.py", line 225, in main()
Error Message Summary: InvalidArgumentError: The 2-th dimension of input[0] and input[2] is expected to be equal.But received input[0]'s shape = [-1, 2048, 81, 54], input[2]'s shape = [1, 1, 54, 81]. [Hint: Expected inputs_dims[0][j] == inputs_dims[i][j], but received inputs_dims[0][j]:81 != inputs_dims[i][j]:54.] at (/paddle/paddle/fluid/operators/concat_op.h:63) [operator < concat > error]