segment-anything-tensorrt icon indicating copy to clipboard operation
segment-anything-tensorrt copied to clipboard

TensorRT encountered issues when converting weights between types and that could affect accuracy

Open JS901 opened this issue 2 years ago • 3 comments

Hi @mingj2021.

When I export the model with demo.py, I get the following warning. Is this what you would expect?

[TRT] [W] TensorRT encountered issues when converting weights between types and that could affect accuracy.
[TRT] [W] If this is not the desired behavior, please modify the weights or retrain with regularization to adjust the magnitude of the weights.
[TRT] [W] Check verbose logs for the list of affected weights.
[TRT] [W] - 77 weights are affected by this issue: Detected subnormal FP16 values.
[TRT] [W] - 18 weights are affected by this issue: Detected values less than smallest positive FP16 subnormal value and converted them to the FP16 minimum subnormalized value.

You mention that you are not maintaining this repo any longer. I was wondering whether you successfully tested inference with the exported model?

Also, please let me know whether there is any additional useful information to get a full TRT SAM model up and running.

Many thanks

JS901 avatar Sep 11 '23 09:09 JS901

ok,Update later

mingj2021 avatar Sep 11 '23 10:09 mingj2021

Thanks for your reply @mingj2021. Am I correct in thinking that you will update the repo with a fix for this?

Have you tested the tensorrt engine model for inference on an image?

Many thanks

JS901 avatar Sep 11 '23 13:09 JS901

Hi @mingj2021.

When I export the model with demo.py, I get the following warning. Is this what you would expect?

[TRT] [W] TensorRT encountered issues when converting weights between types and that could affect accuracy.
[TRT] [W] If this is not the desired behavior, please modify the weights or retrain with regularization to adjust the magnitude of the weights.
[TRT] [W] Check verbose logs for the list of affected weights.
[TRT] [W] - 77 weights are affected by this issue: Detected subnormal FP16 values.
[TRT] [W] - 18 weights are affected by this issue: Detected values less than smallest positive FP16 subnormal value and converted them to the FP16 minimum subnormalized value.

You mention that you are not maintaining this repo any longer. I was wondering whether you successfully tested inference with the exported model?

Also, please let me know whether there is any additional useful information to get a full TRT SAM model up and running.

Many thanks

hi, have you solved this problem? I have the same problem.

yupeng-2003 avatar Oct 08 '23 11:10 yupeng-2003