BasicOptimizer.scala:89 executed in 85.76 seconds (1.693 gc):
val lineSearchInstance: LineSearchStrategy = lineSearchFactory
val trainer = new IterativeTrainer(trainable)
trainer.setOrientation(orientation())
trainer.setMonitor(new TrainingMonitor() {
override def clear(): Unit = trainingMonitor.clear()
override def log(msg: String): Unit = {
trainingMonitor.log(msg)
BasicOptimizer.this.log(msg)
}
override def onStepFail(currentPoint: Step): Boolean = {
BasicOptimizer.this.onStepFail(trainable.addRef().asInstanceOf[Trainable], currentPoint)
}
override def onStepComplete(currentPoint: Step): Unit = {
if (0 < logEvery && (0 == currentPoint.iteration % logEvery || currentPoint.iteration < logEvery)) {
val image = currentImage()
timelineAnimation += image
val caption = "Iteration " + currentPoint.iteration
out.p(caption + "\n" + out.jpg(image, caption))
}
BasicOptimizer.this.onStepComplete(trainable.addRef().asInstanceOf[Trainable], currentPoint)
trainingMonitor.onStepComplete(currentPoint)
super.onStepComplete(currentPoint)
}
})
trainer.setTimeout(trainingMinutes, TimeUnit.MINUTES)
trainer.setMaxIterations(trainingIterations)
trainer.setLineSearchFactory((_: CharSequence) => lineSearchInstance)
trainer.setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
val result = trainer.run.asInstanceOf[lang.Double]
trainer.freeRef()
result
Reset training subject: 310612433710800
Reset training subject: 310614123592600
Adding measurement 5097369b to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-148.83091815776854;dx=-3.047486502927448E-5
New Minimum: -148.83091815776854 > -148.83096655871586
END: th(2.154434690031884)=-148.83096655871586; dx=-1.9929712123494042E-5 evalInputDelta=4.840094732116995E-5
Fitness changed from -148.83091815776854 to -148.83096655871586
Iteration 1 complete. Error: -148.83096655871586 Total: 8.2460; Orientation: 0.0616; Line Search: 3.3247
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/f142a5b5-5ee6-4db1-a495-afc6b2993d3c.jpg)
Adding measurement 433cfac8 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-148.83096655871586;dx=-1.974991266711971E-5
New Minimum: -148.83096655871586 > -148.83107027497852
WOLFE (weak): th(4.641588833612779)=-148.83107027497852; dx=-1.975475443742593E-5 evalInputDelta=1.0371626265737177E-4
New Minimum: -148.83107027497852 > -148.83116707675845
WOLFE (weak): th(9.283177667225559)=-148.83116707675845; dx=-1.9737279909370985E-5 evalInputDelta=2.005180425896924E-4
New Minimum: -148.83116707675845 > -148.83157502642499
WOLFE (weak): th(27.849533001676676)=-148.83157502642499; dx=-1.9725586872221676E-5 evalInputDelta=6.084677091280355E-4
New Minimum: -148.83157502642499 > -148.8334004146269
WOLFE (weak): th(111.3981320067067)=-148.8334004146269; dx=-1.9709963862302998E-5 evalInputDelta=0.0024338559110503866
New Minimum: -148.8334004146269 > -148.8431423541459
WOLFE (weak): th(556.9906600335335)=-148.8431423541459; dx=-1.9706859881876502E-5 evalInputDelta=0.012175795430039216
New Minimum: -148.8431423541459 > -148.90404095231685
WOLFE (weak): th(3341.9439602012008)=-148.90404095231685; dx=-1.967286148841768E-5 evalInputDelta=0.0730743936009901
New Minimum: -148.90404095231685 > -149.34175711157948
WOLFE (weak): th(23393.607721408407)=-149.34175711157948; dx=-1.964076417829181E-5 evalInputDelta=0.5107905528636252
New Minimum: -149.34175711157948 > -152.85237673520078
WOLFE (weak): th(187148.86177126726)=-152.85237673520078; dx=-1.8989528025579645E-5 evalInputDelta=4.02141017648492
New Minimum: -152.85237673520078 > -178.28702178271723
END: th(1684339.7559414054)=-178.28702178271723; dx=-1.1406316932758228E-5 evalInputDelta=29.456055224001375
Fitness changed from -148.83096655871586 to -178.28702178271723
Iteration 2 complete. Error: -178.28702178271723 Total: 19.1524; Orientation: 0.0636; Line Search: 17.1445
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/fe4e9db1-fa02-44e3-8ae1-696929d35725.jpg)
Adding measurement b0d8cd4 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-178.28702178271723;dx=-1.4062183549615316E-5
New Minimum: -178.28702178271723 > -212.56913824084563
END: th(3628800.0000000005)=-212.56913824084563; dx=-4.757252751556713E-6 evalInputDelta=34.2821164581284
Fitness changed from -178.28702178271723 to -212.56913824084563
Iteration 3 complete. Error: -212.56913824084563 Total: 5.4029; Orientation: 0.0572; Line Search: 3.3406
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/d3a5ac33-677c-476e-9922-d19a83068916.jpg)
Adding measurement 5cd7386b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.373e+04, gradient 3.213e-03, dot -0.411; [548bd9e1-79a8-4d72-a924-9a9cf0e26b39 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -212.56913824084563, -178.28702178271723, -148.83096655871586, -148.83091815776854
LBFGS Accumulation History: 3 points
Removed measurement 5cd7386b to history. Total: 3
th(0)=-212.56913824084563;dx=-1.0323486531139372E-5
New Minimum: -212.56913824084563 > -238.66908905173108
WOLF (strong): th(7818012.603187701)=-238.66908905173108; dx=1.23574033298243E-7 evalInputDelta=26.099950810885446
END: th(3909006.3015938504)=-235.63854446385042; dx=-2.2655811008710413E-6 evalInputDelta=23.06940622300479
Fitness changed from -212.56913824084563 to -238.66908905173108
Iteration 4 complete. Error: -238.66908905173108 Total: 8.0456; Orientation: 1.0669; Line Search: 5.0734
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/2fcce553-0172-4a67-8787-e0974e26173e.jpg)
Adding measurement 7328729c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.822e+03, gradient 3.747e-03, dot -0.150; [548bd9e1-79a8-4d72-a924-9a9cf0e26b39 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -238.66908905173108, -178.28702178271723, -148.83096655871586, -148.83091815776854
LBFGS Accumulation History: 3 points
Removed measurement 7328729c to history. Total: 3
th(0)=-238.66908905173108;dx=-1.4019693345712704E-5
New Minimum: -238.66908905173108 > -249.87048519441802
WOLF (strong): th(8421698.779707028)=-249.87048519441802; dx=4.387694895240913E-6 evalInputDelta=11.201396142686946
New Minimum: -249.87048519441802 > -266.4287022179508
WOLF (strong): th(4210849.389853514)=-266.4287022179508; dx=7.659042782884052E-7 evalInputDelta=27.759613166219708
END: th(1403616.4632845046)=-256.21873934197805; dx=-8.581732152208804E-6 evalInputDelta=17.549650290246973
Fitness changed from -238.66908905173108 to -266.4287022179508
Iteration 5 complete. Error: -266.4287022179508 Total: 9.3776; Orientation: 1.0611; Line Search: 6.3765
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/e003469b-86cd-4553-8293-7ad5f547b0d7.jpg)
Adding measurement 4b12caf0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.765e+04, gradient 2.946e-03, dot -0.263; [548bd9e1-79a8-4d72-a924-9a9cf0e26b39 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -266.4287022179508, -178.28702178271723, -148.83096655871586, -148.83091815776854
LBFGS Accumulation History: 3 points
Removed measurement 4b12caf0 to history. Total: 3
th(0)=-266.4287022179508;dx=-8.675724751415665E-6
New Minimum: -266.4287022179508 > -282.7690134112662
END: th(3024000.0000000005)=-282.7690134112662; dx=-1.5228205369762303E-6 evalInputDelta=16.340311193315415
Fitness changed from -266.4287022179508 to -282.7690134112662
Iteration 6 complete. Error: -282.7690134112662 Total: 6.2715; Orientation: 1.0016; Line Search: 3.2077
Adding measurement 24dbd5c4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.696e+04, gradient 2.215e-03, dot -0.432; [548bd9e1-79a8-4d72-a924-9a9cf0e26b39 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -282.7690134112662, -178.28702178271723, -148.83096655871586, -148.83091815776854
LBFGS Accumulation History: 3 points
Removed measurement 24dbd5c4 to history. Total: 3
th(0)=-282.7690134112662;dx=-4.874083436100122E-6
New Minimum: -282.7690134112662 > -295.3517665460362
WOLF (strong): th(6515010.502656418)=-295.3517665460362; dx=1.9626441219675533E-7 evalInputDelta=12.582753134769973
END: th(3257505.251328209)=-293.74777734825005; dx=-1.6278060872745393E-6 evalInputDelta=10.978763936983853
Fitness changed from -282.7690134112662 to -295.3517665460362
Iteration 7 complete. Error: -295.3517665460362 Total: 7.4652; Orientation: 0.9949; Line Search: 4.8633
Adding measurement 1b1f16b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.076e+04, gradient 2.877e-03, dot -0.230; [548bd9e1-79a8-4d72-a924-9a9cf0e26b39 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -295.3517665460362, -178.28702178271723, -148.83096655871586, -148.83091815776854
LBFGS Accumulation History: 3 points
Removed measurement 1b1f16b to history. Total: 3
th(0)=-295.3517665460362;dx=-8.273464720087736E-6
New Minimum: -295.3517665460362 > -296.9266166913583
WOLF (strong): th(7018082.316422524)=-296.9266166913583; dx=3.8525983663012045E-6 evalInputDelta=1.5748501453221024
New Minimum: -296.9266166913583 > -308.74918227341107
WOLF (strong): th(3509041.158211262)=-308.74918227341107; dx=7.986677228694779E-7 evalInputDelta=13.397415727374892
END: th(1169680.3860704207)=-303.9585377315398; dx=-5.1694860767178885E-6 evalInputDelta=8.606771185503646
Fitness changed from -295.3517665460362 to -308.74918227341107
Iteration 8 complete. Error: -308.74918227341107 Total: 9.2910; Orientation: 1.0111; Line Search: 6.6866
Adding measurement 14eded20 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.714e+04, gradient 2.167e-03, dot -0.344; [548bd9e1-79a8-4d72-a924-9a9cf0e26b39 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -308.74918227341107, -178.28702178271723, -148.83096655871586, -148.83091815776854
LBFGS Accumulation History: 3 points
Removed measurement 14eded20 to history. Total: 3
th(0)=-308.74918227341107;dx=-4.6855634248276325E-6
New Minimum: -308.74918227341107 > -316.7205259469738
END: th(2520000.000000001)=-316.7205259469738; dx=-1.3387735892697535E-6 evalInputDelta=7.971343673562728
Fitness changed from -308.74918227341107 to -316.7205259469738
Iteration 9 complete. Error: -316.7205259469738 Total: 6.1253; Orientation: 1.0269; Line Search: 3.4884
Adding measurement 33ca2e9f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.023e+04, gradient 1.610e-03, dot -0.478; [548bd9e1-79a8-4d72-a924-9a9cf0e26b39 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -316.7205259469738, -178.28702178271723, -148.83096655871586, -148.83091815776854
LBFGS Accumulation History: 3 points
Removed measurement 33ca2e9f to history. Total: 3
th(0)=-316.7205259469738;dx=-2.585597169025382E-6
New Minimum: -316.7205259469738 > -325.2084432451992
END: th(5429175.418880349)=-325.2084432451992; dx=-7.327876319765376E-7 evalInputDelta=8.487917298225398
Fitness changed from -316.7205259469738 to -325.2084432451992
Iteration 10 complete. Error: -325.2084432451992 Total: 5.9553; Orientation: 1.0123; Line Search: 3.3269
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/58f1fe06-d65d-4d68-b8ab-38a91af094a4.jpg)
Final threshold in iteration 11: -325.2084432451992 (> -Infinity) after 85.757s (< 5400.000s)
Returns
-325.2084432451992