<reponame>ebenbaruch/ZS_SDL<gh_stars>10-100
import torch.nn as nn
import torch.nn.functional as functional


class GlobalAvgPool2dResNext(nn.Module):
    def __init__(self):
        """Global average pooling over the input's spatial dimensions"""
        super(GlobalAvgPool2dResNext, self).__init__()

    def forward(self, inputs):
        in_size = inputs.size()
        return inputs.view((in_size[0], in_size[1], -1)).mean(dim=2)
import torch.nn as nn
import torch.nn.functional as functional


class GlobalAvgPool2dResNext(nn.Module):
    def __init__(self):
        """Global average pooling over the input's spatial dimensions"""
        super(GlobalAvgPool2dResNext, self).__init__()

    def forward(self, inputs):
        in_size = inputs.size()
        return inputs.view((in_size[0], in_size[1], -1)).mean(dim=2)
Global average pooling over the input's spatial dimensions