74 SIZE_CHECK(predictions.size1() == labels.size1());
75 SIZE_CHECK(predictions.size2() == labels.size2());
76 std::size_t numInputs = predictions.size1();
78 gradient.resize(numInputs,predictions.size2());
80 for(std::size_t i = 0; i != numInputs;++i){
81 double sampleLoss = 0.5*std::max(0.0,norm_sqr(row(predictions,i)-row(labels,i))-m_sqrEpsilon);
84 noalias(row(gradient,i)) = row(predictions,i)-row(labels,i);
87 row(gradient,i).clear();