|
问题背景:
使用sklearn库,用python语言,实现“带有rbf核函数的SVM算法”;
将SVM算法的 ".pkl" 存储格式,转换为 ".onnx" 格式,即onnx模型。
问题:
在将 onnx模型转换为rknn模型过程中报错,内容如下:
I base_optimize ...
I base_optimize done.
I
I fold_constant ...
I fold_constant done.
I
I correct_ops ...
I correct_ops done.
I
I fuse_ops ...
I fuse_ops done.
I
I sparse_weight ...
I sparse_weight done.
I
I rknn building ...
I RKNN: [23:39:46.073] compress = 0, conv_eltwise_activation_fuse = 1, global_fuse = 1, multi-core-model-mode = 7, output_optimize = 1,enable_argb_group=0 ,layout_match = 0, pipeline_fuse = 0
I RKNN: librknnc version: 1.6.0 (585b3edcf@2023-12-11T07:42:56)
D RKNN: [23:39:46.076] RKNN is invoked
Fatal: Meet unsupported operator: SVMClassifier(name="SVMc").
Process finished with exit code 1
onnx转换rknn的代码如下:
from rknn.api import RKNN
if __name__ == '__main__':
rknn = RKNN(verbose = True, verbose_file ="log.txt")
# rknn = RKNN()
rknn.config(
mean_values=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],
std_values=[[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],
quantized_dtype="asymmetric_quantized-8",
quantized_algorithm='normal',
quantized_method='channel',
quant_img_RGB2BGR=False,
target_platform='rk3588',
float_dtype="float16",
optimization_level=3,
custom_string="this is my rknn model",
remove_weight=False,
compress_weight=False,
inputs_yuv_fmt=None,
single_core_mode=False,
)
rknn.load_onnx(
model="./SVM_rbf_ONNXmodel_Lee20240227.onnx",
# model="/home/topeet/rknn/01_export_rknn/model_CNN_py38_rk110_Lee20230914.pt",
input_size_list=[[1,24]],
)
rknn.build(
do_quantization=False,
# rknn_batch_size=-1,
)
rknn.export_rknn(
export_path="SVM_rknn1.6_Lee20240227.rknn"
)
rknn.release()
求助~!~!
|
|