def _validate_mlp(self):
        expected_output_space = self._get_required_mlp_output_space()
        mlp_output_space = self.mlp.get_output_space()
        if not mlp_output_space == expected_output_space:
            raise ValueError("the specified MLP's output space is " +
                             "incompatible with " + str(self.__class__) + ": "
                             "expected " + str(expected_output_space) + " but "
                             "encoding model's output space is " +
                             str(mlp_output_space))
Makes sure the MLP's output layer is compatible with the parameters
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/models/vae/conditional.py/Conditional._validate_mlp