Closed javierquincke closed 1 year ago
I think the autocast
that you are trying to do is to use lower precision, such as half precision.
It is convenient but could throw some error like this.
I'm not sure about the result but you can try casting manually. I think you can use a wrapper to change the model itself to support lower precision.
Also, I personally do not recommend using half precision for all layers. Use half precision on backbone network only instead.
Thanks.
Hi, I've been using this repo and https://github.com/plemeri/transparent-background excellent work!
Now I'm trying to use autocast to lower the inference times a bit, I couldn't get it to work correctly
What I did was replace this part of the code https://github.com/plemeri/transparent-background/blob/main/transparent_background/Remover.py#L111 with this:
the model runs apparently without errors but the result of pred is a vector of nan like this:
Do you have any suggestion?