73 SIZE_CHECK(predictions.size1() == labels.size1());
74 SIZE_CHECK(predictions.size2() == labels.size2());
75 std::size_t numInputs = predictions.size1();
76 std::size_t outputDim = predictions.size2();
78 gradient.resize(numInputs,outputDim);
80 for(std::size_t i = 0; i != numInputs;++i){
81 for(std::size_t o = 0; o != outputDim;++o){
82 double sampleLoss = std::max(0.0,std::abs(predictions(i,o)-labels(i,o))-m_epsilon);
86 if(predictions(i,o) > labels(i,o))