terminate called after throwing an instance of 'paddle::platform::EnforceNotMet'
what():
Compile Traceback (most recent call last):
File "D:\Program Files\Python37\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "D:\Program Files\Python37\lib\runpy.py", line 85, in *run_code
exec(code, run_globals)
File "D:\workspace\Python\veinServer\venv\Scripts\x2paddle.exemain*.py", line 7, in
sys.exit(main())
File "d:\workspace\python\veinserver\venv\lib\site-packages\x2paddle\convert.py", line 335, in main
lite_model_type=args.lite_model_type)
File "d:\workspace\python\veinserver\venv\lib\site-packages\x2paddle\convert.py", line 161, in tf2paddle
mapper.paddle_graph.gen_model(save_dir)
File "d:\workspace\python\veinserver\venv\lib\site-packages\x2paddle\core\program.py", line 274, in gen_model
self.dygraph2static(save_dir, input_shapes, input_types)
File "d:\workspace\python\veinserver\venv\lib\site-packages\x2paddle\core\program.py", line 554, in dygraph2static
osp.join(save_dir, "inference_model/model"))
File "", line 2, in save
File "d:\workspace\python\veinserver\venv\lib\site-packages\paddle\fluid\wrapped_decorator.py", line 25, in __impl__
return wrapped_func(*args, **kwargs)
File "d:\workspace\python\veinserver\venv\lib\site-packages\paddle\fluid\dygraph\base.py", line 40, in __impl__
return func(*args, **kwargs)
File "d:\workspace\python\veinserver\venv\lib\site-packages\paddle\fluid\dygraph\jit.py", line 744, in save
inner_input_spec)
File "d:\workspace\python\veinserver\venv\lib\site-packages\paddle\fluid\dygraph\dygraph_to_static\program_translator.py", line 517, in concrete_program_specify_input_spec
*desired_input_spec)
File "d:\workspace\python\veinserver\venv\lib\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 "d:\workspace\python\veinserver\venv\lib\site-packages\paddle\fluid\dygraph\dygraph_to_static\program_translator.py", line 744, in __getitem__
self._caches[item] = self._build_once(item)
File "d:\workspace\python\veinserver\venv\lib\site-packages\paddle\fluid\dygraph\dygraph_to_static\program_translator.py", line 735, in _build_once
**cache_key.kwargs)
File "<decorator-gen-99>", line 2, in from_func_spec
File "d:\workspace\python\veinserver\venv\lib\site-packages\paddle\fluid\wrapped_decorator.py", line 25, in __impl__
return wrapped_func(*args, **kwargs)
File "d:\workspace\python\veinserver\venv\lib\site-packages\paddle\fluid\dygraph\base.py", line 40, in __impl__
return func(*args, **kwargs)
File "d:\workspace\python\veinserver\venv\lib\site-packages\paddle\fluid\dygraph\dygraph_to_static\program_translator.py", line 683, in from_func_spec
outputs = static_func(*inputs)
File "pd_model_fq\x2paddle_code.py", line 67, in forward
vgg16_block3_conv3_Conv2D = self.conv6(vgg16_block3_conv2_Relu)
File "d:\workspace\python\veinserver\venv\lib\site-packages\paddle\fluid\dygraph\layers.py", line 914, in __call__
outputs = self.forward(*inputs, **kwargs)
File "d:\workspace\python\veinserver\venv\lib\site-packages\paddle\nn\layer\conv.py", line 677, in forward
use_cudnn=self._use_cudnn)
File "d:\workspace\python\veinserver\venv\lib\site-packages\paddle\nn\functional\conv.py", line 157, in _conv_nd
'use_mkldnn': use_mkldnn})
File "d:\workspace\python\veinserver\venv\lib\site-packages\paddle\fluid\layer_helper.py", line 43, in append_op
return self.main_program.current_block().append_op(*args, **kwargs)
File "d:\workspace\python\veinserver\venv\lib\site-packages\paddle\fluid\framework.py", line 3184, in append_op
attrs=kwargs.get("attrs", None))
File "d:\workspace\python\veinserver\venv\lib\site-packages\paddle\fluid\framework.py", line 2224, in __init__
for frame in traceback.extract_stack():
C++ Traceback (most recent call last):
1 paddle::AnalysisPredictor::ZeroCopyRun()
2 paddle::framework::NaiveExecutor::Run()
3 paddle::framework::OperatorBase::Run(paddle::framework::Scope const&, paddle::platform::Place const&)
4 paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, paddle::platform::Place const&) const
5 paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, paddle::platform::Place const&, paddle::framework::RuntimeContext*) const
6 paddle::operators::ElementwiseOp::InferShape(paddle::framework::InferShapeContext*) const
7 paddle::operators::GetBroadcastDimsArrays(paddle::framework::DDim const&, paddle::framework::DDim const&, int*, int*, int*, int, int)
8 paddle::platform::EnforceNotMet::EnforceNotMet(paddle::platform::ErrorSummary const&, char const*, int)
9 paddle::platform::GetCurrentTraceBackString abi:cxx11
Error Message Summary:
InvalidArgumentError: Broadcast dimension mismatch. Operands could not be broadcast together with the shape of X = [1, 64, 224, 224] and the shape of Y = [256]. Received [64] in X is not equal to [256] in Y at i:1.
[Hint: Expected x_dims_array[i] == y_dims_array[i] || x_dims_array[i] <= 1 || y_dims_array[i] <= 1 == true, but received x_dims_array[i] == y_dims_array[i] || x_dims_array[i] <= 1 || y_dims_array[i] <= 1:0 != true:1.] (at /root/soft/Paddle/paddle/fluid/operators/elementwise/elementwise_op_function.h:240)
[operator < elementwise_add > error]
3条答案
按热度按时间gt0wga4j1#
您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看 官网API文档 、 常见问题 、 历史Issue 、 AI社区 来寻求解答。祝您生活愉快~
Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the API , FAQ , Github Issue and AI community to get the answer.Have a nice day!
7rtdyuoh2#
从问题来看应该是动转静有参数维度问题,需要看下相关代码是不是有问题。同事看下两个环境paddle版本是否一致。
afdcj2ne3#
c++ 版本,两个环境代码和paddle版本一样的,是从开发环境直接拿过去的,而且代码在arm架构,x86架构都能运行的,代码是统一的一套代码