solov2 执行eval时出错
paddle版本2.0rc paddledetection版本0.5, cuda10.1,可以训练
2020-12-10 20:58:13,846-INFO: Test iter 0
W1210 20:58:14.454932 14512 operator.cc:205] cast raises an exception class thrust::system::system_error, transform: failed to synchronize: cudaErrorIllegalAddress: an illegal memory access was encountered
Traceback (most recent call last):
File "tools/eval.py", line 179, in
C++ Traceback (most recent call last):
Not support stack backtrace yet.
Error Message Summary:
ExternalError: Cuda error(700), an illegal memory access was encountered. [Advise: Please search for the error code(700) on website( https://docs.nvidia.com/cuda/archive/10.0/cuda-runtime-api/group__CUDART__TYPES.html#group__CUDART__TYPES_1g3f51e3575c2178246db0a94a430e0038 ) to get Nvidia's official solution about CUDA Error.] (at D:\2.0.0-rc0\paddle\paddle\fluid\platform\stream\cuda_stream.cc:65)
@XiaoWen-AI 我们复现不了你这个错误,请问使用tools/infer.py可以预测吗?
使用tools/infer.py可以预测。我尝试对部署的模型使用C++ 进行预测,推理出的tensor类型为int64_t
后处理代码
std::vector
auto output_names = predictor->GetOutputNames();
auto output_t = predictor->GetOutputHandle(output_names[0]);
std::vector<int> output_shape = output_t->shape();
int out_num = std::accumulate(output_shape.begin(), output_shape.end(), 1, std::multiplies<int>());
out_data.resize(out_num);
output_t->CopyToCpu(out_data.data());
W0207 10:41:26.266502 8348 device_context.cc:330] device: 0, cuDNN Version: 7.6.
(InvalidArgument) Tensor holds the wrong type, it holds int64_t, but desires to be float
[Hint: Expected valid == true, but received valid:0 != true:1.] (at D:\2.0.0rc1\paddle\paddle/fluid/framework/tensor_impl.h:51)
[Hint: If you need C++ stacktraces for debugging, please set FLAGS_call_stack_level=2.]
你确认一下output_names对应输出的tensor分别是什么,可参考https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.0-rc/deploy/python/infer.py#L276-L280 分别是np_label、np_score、np_segms
你确认一下output_names对应输出的tensor分别是什么,可参考https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.0-rc/deploy/python/infer.py#L276-L280 分别是np_label、np_score、np_segms
已正确部署,感谢