import torch.nn.functional as F
# 全局平均池化,将得到的图像特征输入到一个拥有256个通道的1*1卷积中,最后将特征进行
# 双线性上采样到特定的维度(就是输入到ImagePool...之前特征图的维度)
class _ImagePool(nn.Module):
def __init__(self, in_ch, out_ch):
super()....ConvBnReLU(in_ch, out_ch, 3, 1, padding=rate, dilation=rate),
)
self.stages.add_module("imagepool...", _ImagePool(in_ch, out_ch))
def forward(self, x):
return torch.cat([stage(x) for stage