问题确认 Search before asking
- [X] 我已经搜索过问题,但是没有找到解答。I have searched the question and found no related answer.
请提出你的问题 Please ask your question
使用release2.6这个分支下的tinypose_256x192 模型训练完成后,执行python tools/export_model.py -c configs/keypoint/tiny_pose/tinypose_256x192.yml --output_dir=./inference_model -o weights=output/tinypose_256x192/best_model
下面是报错
使用release2.6这个分支下的tinypose_256x192 模型训练完成后,执行python tools/export_model.py -c configs/keypoint/tiny_pose/tinypose_256x192.yml --output_dir=./inference_model -o weights=output/tinypose_256x192/best_model
下面是报错
Traceback (most recent call last):
File "tools/export_model.py", line 110, in
main()
File "tools/export_model.py", line 106, in main
run(FLAGS, cfg)
File "tools/export_model.py", line 73, in run
trainer.export(FLAGS.output_dir)
File "/data/abc/code/keypoints/test/PaddleDetection/ppdet/engine/trainer.py", line 1170, in export
static_model, pruned_input_spec = self._get_infer_cfg_and_input_spec(
File "/data/abc/code/keypoints/test/PaddleDetection/ppdet/engine/trainer.py", line 1130, in _get_infer_cfg_and_input_spec
input_spec, static_model.forward.main_program,
File "/home/abc/anaconda3/envs/py38/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/program_translator.py", line 563, in main_program
concrete_program = self.concrete_program
File "/home/abc/anaconda3/envs/py38/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/program_translator.py", line 479, in concrete_program
return self.concrete_program_specify_input_spec(input_spec=None)
File "/home/abc/anaconda3/envs/py38/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/program_translator.py", line 516, in concrete_program_specify_input_spec
concrete_program, _ = self.get_concrete_program(
File "/home/abc/anaconda3/envs/py38/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/program_translator.py", line 427, in get_concrete_program
concrete_program, partial_program_layer = self._program_cache[cache_key]
File "/home/abc/anaconda3/envs/py38/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/program_translator.py", line 744, in getitem
self._caches[item] = self._build_once(item)
File "/home/abc/anaconda3/envs/py38/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/program_translator.py", line 730, in build_once
concrete_program = ConcreteProgram.from_func_spec(
File "/home/abc/anaconda3/envs/py38/lib/python3.8/site-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "/home/abc/anaconda3/envs/py38/lib/python3.8/site-packages/paddle/fluid/wrapped_decorator.py", line 25, in impl
return wrapped_func(*args, **kwargs)
File "/home/abc/anaconda3/envs/py38/lib/python3.8/site-packages/paddle/fluid/dygraph/base.py", line 40, in impl
return func(*args, **kwargs)
File "/home/abc/anaconda3/envs/py38/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/program_translator.py", line 689, in from_func_spec
error_data.raise_new_exception()
File "/home/abc/anaconda3/envs/py38/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/error.py", line 336, in raise_new_exception
six.exec("raise new_exception from None")
File "", line 1, in
AttributeError: In transformed code:
File "/data/abc/code/keypoints/test/PaddleDetection/ppdet/modeling/architectures/meta_arch.py", line 76, in forward
outs.append(self.get_pred())
File "/data/abc/code/keypoints/test/PaddleDetection/ppdet/modeling/architectures/keypoint_hrnet.py", line 113, in get_pred
res_lst = self._forward()
File "/data/abc/code/keypoints/test/PaddleDetection/ppdet/modeling/architectures/keypoint_hrnet.py", line 74, in _forward
def _forward(self):
feats = self.backbone(self.inputs)
~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
hrnet_outputs = self.final_conv(feats[0])
AttributeError: 'dict' object has no attribute 'shape'
请使用最新的paddle和paddledet再尝试下