```
            if self.output_2d_ and self.constant.shape[0] != y.shape[1]:
                raise ValueError("Constant target value should have "
                                 "shape (%d, 1)." % y.shape[1])
```