ChaoningZhang / MobileSAM

This is the official code for MobileSAM project that makes SAM lightweight for mobile applications and beyond!
Apache License 2.0
4.8k stars 501 forks source link

about problem of half precision #10

Closed LSH9832 closed 1 year ago

LSH9832 commented 1 year ago

just like vit_h, MobileSAM doesn't work well when using half precision, but vit_b and _vit_l can work normally, have you ever thought about the reason of this phenomenon?It would be thankful if you can reply

ChaoningZhang commented 1 year ago

My guess is that vit_h was trained with half precision, while vit_b and _vit_l are not, which can be the reason. Since the original paper did not provide such details, this is just a guess. Note that that our tiny-vit was also trained by distillation of full precision. If you find out the real reasons for why this happened, please kindly let us know