直接修改模型和字典会报错,是不是哪里还要设置?例如我想用官方模型库里的ppyolov2_r50vd_dcn_365e_publaynet该怎么办?没看到文档里有说明 https://github.com/PaddlePaddle/PaddleOCR/blob/ release/2.6/ppstruct/docs/models_list.md 报错:layout_res, elapse = self.layout_predictor(img) self.predictor.run() ValueError: In user code:
File "tools/export_model.py", line 107, in <module>
main()
File "tools/export_model.py", line 103, in main
run(FLAGS, cfg)
File "tools/export_model.py", line 69, in run
trainer.export(FLAGS.output_dir)
File "/Users/anmengtao/Desktop/model_ED/PaddleDetection-release-2.0/ppdet/engine/trainer.py", line 460, in export
input_spec, static_model.forward.main_program,
File "/Users/anmengtao/opt/anaconda3/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/program_translator.py", line 534, in main_program
concrete_program = self.concrete_program
File "/Users/anmengtao/opt/anaconda3/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/program_translator.py", line 454, in concrete_program
return self.concrete_program_specify_input_spec(input_spec=None)
File "/Users/anmengtao/opt/anaconda3/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/program_translator.py", line 487, in concrete_program_specify_input_spec
concrete_program, _ = self.get_concrete_program(
File "/Users/anmengtao/opt/anaconda3/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/program_translator.py", line 402, in get_concrete_program
concrete_program, partial_program_layer = self._program_cache[cache_key]
File "/Users/anmengtao/opt/anaconda3/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/program_translator.py", line 711, in __getitem__
self._caches[item] = self._build_once(item)
File "/Users/anmengtao/opt/anaconda3/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/program_translator.py", line 698, in _build_once
concrete_program = ConcreteProgram.from_func_spec(
File "<decorator-gen-58>", line 2, in from_func_spec
File "/Users/anmengtao/opt/anaconda3/lib/python3.8/site-packages/paddle/fluid/wrapped_decorator.py", line 25, in __impl__
return wrapped_func(*args, **kwargs)
File "/Users/anmengtao/opt/anaconda3/lib/python3.8/site-packages/paddle/fluid/dygraph/base.py", line 39, in __impl__
return func(*args, **kwargs)
File "/Users/anmengtao/opt/anaconda3/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/program_translator.py", line 652, in from_func_spec
outputs = static_func(*inputs)
File "/var/folders/0t/0lmgjgfj7012tggtgbwtqby80000l2/T/tmpk8piw4sd.py", line 26, in forward
out = paddle.jit.dy2static.convert_ifelse(self.training, true_fn_1,
File "/Users/anmengtao/opt/anaconda3/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/convert_operators.py", line 210, in convert_ifelse
return _run_py_ifelse(pred, true_fn, false_fn, true_args, false_args)
File "/Users/anmengtao/opt/anaconda3/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/convert_operators.py", line 235, in _run_py_ifelse
return true_fn(*true_args) if pred else false_fn(*false_args)
File "/Users/anmengtao/Desktop/model_ED/PaddleDetection-release-2.0/ppdet/modeling/architectures/meta_arch.py", line 29, in forward
out = self.get_pred()
File "/Users/anmengtao/Desktop/model_ED/PaddleDetection-release-2.0/ppdet/modeling/architectures/yolo.py", line 75, in get_pred
bbox_pred, bbox_num = self._forward()
File "/Users/anmengtao/Desktop/model_ED/PaddleDetection-release-2.0/ppdet/modeling/architectures/yolo.py", line 59, in _forward
body_feats = self.backbone(self.inputs)
File "/Users/anmengtao/opt/anaconda3/lib/python3.8/site-packages/paddle/fluid/dygraph/layers.py", line 891, in __call__
outputs = self.forward(*inputs, **kwargs)
File "/Users/anmengtao/Desktop/model_ED/PaddleDetection-release-2.0/ppdet/modeling/backbones/resnet.py", line 573, in forward
conv1 = self.conv1(x)
File "/Users/anmengtao/opt/anaconda3/lib/python3.8/site-packages/paddle/fluid/dygraph/layers.py", line 891, in __call__
outputs = self.forward(*inputs, **kwargs)
File "/Users/anmengtao/opt/anaconda3/lib/python3.8/site-packages/paddle/fluid/dygraph/container.py", line 86, in forward
input = layer(input)
File "/Users/anmengtao/opt/anaconda3/lib/python3.8/site-packages/paddle/fluid/dygraph/layers.py", line 891, in __call__
outputs = self.forward(*inputs, **kwargs)
File "/Users/anmengtao/Desktop/model_ED/PaddleDetection-release-2.0/ppdet/modeling/backbones/resnet.py", line 122, in forward
out = self.conv(inputs)
File "/Users/anmengtao/opt/anaconda3/lib/python3.8/site-packages/paddle/fluid/dygraph/layers.py", line 891, in __call__
outputs = self.forward(*inputs, **kwargs)
File "/Users/anmengtao/opt/anaconda3/lib/python3.8/site-packages/paddle/nn/layer/conv.py", line 631, in forward
out = F.conv._conv_nd(
File "/Users/anmengtao/opt/anaconda3/lib/python3.8/site-packages/paddle/nn/functional/conv.py", line 143, in _conv_nd
helper.append_op(
File "/Users/anmengtao/opt/anaconda3/lib/python3.8/site-packages/paddle/fluid/layer_helper.py", line 43, in append_op
return self.main_program.current_block().append_op(*args, **kwargs)
File "/Users/anmengtao/opt/anaconda3/lib/python3.8/site-packages/paddle/fluid/framework.py", line 3012, in append_op
op = Operator(
File "/Users/anmengtao/opt/anaconda3/lib/python3.8/site-packages/paddle/fluid/framework.py", line 2102, in __init__
for frame in traceback.extract_stack():
InvalidArgumentError: The size of Op(Conv) inputs should not be 0.
[Hint: Expected in_dims[i] != 0, but received in_dims[i]:0 == 0:0.] (at ..\paddle\phi\infermeta\binary.cc:465)
[operator < conv2d > error]