def __init__(self, seq, in_dims, dims, patch=32, n_classes=10, N=12):
    super(MLPMixer, self).__init__()
    self.embedding = nn.Conv2d(3, dims, kernel_size=patch, stride=patch)
    self.layers = nn.ModuleList()
    for _ in range(N):
        self.layers.append(MixerLayer(seq, dims))
    self.gap = nn.AdaptiveAvgPool1d(1)
    self.fc = nn.Linear(dims, n_classes)
    self.dims = dims
def __init__(self, seq, in_dims, dims, patch=32, n_classes=10, N=12):
    super(MLPMixer, self).__init__()
    self.embedding = nn.Conv2d(3, dims, kernel_size=patch, stride=patch)
    self.layers = nn.ModuleList()
    for _ in range(N):
        self.layers.append(MixerLayer(seq, dims))
    self.gap = nn.AdaptiveAvgPool1d(1)
    self.fc = nn.Linear(dims, n_classes)
    self.dims = dims