E RKNNAPI: rknn_query, RKNN_QUERY_OUTPUT_ATTR, size = 368, expect 360! rknn_query1 fail! ret=-5
ret =rknn_query(ctx, RKNN_QUERY_IN_OUT_NUM, &io_num,sizeof(io_num));if(ret != RKNN_SUCC) {printf("rknn_query fail! ret=%d\n", ret);returnNULL; }printf("model input num: %d, output num: %d\n", io_num.n_input, io_num.n_output);printf("input tensors:\n"); rknn_tenso...
rknn_init fail! ret=-6作者: zhangzj 时间: 2019-5-21 15:10 重新更新一下rknn-apisudo dnf clean all sudo dnf update -y版本确认: [toybrick@localhost ~]$ rpm -aq rknn-api npuservice npuservice-1.0.3-1.rockchip.fc28.aarch64 rknn-api-0.9.5-2.rockchip.fc28.aarch64 ...
export_rknn(RKNN_MODEL_PATH) if ret != 0: print('Export rknn model failed.') exit(ret) print('done') '''step 5: release the model''' rknn.release() 路线2:.pth --> .rknn 四. 进行推理 共有四种方式,如下所示: 第一种是借助RKNN-Toolkit2的功能在模拟NPU上运行RKNN模型并获取推理结果...
TCP发送线程用于发送MJPEG报头+MJPEG流+相关描述头,加入一个pthread_mutex_t pmt和pthread_cond_t pct...
if (ret != RKNN_SUCC) { printf("rknn_query fail! ret=%d\n", ret); return NULL; } printf("model input num: %d, output num: %d\n", io_num.n_input, io_num.n_output); printf("input tensors:\n"); rknn_tensor_attr input_attrs[io_num.n_input]; ...
= RKNN_SUCC) { printf("rknn_query fail! ret=%d\n", ret); return -1; } printf("rknn_api/rknnrt version: %s, driver version: %s\n", sdk_ver.api_version, sdk_ver.drv_version); // Get Model Input Output Info rknn_input_output_num io_num; ret = rknn_query(ctx, RKNN_QUERY_...
ret = rknn_query(ctx, RKNN_QUERY_IN_OUT_NUM, &io_num, sizeof(io_num)); if (ret < 0) { printf("rknn_init error ret=%d\n", ret); return -1; } printf("model input num: %d, output num: %d\n", io_num.n_input, io_num.n_output); ...
示例代码如下: int ret = rknn_destroy (ctx); 3.1.3 rknn_query API 功能 参数 int rknn_query(rknn_context context, rknn_query_cmd cmd, void* info, uint32_t size) 查询模型与 SDK 的相关信息. rknn_context context: context 的对象. 6 http://t.rock-chips.com rknn_query_cmd cmd: 查询...
2 6 http://t.rock-chips.com Return 0: Build successfully value -1: Build failed The sample code is as follows: # Build and quantize RKNN model ret = rknn.build(do_quantization=True, dataset='./dataset.txt') 3.6.5 Export RKNN model In order to make the RKNN model reusable, an ...