ERROR: [TRT]: Network has dynamic or shape inputs, but no optimization profile has been defined

• Hardware Platform (Jetson / GPU) Jetson Nano
• DeepStream Version 5.0 GA
• JetPack Version (valid for Jetson only) 4.4
• TensorRT Version 7.1.3-1
• NVIDIA GPU Driver Version (valid for GPU only)

Hello, I am trying the fp_lpd.caffemodel used for redaction app with deepstream. But I am facing the following error:
Warning, setting batch size to 1. Update the dimension after parsing due to using explicit batch size.
ERROR: [TRT]: Network has dynamic or shape inputs, but no optimization profile has been defined.
ERROR: [TRT]: Network validation failed.
ERROR: Build engine failed from config file
ERROR: failed to build trt engine.
0:00:26.561409877 8646 0x55684b0470 ERROR nvinfer gstnvinfer.cpp:596:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1611> [UID = 1]: build engine file failed
0:00:26.562721445 8646 0x55684b0470 ERROR nvinfer gstnvinfer.cpp:596:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:1697> [UID = 1]: build backend context failed
0:00:26.563006603 8646 0x55684b0470 ERROR nvinfer gstnvinfer.cpp:596:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::initialize() <nvdsinfer_context_impl.cpp:1024> [UID = 1]: generate backend failed, check config file settings
0:00:26.564244785 8646 0x55684b0470 WARN nvinfer gstnvinfer.cpp:781:gst_nvinfer_start:<primary_gie> error: Failed to create NvDsInferContext instance
0:00:26.564439682 8646 0x55684b0470 WARN nvinfer gstnvinfer.cpp:781:gst_nvinfer_start:<primary_gie> error: Config file path: deepstream-app/pgie_config_fd_lpd.txt, NvDsInfer Error: NVDSINFER_CONFIG_FAILED
** ERROR: constructorDeepStream:292: Failed to set pipeline to PAUSED

I am not facing this error while using other models like the person detection model, facedetectir model etc.

@neuroSparK

There is already a duplicate topic right here https://forums.developer.nvidia.com/t/network-has-dynamic-or-shape-inputs-but-no-optimization-profile-has-been-defined/144127. Please follow that one.