paddle.fluid.core.EnforceNotMet: Invoke operator reshape2 error. 做人体关节点检测时
Created by: yanhn
使用coco数据集做validation的时候,报了shape mismatch的错误。
python val.py --dataset coco --checkpoint checkpoints/pose-resnet50-mpii-384x384 --data_root data/coco
使用的预训练模型就是官方下载的pose-resnet50-mpii-384x384
,第一次用paddle,只能把全部error信息截下来,麻烦帮忙看一下。
----------- Configuration Arguments ----------- batch_size: 128 checkpoint: checkpoints/pose-resnet50-mpii-384x384 data_root: data/coco dataset: coco flip_test: True kp_dim: 17 lr: 0.001 lr_strategy: piecewise_decay num_epochs: 140 post_process: True pretrained_model: None shift_heatmap: True total_images: 6108 use_gpu: True with_mem_opt: True
W0514 14:09:25.998886 1357 device_context.cc:263] Please NOTE: device: 0, CUDA Capability: 61, Driver API Version: 9.2, Runtime API Version: 9.0 W0514 14:09:25.998939 1357 device_context.cc:271] device: 0, cuDNN Version: 7.0. W0514 14:09:25.998944 1357 device_context.cc:295] WARNING: device: 0. The installed Paddle is compiled with CUDNN 7.3, but CUDNN version in your machine is 7.2, which may cause serious incompatible bug. Please recompile or reinstall Paddle with compatible CUDNN version. W0514 14:09:28.653494 1357 parallel_executor.cc:310] The number of graph should be only one, but the current graph has 2 sub_graphs. If you want to see the nodes of the sub_graphs, you should use 'FLAGS_print_sub_graph_dir' to specify the output dir. NOTES: if you not do training, please don't pass loss_var_name. loading annotations into memory... Done (t=0.41s) creating index... index created! => classes: ['background', 'person'] => num_images: 5000 generating coco gt_db... => num db: 6352 => num selected db: 6108 Traceback (most recent call last): File "/home/yanhaonan/.phn/work/paddle/models/PaddleCV/human_pose_estimation/val.py", line 233, in valid(args) File "/home/yanhaonan/.phn/work/paddle/models/PaddleCV/human_pose_estimation/val.py", line 160, in valid feed=feeder.feed(data)) File "/home/yanhaonan/.local/lib/python3.6/site-packages/paddle/fluid/parallel_executor.py", line 303, in run self.executor.run(fetch_list, fetch_var_name) paddle.fluid.core.EnforceNotMet: Invoke operator reshape2 error. Python Callstacks: File "/home/yanhaonan/.local/lib/python3.6/site-packages/paddle/fluid/framework.py", line 1317, in append_op attrs=kwargs.get("attrs", None)) File "/home/yanhaonan/.local/lib/python3.6/site-packages/paddle/fluid/layer_helper.py", line 56, in append_op return self.main_program.current_block().append_op(args, **kwargs) File "/home/yanhaonan/.local/lib/python3.6/site-packages/paddle/fluid/layers/nn.py", line 5998, in reshape "XShape": x_shape}) File "/home/yanhaonan/.phn/work/paddle/models/PaddleCV/human_pose_estimation/lib/pose_resnet.py", line 147, in calc_loss x = fluid.layers.reshape(heatmap, (-1, self.k, hw)) File "/home/yanhaonan/.phn/work/paddle/models/PaddleCV/human_pose_estimation/lib/pose_resnet.py", line 115, in net loss = self.calc_loss(out, target, target_weight) File "/home/yanhaonan/.phn/work/paddle/models/PaddleCV/human_pose_estimation/val.py", line 90, in valid loss, output = model.net(input=image, target=target, target_weight=target_weight) File "/home/yanhaonan/.phn/work/paddle/models/PaddleCV/human_pose_estimation/val.py", line 233, in valid(args) C++ Callstacks: Enforce failed. Expected output_shape[unk_dim_idx] * capacity == -in_size, but received output_shape[unk_dim_idx] * capacity:-7050240 != -in_size:-7077888. Invalid shape is given. at [/paddle/paddle/fluid/operators/reshape_op.cc:98] PaddlePaddle Call Stacks: 0 0x7f40a53b4e0dp void paddle::platform::EnforceNotMet::Initstd::string(std::string, char const*, int) + 365 1 0x7f40a53b5157p paddle::platform::EnforceNotMet::EnforceNotMet(std::string const&, char const*, int) + 87 2 0x7f40a5760e79p paddle::operators::ReshapeOp::ValidateShape(std::vector<int, std::allocator >, paddle::framework::DDim const&) + 2249 3 0x7f40a57625e1p paddle::operators::ReshapeOp::InferShape(paddle::framework::InferShapeContext*) const + 689 4 0x7f40a5762cf9p paddle::operators::Reshape2Op::InferShape(paddle::framework::InferShapeContext*) const + 521 5 0x7f40a6dc2ccbp paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, boost::variant<paddle::platform::CUDAPlace, paddle::platform::CPUPlace, paddle::platform::CUDAPinnedPlace, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> const&) const + 603 6 0x7f40a6dc0575p paddle::framework::OperatorBase::Run(paddle::framework::Scope const&, boost::variant<paddle::platform::CUDAPlace, paddle::platform::CPUPlace, paddle::platform::CUDAPinnedPlace, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> const&) + 341 7 0x7f40a6c368eap paddle::framework::details::ComputationOpHandle::RunImpl() + 250 8 0x7f40a6c2ffc6p paddle::framework::details::OpHandleBase::Run(bool) + 118 9 0x7f40a6bc81ddp 10 0x7f40a5f883d3p std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result, std::__future_base::_Result_base::_Deleter>, void> >::_M_invoke(std::_Any_data const&) + 35 11 0x7f40a5f4b6f7p std::__future_base::_State_base::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>&, bool&) + 39 12 0x7f410e499a99p 13 0x7f40a6bc6ec2p 14 0x7f40a5f4cb24p ThreadPool::ThreadPool(unsigned long)::{lambda()#1 (closed)}::operator()() const + 404 15 0x7f4109753678p 16 0x7f410e4926bap 17 0x7f410e1c841dp clone + 109