[RKNN2] Fix bugs (#851)

* 修复picodet格式

* * 修正错误文档
* 修复rknpu2 backend后端的部分错误
* 更新pphumanseg example格式

* * 更新pphumanseg example格式

* * 更新picodet example格式

* * 更新scrfd example格式

* * 更新ppseg rknpu2 python example中的错误

* * 修复代码格式问题

* * 修复代码格式问题

* * 修复代码格式问题

* * 修复代码格式问题

* * 修复代码格式问题

* * 修复代码格式问题

Co-authored-by: Jason <jiangjiajun@baidu.com>
This commit is contained in:
Zheng_Bicheng
2022-12-12 15:37:31 +08:00
committed by GitHub
parent af4c28d4ae
commit 188dcedc02
14 changed files with 309 additions and 261 deletions

View File

@@ -345,6 +345,9 @@ bool RKNPU2Backend::Infer(std::vector<FDTensor>& inputs,
FDERROR << "rknn_create_mem output_mems_ error." << std::endl;
return false;
}
if(output_attrs_[i].type == RKNN_TENSOR_FLOAT16){
output_attrs_[i].type = RKNN_TENSOR_FLOAT32;
}
// default output type is depend on model, this requires float32 to compute top5
ret = rknn_set_io_mem(ctx, output_mems_[i], &output_attrs_[i]);
// set output memory and attribute