title: AttributeError: 'torch.return_types.max' object has no attribute 'dim' - Maxpooling Channel
body: <p>I'm trying to do maxpooling over channel dimension:</p>
  
  <pre><code>class ChannelPool(nn.Module):
      def forward(self, input):
          return torch.max(input, dim=1)
  </code></pre>
  
  <p>but I get the error</p>
  
  <pre><code>AttributeError: 'torch.return_types.max' object has no attribute 'dim'
  </code></pre>