HuCaoFighting/Swin-Unet

einops.rearrange 替换问题

lindadamama opened this issue · 1 comments

I want to translate this network with torchsharp
in class PatchExpand
语言用C#

   x = x.view(B, H, W, C);
   x1 = x.reshape(B,H*2,W*2,C/4);
   x2= rearrange(x, 'b h w (p1 p2 c)-> b (h p1) (w p2) c', p1 : 2, p2 : 2, c : C / 4)

Can x1 replace x2?
Or there are other options?

是不是和patchEmbeding等价?