def __init__(self, dims, layerscale_init=0.0001, size=224, patch=32, num_classes=10, N=12):
    super(ResMLP, self).__init__()
    n = ((size * size) // (patch ** 2))
    self.dims = dims
    self.embedding = nn.Conv2d(3, dims, kernel_size=patch, stride=patch)
    self.blocks = nn.ModuleList([ResMLPBlock(n, dims, layerscale_init) for _ in range(N)])
    self.affine = Affine(dims)
    self.out = nn.Linear(dims, num_classes)
def __init__(self, dims, layerscale_init=0.0001, size=224, patch=32, num_classes=10, N=12):
    super(ResMLP, self).__init__()
    n = ((size * size) // (patch ** 2))
    self.dims = dims
    self.embedding = nn.Conv2d(3, dims, kernel_size=patch, stride=patch)
    self.blocks = nn.ModuleList([ResMLPBlock(n, dims, layerscale_init) for _ in range(N)])
    self.affine = Affine(dims)
    self.out = nn.Linear(dims, num_classes)