Closed llO-Oll closed 1 year ago
@llO-Oll 麻烦将paddle版本升级到2.0.1试试
File "/home/ljd/Code/PaddleSeg/paddleseg/models/fast_scnn.py", line 75, in forward ( user code ) x = self.global_feature_extractor(higher_res_features) File "/home/ljd/anaconda3/envs/paddle/lib/python3.8/site-packages/paddle/fluid/dygraph/layers.py", line 902, in call outputs = self.forward(*inputs, *kwargs) File "/home/ljd/Code/PaddleSeg/paddleseg/models/fast_scnn.py", line 189, in forward ( user code *) x = self.ppm(x) File "/home/ljd/anaconda3/envs/paddle/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/convert_call_func.py", line 220, in convert_call forward_func = convert_to_static(forward_func) File "/home/ljd/anaconda3/envs/paddle/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/program_translator.py", line 141, in convert_to_static static_func = _FUNCTION_CACHE.convert_with_cache(function) File "/home/ljd/anaconda3/envs/paddle/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/program_translator.py", line 78, in convert_with_cache static_func = self._convert(func) File "/home/ljd/anaconda3/envs/paddle/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/program_translator.py", line 116, in _convert root_wrapper = self._dygraph_to_static.get_static_ast(root) File "/home/ljd/anaconda3/envs/paddle/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/ast_transformer.py", line 61, in get_static_ast self.transfer_from_node_type(self.static_analysis_root) File "/home/ljd/anaconda3/envs/paddle/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/ast_transformer.py", line 92, in transfer_from_node_type self._apply(transformer, node_wrapper, log_level=index + 1) File "/home/ljd/anaconda3/envs/paddle/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/ast_transformer.py", line 65, in _apply transformer(node_wrapper).transform() File "/home/ljd/anaconda3/envs/paddle/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/loop_transformer.py", line 435, in transform self.visit(self.root) File "/home/ljd/anaconda3/envs/paddle/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/loop_transformer.py", line 438, in visit self.generic_visit(node) File "/home/ljd/anaconda3/envs/paddle/lib/python3.8/ast.py", line 447, in generic_visit value = self.visit(value) File "/home/ljd/anaconda3/envs/paddle/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/loop_transformer.py", line 441, in visit self.replace_stmt_list(node.body) File "/home/ljd/anaconda3/envs/paddle/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/loop_transformer.py", line 457, in replace_stmt_list new_stmts = self.get_for_stmt_nodes(body_list[i]) File "/home/ljd/anaconda3/envs/paddle/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/loop_transformer.py", line 479, in get_for_stmt_nodes stmts_tuple = current_for_node_parser.parse() File "/home/ljd/anaconda3/envs/paddle/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/utils.py", line 1030, in parse return self._parse_for_stmts() File "/home/ljd/anaconda3/envs/paddle/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/utils.py", line 1094, in _parse_for_stmts target_node, assign_node = self._build_assign_var_slice_node() File "/home/ljd/anaconda3/envs/paddle/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/utils.py", line 1245, in _build_assign_var_slice_node slice=gast.Index(value=gast.Name( AttributeError: module 'gast' has no attribute 'Index'
您好 paddle==2.0.1,gast==0.4.0,模型导出的时候还是报了这个错,请问怎么解决呢
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
Traceback (most recent call last): File "export.py", line 85, in
main(args)
File "export.py", line 64, in main
out = net(in_var)
File "/home/whut/anaconda3/envs/paddle/lib/python3.8/site-packages/paddle/fluid/dygraph/layers.py", line 891, in call
outputs = self.forward(*inputs, **kwargs)
File "/home/whut/anaconda3/envs/paddle/lib/python3.8/site-packages/paddle/fluid/dygraph/dygraph_to_static/program_translator.py", line 352, in call
error_data.raise_new_exception()
File "/home/whut/anaconda3/envs/paddle/lib/python3.8/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
IndexError: In transformed code: