PeterL1n / BackgroundMattingV2

Real-Time High-Resolution Background Matting
MIT License
6.85k stars 953 forks source link

How much does the image quality decrease of FP16 model? #132

Closed pango99 closed 3 years ago

pango99 commented 3 years ago

Hi, I wrote a c++ program using libtorch to test the torchscript models, I found the speed of fp16 model is higher than fp32,it is exciting, but I only test one pair fg/bg image, I can t see any difference in the results between fp16 and fp32 models, so can you tell me how much does the quality will decrease of fp16 model?

PeterL1n commented 3 years ago
output_fp32 = model_fp32(input)
output_fp16 = model_fp16(input)

print(output_fp32 - output_fp16)

Test it yourself.