def __init__(self, state_dim):
    super(CNNValueFn, self).__init__()
    self.state_dim = state_dim
    if (self.state_dim == (1, 64, 64)):
        self.encoder = MNIST_CNN(1)
        self.decoder = (lambda x: x)
    elif (self.state_dim == (7, 7, 3)):
        self.encoder = MinigridCNN(*state_dim[:(- 1)])
        self.decoder = nn.Linear(self.encoder.image_embedding_size, 1)
    else:
        assert False
def __init__(self, state_dim):
    super(CNNValueFn, self).__init__()
    self.state_dim = state_dim
    if (self.state_dim == (1, 64, 64)):
        self.encoder = MNIST_CNN(1)
        self.decoder = (lambda x: x)
    elif (self.state_dim == (7, 7, 3)):
        self.encoder = MinigridCNN(*state_dim[:(- 1)])
        self.decoder = nn.Linear(self.encoder.image_embedding_size, 1)
    else:
        assert False