Code from BasicOptimizer.scala:88 executed in 201.16 seconds (3.665 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: 606140033538
Reset training subject: 610581895738
Adding measurement 28964c9a to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=15.346996769309044;dx=-3.016019178423283E-6
New Minimum: 15.346996769309044 > 15.346990957856178
WOLFE (weak): th(2.154434690031884)=15.346990957856178; dx=-3.0107883870296313E-6 evalInputDelta=5.811452865600586E-6
New Minimum: 15.346990957856178 > 15.346983969211578
WOLFE (weak): th(4.308869380063768)=15.346983969211578; dx=-3.017672350317151E-6 evalInputDelta=1.2800097465515137E-5
New Minimum: 15.346983969211578 > 15.346957802772522
WOLFE (weak): th(12.926608140191302)=15.346957802772522; dx=-3.020895604363414E-6 evalInputDelta=3.896653652191162E-5
New Minimum: 15.346957802772522 > 15.346841230988503
WOLFE (weak): th(51.70643256076521)=15.346841230988503; dx=-3.0242978570638224E-6 evalInputDelta=1.5553832054138184E-4
New Minimum: 15.346841230988503 > 15.346215695142746
WOLFE (weak): th(258.53216280382605)=15.346215695142746; dx=-3.016413570878956E-6 evalInputDelta=7.810741662979126E-4
New Minimum: 15.346215695142746 > 15.342315286397934
WOLFE (weak): th(1551.1929768229563)=15.342315286397934; dx=-3.0079475662157363E-6 evalInputDelta=0.004681482911109924
New Minimum: 15.342315286397934 > 15.314510181546211
WOLFE (weak): th(10858.350837760694)=15.314510181546211; dx=-2.9814799280322095E-6 evalInputDelta=0.03248658776283264
New Minimum: 15.314510181546211 > 15.094446778297424
WOLFE (weak): th(86866.80670208555)=15.094446778297424; dx=-2.7544271610370264E-6 evalInputDelta=0.25254999101161957
New Minimum: 15.094446778297424 > 13.813534930348396
END: th(781801.26031877)=13.813534930348396; dx=-9.454631578068813E-7 evalInputDelta=1.5334618389606476
Fitness changed from 15.346996769309044 to 13.813534930348396
Iteration 1 complete. Error: 13.813534930348396 Total: 53.9149; Orientation: 0.0108; Line Search: 41.4056
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/cad36df6-7560-42f3-bf5b-54f63282e39
...skipping 5789 bytes...
or: 9.63187962770462 Total: 12.9083; Orientation: 0.2504; Line Search: 8.3385
Adding measurement 11000d27 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.253e+03, gradient 7.164e-04, dot -0.373; [f6d0e76e-69ce-4bb3-8a6a-f9a367694109 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 9.63187962770462, 12.61956886947155, 13.813534930348396, 15.346996769309044
LBFGS Accumulation History: 3 points
Removed measurement 11000d27 to history. Total: 3
th(0)=9.63187962770462;dx=-4.895719131592046E-7
Armijo: th(3780000.0000000005)=10.286706283688545; dx=9.461798814706645E-9 evalInputDelta=-0.6548266559839249
New Minimum: 9.63187962770462 > 9.350275605916977
END: th(1890000.0000000002)=9.350275605916977; dx=-1.3145072859005395E-7 evalInputDelta=0.28160402178764343
Fitness changed from 9.63187962770462 to 9.350275605916977
Iteration 9 complete. Error: 9.350275605916977 Total: 17.0717; Orientation: 0.2308; Line Search: 12.5615
Adding measurement 208f66f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.379e+03, gradient 7.133e-04, dot -0.337; [f6d0e76e-69ce-4bb3-8a6a-f9a367694109 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 9.350275605916977, 12.61956886947155, 13.813534930348396, 15.346996769309044
LBFGS Accumulation History: 3 points
Removed measurement 208f66f to history. Total: 3
th(0)=9.350275605916977;dx=-4.915137050959892E-7
Armijo: th(4071881.564160261)=9.905816361308098; dx=-3.2296623274422277E-9 evalInputDelta=-0.5555407553911209
New Minimum: 9.350275605916977 > 9.163012146949768
END: th(2035940.7820801304)=9.163012146949768; dx=-7.549694261778427E-8 evalInputDelta=0.18726345896720886
Fitness changed from 9.350275605916977 to 9.163012146949768
Iteration 10 complete. Error: 9.163012146949768 Total: 16.9256; Orientation: 0.2330; Line Search: 12.0894
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/ab15e36a-04e8-4f43-8ef4-f256316be5f2.jpg)
Final threshold in iteration 11: 9.163012146949768 (> -Infinity) after 201.154s (< 1800.000s)
9.163012146949768