WZMIAOMIAO / deep-learning-for-image-processing

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

不理解这里的架构,是有问题吗 #795

Open 1245179435 opened 8 months ago

1245179435 commented 8 months ago

def forward(self, x): H, W = self.input_resolution B, L, C = x.shape assert L == H * W, "input feature has wrong size" shortcut = x x = self.norm1(x) x = x.view(B, H, W, C)

这里传入的数据是一个4维度的,为什么是blc三个维度呢,请问是少了合并hw这步吗