Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meet unsupported input_2_t dtype for matmul #115

Open
Tracersboy opened this issue Nov 15, 2023 · 0 comments
Open

Meet unsupported input_2_t dtype for matmul #115

Tracersboy opened this issue Nov 15, 2023 · 0 comments

Comments

@Tracersboy
Copy link

Tracersboy commented Nov 15, 2023

rknn tool kit 1.5.2
rknn_server 1.5.2
我存在两个onnx,名为1steg2_new.onnx和1steg2_old.onnx。两个onnx除了权重都一样,1steg2_new.onnx在rknntoolkit在模拟器上(rknn.init_runtime())推理正常,但使用adb连接(rknn.init_runtime(target="rk3568", device_id="df8e2b3164dd6e6a")),就会报错toolkit端报错如下。1steg2_old.onnx均正常。
image

rknn_server端的报错如下
image

toolkit端的使用的代码如下

# -*- coding:utf-8 -*-
import os
import urllib
import traceback
import time
import sys
import numpy as np
import cv2
from rknn.api import RKNN
from PIL import Image

if __name__ == '__main__':
    rknn = RKNN(verbose=True)
    rknn.list_devices()

    print('--> Config model')
    rknn.config(target_platform="rk3568")


    # Load ONNX model
    print('--> Loading model')
    ret = rknn.load_onnx(model="1steg2_new.onnx")
    if ret != 0:
        print('Load model failed!')
        exit(ret)
    print('done')

    print('--> Building model')
    ret = rknn.build(do_quantization=False)

    if ret != 0:
        print('Build model failed!')
        exit(ret)
    print('done')
    # Init runtime environment
    print('--> Init runtime environment')
    # ret = rknn.init_runtime()
    ret = rknn.init_runtime(target="rk3568", device_id="df8e2b3164dd6e6a")
    if ret != 0:
        print('Init runtime environment failed!')
        exit(ret)
    print('done')

    outputs = rknn.inference(inputs=[np.zeros((1, 16, 512)).astype(np.float32)], data_format="nchw")  #
    print(outputs[0].shape)
    print(outputs[0])

两个onnx的地址为链接:https://pan.baidu.com/s/1uiE_XkMCSox2yzVJYby9zw
提取码:z4d8

望开发者能尽快定位问题,辛苦了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant