Closed liuzheng081 closed 3 years ago
(1)请问您使用的paddle版本,以及ppdet版本分别是多少呢? (2)看日志您是用的Paddle2.0版本吗?ppdet release/2.0 需要paddle 版本>= 2.0.1 版本依赖 ,建议您使用最新的Paddle版本试一下。
我也遇到了相同的问题...
我也遇到了相同的问题...
Paddle 版本是2.0.1及以后吗?
@liuhuiCNN 是版本问题。更新后可以导出了!谢谢
@liuzheng081 您的问题解决了吗,如果解决麻烦close一下 iusse,谢谢~
@liuzheng081 您的问题解决了吗,如果解决麻烦close一下 iusse,谢谢~
解决了 是版本问题 谢谢了
(paddle2.0) (base) [root@vm10-70-61-171 PaddleDetection]# python tools/export_model.py -c configs/ppyolo/ppyolo_tiny_650e_coco.yml -o weights=./output/ppyolo_tiny_650e_coco_bak/model_final [04/29 14:54:07] ppdet.utils.checkpoint INFO: Finish loading model weights: ./output/ppyolo_tiny_650e_coco_bak/model_final.pdparams loading annotations into memory... Done (t=0.11s) creating index... index created! [04/29 14:54:07] ppdet.engine INFO: Export inference config file to output_inference/ppyolo_tiny_650e_coco/infer_cfg.yml Traceback (most recent call last): File "tools/export_model.py", line 105, in
main()
File "tools/export_model.py", line 101, in main
run(FLAGS, cfg)
File "tools/export_model.py", line 69, in run
trainer.export(FLAGS.output_dir)
File "/data/PaddleOCR-2.0/paddle2.0/lib/python3.6/site-packages/ppdet/engine/trainer.py", line 460, in export
input_spec, static_model.forward.main_program,
File "/data/PaddleOCR-2.0/paddle2.0/lib/python3.6/site-packages/paddle/fluid/dygraph/dygraph_to_static/program_translator.py", line 534, in main_program
concrete_program = self.concrete_program
File "/data/PaddleOCR-2.0/paddle2.0/lib/python3.6/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 "/data/PaddleOCR-2.0/paddle2.0/lib/python3.6/site-packages/paddle/fluid/dygraph/dygraph_to_static/program_translator.py", line 488, in concrete_program_specify_input_spec
desired_input_spec)
File "/data/PaddleOCR-2.0/paddle2.0/lib/python3.6/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 "/data/PaddleOCR-2.0/paddle2.0/lib/python3.6/site-packages/paddle/fluid/dygraph/dygraph_to_static/program_translator.py", line 711, in getitem
self._caches[item] = self._build_once(item)
File "/data/PaddleOCR-2.0/paddle2.0/lib/python3.6/site-packages/paddle/fluid/dygraph/dygraph_to_static/program_translator.py", line 702, in _build_once
class_instance=cache_key.class_instance)
File "", line 2, in from_func_spec
File "/data/PaddleOCR-2.0/paddle2.0/lib/python3.6/site-packages/paddle/fluid/wrapped_decorator.py", line 25, in impl
return wrapped_func( args, *kwargs)
File "/data/PaddleOCR-2.0/paddle2.0/lib/python3.6/site-packages/paddle/fluid/dygraph/base.py", line 39, in impl
return func(args, **kwargs)
File "/data/PaddleOCR-2.0/paddle2.0/lib/python3.6/site-packages/paddle/fluid/dygraph/dygraph_to_static/program_translator.py", line 658, in from_func_spec
error_data.raise_new_exception()
File "/data/PaddleOCR-2.0/paddle2.0/lib/python3.6/site-packages/paddle/fluid/dygraph/dygraph_to_static/error.py", line 189, in raise_newexception
six.exec("raise new_exception from None")
File "", line 1, in
SyntaxError: In transformed code: