PASSL icon indicating copy to clipboard operation
PASSL copied to clipboard

Unintended behavior in clip_logit_scale

Open minogame opened this issue 3 years ago • 0 comments

https://github.com/PaddlePaddle/PASSL/blob/83c49e6a5ba3444cee7f054122559d7759152764/passl/modeling/backbones/clip.py#L317

check this issue for reference https://github.com/PaddlePaddle/Paddle/issues/43710

Suggested approach (with non-public API)

logit_scale_buffer = self.logit_scale.clip(-4.6, 4.6)
logit_scale_buffer._share_buffer_to(self.logit_scale)

minogame avatar Jun 22 '22 17:06 minogame