def __init__(self, nb_patches, dims, layerscale_init):
    super(ResMLPBlock, self).__init__()
    self.affine1 = Affine(dims)
    self.affine2 = Affine(dims)
    self.linear_patches = nn.Linear(nb_patches, nb_patches)
    self.mlp_channels = MLP(dims)
    self.layerscale1 = nn.Parameter((layerscale_init * torch.ones(dims)))
    self.layerscale2 = nn.Parameter((layerscale_init * torch.ones(dims)))
def __init__(self, nb_patches, dims, layerscale_init):
    super(ResMLPBlock, self).__init__()
    self.affine1 = Affine(dims)
    self.affine2 = Affine(dims)
    self.linear_patches = nn.Linear(nb_patches, nb_patches)
    self.mlp_channels = MLP(dims)
    self.layerscale1 = nn.Parameter((layerscale_init * torch.ones(dims)))
    self.layerscale2 = nn.Parameter((layerscale_init * torch.ones(dims)))