def __init__(self, seq_len, d_model, d_ffn, patch=32, N=12, n_classes=10):
    super(gMLP, self).__init__()
    self.d_model = d_model
    self.embedding = nn.Conv2d(3, d_model, kernel_size=patch, stride=patch)
    self.layers = nn.ModuleList([gMLPBlock(seq_len, d_model, d_ffn) for _ in range(N)])
    self.out = nn.Linear(d_model, n_classes)
def __init__(self, seq_len, d_model, d_ffn, patch=32, N=12, n_classes=10):
    super(gMLP, self).__init__()
    self.d_model = d_model
    self.embedding = nn.Conv2d(3, d_model, kernel_size=patch, stride=patch)
    self.layers = nn.ModuleList([gMLPBlock(seq_len, d_model, d_ffn) for _ in range(N)])
    self.out = nn.Linear(d_model, n_classes)