colorfuldim icon indicating copy to clipboard operation
colorfuldim copied to clipboard

not working with mixed precision

Open quocpeyrot opened this issue 5 years ago • 0 comments

Hello, this awesome callback doesnt seem to support mixed precision (e.g. learn.to_fp16()).

In my local copy, as a workaround, I hacked the code to support it with the following change, but it significantly slow down the runtime (I can't remember exactly, but ~2x IIRC)

the patch/hack is simple, before the call to histc(), which doesnt support half precision, I just added .float().histc(...)

But it would probably be more efficient to improve histc() instead of casting/converting to float() all the time.

quocpeyrot avatar Feb 14 '20 09:02 quocpeyrot