CrossGET icon indicating copy to clipboard operation
CrossGET copied to clipboard

self.ln_pre or self.ln_post?

Open zhayert opened this issue 11 months ago • 2 comments

https://github.com/sdc17/CrossGET/blob/dc3297534ecc2cbd7c0d3806df3e6426dc5c1a53/CLIP/clip/model.py#L296 https://github.com/sdc17/CrossGET/blob/dc3297534ecc2cbd7c0d3806df3e6426dc5c1a53/CLIP/clip/model.py#L297 https://github.com/sdc17/CrossGET/blob/dc3297534ecc2cbd7c0d3806df3e6426dc5c1a53/CLIP/clip/model.py#L298

zhayert avatar Jan 15 '25 11:01 zhayert

Hello, why is self.ln_pre used here instead of self.ln_post? In def encode_text, self.ln_final is used, which represents the output layer_norm.

zhayert avatar Jan 15 '25 11:01 zhayert

Hi,

This should be self.In_post like what we did for other models. It seems that the difference between self.ln_pre and self.ln_post was not so big, so it didn't result in an issue for CLIP model. Thanks.

sdc17 avatar Apr 14 '25 02:04 sdc17