def cost_from_X(self, data):
        self.cost_from_X_data_specs()[0].validate(data)
        X, Y = data
        Y_hat = self.fprop(X)
        return self.cost(Y, Y_hat)
Computes self.cost, but takes data=(X, Y) rather than Y_hat as an
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/models/mlp.py/MLP.cost_from_X