JingyunLiang / SwinIR

SwinIR: Image Restoration Using Swin Transformer (official repository)

Home Page:https://arxiv.org/abs/2108.10257

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

An Inquiry about Patch Embedding

Huqy518 opened this issue · comments

Dear authors,

Thanks for your great work! I have a question about the 'Patch Embed' class. It seems that there is no projection operation on the input image data. Maybe I am wrong, I think this code cannot work when we want to add the positional encodings without the projection operation.

I would appreciate too much if you could kindly help me.

Best Regards,
Qy

Yes, there is no projection. The positional encodings are added at

attn = attn + relative_position_bias.unsqueeze(0)