How to get `nvinfer` to be as accurate as TensorRT's API?

if the preprocessed data between DeepStream test and TensorRT test is still different. I suggest comparing the middle values step by step. form the analysis above, before nvinfer, there is no data loss because the format is always rgb/rgba. we only need to compare the rgba->gray and gray normalization. please use the following steps to narrow down this issue.

  1. compare the the result of rgba->gray.
    please use this FAQ to dump the gray value, then compare with TensorRT test.
  2. compare the result of gray normalization.
    if the results in the step1 are the same, please continue to compare gray normalization value. ip_tensor_dump.bin mentioned on Nov 11 is the gray normalization value. the formula is gray value multiplying NET_SCALE_FACTOR .