I have changed my plugin using IPluginV2DynamicExt.
Build and successfully created plugin.
[08/31/2020-13:17:46] [I] [TRT] ModelImporter.cpp:135: No importer registered for op: CTCGreedyDecoder. Attempting to import as plugin.
[08/31/2020-13:17:46] [I] [TRT] builtin_op_importers.cpp:3659: Searching for plugin: CTCGreedyDecoder, plugin_version: 1, plugin_namespace:
[08/31/2020-13:17:46] [I] [TRT] builtin_op_importers.cpp:3676: Successfully created plugin: CTCGreedyDecoder
[08/31/2020-13:17:46] [E] [TRT] Network has dynamic or shape inputs, but no optimization profile has been defined.
[08/31/2020-13:17:46] [E] [TRT] Network validation failed.
[08/31/2020-13:17:46] [E] Prediction engine build failed.
But I have new error in runtime.
Network has dynamic or shape inputs, but no optimization profile has been defined.
I have optimization profile as follows.
auto profile = builder->createOptimizationProfile();
// This profile will be valid for all images whose size falls in the range of [(1, 1, 1, 1), (1, 1, 56, 56)]
// but TensorRT will optimize for (1, 1, 28, 28)
// We do not need to check the return of setDimension and addOptimizationProfile here as all dims are explicitly set
profile->setDimensions(input->getName(), OptProfileSelector::kMIN, Dims4{1, 1, 1, 1});
profile->setDimensions(input->getName(), OptProfileSelector::kOPT, Dims4{1, 1, 24, 94});
profile->setDimensions(input->getName(), OptProfileSelector::kMAX, Dims4{1, 1, 36, 126});
preprocessorConfig->addOptimizationProfile(profile);
What do I still missing? My code is here NumPlateRecognition.cpp (27.4 KB)
The model is in this link.
I am using Jetpack4.4.