@@ -182,7 +182,8 @@ case class Learner(
182
182
while (paused) Thread .sleep(1000 );
183
183
if (updater != null ) updater.update(ipass, here, gprogress);
184
184
}
185
- val scores = model.evalbatchg(mats, ipass, here);
185
+ val tmpscores = model.evalbatchg(mats, ipass, here);
186
+ val scores = if (tmpscores.ncols > 1 ) mean(tmpscores, 2 ) else tmpscores;
186
187
if (datasink != null ) datasink.put;
187
188
reslist.append(scores.newcopy)
188
189
samplist.append(here)
@@ -312,7 +313,8 @@ case class Learner(
312
313
here += datasource.opts.batchSize
313
314
bytes += mats.map(Learner .numBytes _).reduce(_+_);
314
315
nsamps += mats(0 ).ncols;
315
- val scores = model.evalbatchg(mats, 0 , here);
316
+ val tmpscores = model.evalbatchg(mats, 0 , here);
317
+ val scores = if (tmpscores.ncols > 1 ) mean(tmpscores,2 ) else tmpscores;
316
318
if (datasink != null ) datasink.put
317
319
reslist.append(scores.newcopy);
318
320
samplist.append(here);
@@ -562,7 +564,20 @@ case class ParLearner(
562
564
Learner .toCPU(models(0 ).modelmats)
563
565
resetGPUs
564
566
}
565
- println(" Time=%5.4f secs, gflops=%4.2f, samples=%4.2g, MB/sec=%4.2g" format (gf._2, gf._1, 1.0 * opts.nthreads* here, bytes/ gf._2/ 1e6 ))
567
+ val perfStr = (" %5.2f%%, score=%6.5f, secs=%3.1f, samps/s=%4.1f, gf=%4.1f, MB/s=%4.1f" format (
568
+ 100f * lastp,
569
+ Learner .scoreSummary(reslist, lasti, reslist.length, opts.cumScore),
570
+ gf._1,
571
+ gf._2,
572
+ bytes* 1e9 ,
573
+ bytes/ gf._2* 1e-6 ));
574
+ val gpuStr = if (useGPU) {
575
+ (0 until math.min(opts.nthreads, Mat .hasCUDA)).map((i)=> {
576
+ setGPU(i);
577
+ if (i== 0 ) (" , GPUmem=%3.2f" format GPUmem ._1) else (" , %3.2f" format GPUmem ._1)
578
+ });
579
+ } else " " ;
580
+ myLogger.info(perfStr + gpuStr);
566
581
results = Learner .scores2FMat(reslist) on row(samplist.toList)
567
582
}
568
583
0 commit comments