https://pytorch.org/docs/master/generated/torch.nn.AdaptiveMaxPool2d.html#torch.nn.AdaptiveMaxPool2d
torch.nn.
AdaptiveMaxPool2d
-
output_size – the target output size of the image of the form H x W. Can be a tuple (H, W) or a single H for a square image H x H. H and W can be either a
int
, orNone
which means the size will be the same as that of the input. -
return_indices – if
True
, will return the indices along with the outputs. Useful to pass to nn.MaxUnpool2d. Default:False
GAP的优势在于:
各个类别于Feature Map 之间的联系更加直观(相比与全连接层的黑箱来说),Feature Map 被转化为分类概率也更加容易,因为在GAP中没有参数需要调,所以避免了过拟合的问题。
GAP汇总了空间信息