Global max pooling?
Hi, I am looking for the global max pooling layer. Because in my case, the input shape is uncertain and I want to use global max pooling to make their shape consistent. But I do not find this feature in pytorch?
Fangzou_Liao
You can use the functional interface of max pooling for that. In you forward function: <SCODE>import torch.nn.functional as F
output = F.max_pool2d(input, kernel_size=input.size()[2:])
<ECODE>
fmassa
You can do something simpler like <SCODE>import torch
output, _  = torch.max(input, 1)
<ECODE>
Ilya_Ezepov