未验证 提交 f4798260 编写于 作者: C cuicheng01 提交者: GitHub

Update levit.py

上级 f6c5625f
......@@ -221,8 +221,6 @@ class Subsample(nn.Layer):
def forward(self, x):
B, N, C = x.shape
#x = paddle.reshape(x, [B, self.resolution, self.resolution,
# C])[:, ::self.stride, ::self.stride]
x = paddle.reshape(x, [B, self.resolution, self.resolution, C])
end1, end2 = x.shape[1], x.shape[2]
x = x[:, 0:end1:self.stride, 0:end2:self.stride]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册