|
沙发
楼主 |
发表于 2020-5-27 18:12:52
|
只看该作者
conv1d stride!=1的情况也不支持啊? 但模型转换没有报错啊?
rknn和pytorch输出的值对比
kernel_size=3, stride=1, dilation=1
kernel_size=3, stride=1, dilation=1
stride改为3之后,数据差异明显。
def get_avg_abs_diff_rate(ref_x, x1):
diff = np.abs(x1 - ref_x)
abs_x = np.abs(ref_x)
avg_abs_x = np.average(abs_x)
avg_diff = np.average(diff)
avg_rate = avg_diff / avg_abs_x
return avg_diff, avg_abs_x, avg_rate
./data/conv1d_ksize=3,stride=1,d=1.onnx_fp16.rknn, run:1.734034 ms; avg abs of : diff:0.000058, x:0.078678, rate:0.000732
./data/conv1d_ksize=3,stride=3,d=1.onnx_fp16.rknn, run:9.382890 ms; avg abs of : diff:0.051092, x:0.073605, rate:0.694133
./data/conv1d_ksize=3,stride=5,d=1.onnx_fp16.rknn, run:14.348952 ms; avg abs of : diff:0.054150, x:0.077323, rate:0.700310
./data/conv1d_ksize=3,stride=7,d=1.onnx_fp16.rknn, run:18.568700 ms; avg abs of : diff:0.052889, x:0.073763, rate:0.717014
./data/conv1d_ksize=3,stride=9,d=1.onnx_fp16.rknn, run:22.689263 ms; avg abs of : diff:0.052633, x:0.074430, rate:0.707146
Conv1d stride != 1 或者 dilation != 1的情况要怎么搞啊? 模型转换不支持的属性按理会报错的啊,这个没有报错,但输出数据不对啊
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|