-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
avgpool的bug #19
Comments
我也遇到这个问题了,请问您当时解决了吗 |
因为数据集有一张图片长宽是反的 h<w,所以你需要加一个判断,在 给哥们点个赞 |
谢谢大哥,太牛了 |
大哥请问你遇到过这个问题吗 |
def forward(self, x):
avg_pool = F.avg_pool2d(x, x.size(2), stride=x.size(2))# 平均池化操作
res=self.gate_c(avg_pool).unsqueeze(2).unsqueeze(3).expand_as(x)# 通过通道注意力模块处理平均池化的结果
return res
平均池化报错了,RuntimeError: Given input size: (256x100x96). Calculated output size: (256x1x0). Output size is too small
因该是部分图片大小不太规矩,请问您当时是怎么解决的呢?
The text was updated successfully, but these errors were encountered: