no type registered for kernel [gather]
Created by: MARMOTatZJU
I am trying to transfer my regular paddle model to .nb format with model_optimize_tool==2.0.0 and the command is as follows.
model_dirname="head"
./model_optimize_tool \
--model_file ./"$model_dirname"/inference_model/__model__ \
--param_file ./"$model_dirname"/inference_model/__params__ \
--optimize_out_type naive_buffer \
--optimize_out ./optimized/"$model_dirname" \
--valid_targets arm \
#
My paddle model can run and the output is correct. However, the optimization of one part of my paddle model fails while other two parts succeed.
[W 12/ 4 2: 8:44.442 ...dle-Lite/lite/api/model_optimize_tool.cc:63 Main] Load combined-param model. Option model_dir will be ignored
[I 12/ 4 2: 8:44.442 ...e_v2.0.0/Paddle-Lite/lite/api/cxx_api.cc:203 Build] load from memory 0
[I 12/ 4 2: 8:44.455 ...v2.0.0/Paddle-Lite/lite/core/optimizer.h:182 RunPasses] == Running pass: lite_quant_dequant_fuse_pass
[I 12/ 4 2: 8:44.456 ...v2.0.0/Paddle-Lite/lite/core/optimizer.h:197 RunPasses] == Finished running: lite_quant_dequant_fuse_pass
[I 12/ 4 2: 8:44.456 ...v2.0.0/Paddle-Lite/lite/core/optimizer.h:182 RunPasses] == Running pass: lite_conv_elementwise_fuse_pass
[I 12/ 4 2: 8:44.456 ...le-Lite/lite/core/mir/pattern_matcher.cc:108 operator()] detected 7 subgraph
[I 12/ 4 2: 8:44.457 ...v2.0.0/Paddle-Lite/lite/core/optimizer.h:197 RunPasses] == Finished running: lite_conv_elementwise_fuse_pass
[I 12/ 4 2: 8:44.457 ...v2.0.0/Paddle-Lite/lite/core/optimizer.h:182 RunPasses] == Running pass: lite_conv_bn_fuse_pass
[I 12/ 4 2: 8:44.458 ...v2.0.0/Paddle-Lite/lite/core/optimizer.h:197 RunPasses] == Finished running: lite_conv_bn_fuse_pass
[I 12/ 4 2: 8:44.458 ...v2.0.0/Paddle-Lite/lite/core/optimizer.h:182 RunPasses] == Running pass: lite_conv_elementwise_fuse_pass
[I 12/ 4 2: 8:44.458 ...v2.0.0/Paddle-Lite/lite/core/optimizer.h:197 RunPasses] == Finished running: lite_conv_elementwise_fuse_pass
[I 12/ 4 2: 8:44.458 ...v2.0.0/Paddle-Lite/lite/core/optimizer.h:182 RunPasses] == Running pass: lite_conv_activation_fuse_pass
[I 12/ 4 2: 8:44.459 ...le-Lite/lite/core/mir/pattern_matcher.cc:108 operator()] detected 4 subgraph
[I 12/ 4 2: 8:44.459 ...v2.0.0/Paddle-Lite/lite/core/optimizer.h:197 RunPasses] == Finished running: lite_conv_activation_fuse_pass
[I 12/ 4 2: 8:44.459 ...v2.0.0/Paddle-Lite/lite/core/optimizer.h:182 RunPasses] == Running pass: lite_fc_fuse_pass
[I 12/ 4 2: 8:44.459 ...v2.0.0/Paddle-Lite/lite/core/optimizer.h:197 RunPasses] == Finished running: lite_fc_fuse_pass
[I 12/ 4 2: 8:44.459 ...v2.0.0/Paddle-Lite/lite/core/optimizer.h:182 RunPasses] == Running pass: lite_shuffle_channel_fuse_pass
[I 12/ 4 2: 8:44.460 ...v2.0.0/Paddle-Lite/lite/core/optimizer.h:197 RunPasses] == Finished running: lite_shuffle_channel_fuse_pass
[I 12/ 4 2: 8:44.460 ...v2.0.0/Paddle-Lite/lite/core/optimizer.h:182 RunPasses] == Running pass: lite_transpose_softmax_transpose_fuse_pass
[I 12/ 4 2: 8:44.460 ...v2.0.0/Paddle-Lite/lite/core/optimizer.h:197 RunPasses] == Finished running: lite_transpose_softmax_transpose_fuse_pass
[I 12/ 4 2: 8:44.460 ...v2.0.0/Paddle-Lite/lite/core/optimizer.h:182 RunPasses] == Running pass: lite_interpolate_fuse_pass
[I 12/ 4 2: 8:44.460 ...v2.0.0/Paddle-Lite/lite/core/optimizer.h:197 RunPasses] == Finished running: lite_interpolate_fuse_pass
[I 12/ 4 2: 8:44.460 ...v2.0.0/Paddle-Lite/lite/core/optimizer.h:182 RunPasses] == Running pass: identity_scale_eliminate_pass
[I 12/ 4 2: 8:44.460 ...le-Lite/lite/core/mir/pattern_matcher.cc:108 operator()] detected 2 subgraph
[I 12/ 4 2: 8:44.460 ...v2.0.0/Paddle-Lite/lite/core/optimizer.h:197 RunPasses] == Finished running: identity_scale_eliminate_pass
[I 12/ 4 2: 8:44.460 ...v2.0.0/Paddle-Lite/lite/core/optimizer.h:182 RunPasses] == Running pass: static_kernel_pick_pass
[I 12/ 4 2: 8:44.461 ...v2.0.0/Paddle-Lite/lite/core/optimizer.h:197 RunPasses] == Finished running: static_kernel_pick_pass
[I 12/ 4 2: 8:44.461 ...v2.0.0/Paddle-Lite/lite/core/optimizer.h:182 RunPasses] == Running pass: variable_place_inference_pass
[F 12/ 4 2: 8:44.462 ...e_v2.0.0/Paddle-Lite/lite/core/kernel.cc:34 GetInputDeclType] Check failed: type: no type registered for kernel [gather] input argument [Index] with key gather/def
Aborted
I do not understand this error log.