Override default implementation of J() to compute regularization values for self.hiddens appropriately.