WZMIAOMIAO / deep-learning-for-image-processing

deep learning for image processing including classification and object-detection etc.
GNU General Public License v3.0
23.36k stars 8.02k forks source link

请问Vit-pytorch中位置编码怎么实现的呢?好像没有看到position呢?谢谢!!!! #704

Open zym1599 opened 1 year ago

zym1599 commented 1 year ago

请问Vit-pytorch中位置编码怎么实现的呢?好像没有看到position呢?谢谢!!!!

WZMIAOMIAO commented 1 year ago

可以参考下:https://github.com/WZMIAOMIAO/deep-learning-for-image-processing/blob/80681e81327320a37cfc35b754d8204a5156e9c2/pytorch_classification/vision_transformer/vit_model.py#L202