BasicOptimizer.scala:89 executed in 297.05 seconds (4.503 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: 584092643492500
Reset training subject: 584098578198100
Adding measurement 34129fb9 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-44.29705153300702;dx=-2.0743439114560607E-6
New Minimum: -44.29705153300702 > -44.297056648059375
END: th(2.154434690031884)=-44.297056648059375; dx=-1.8396332196702517E-6 evalInputDelta=5.115052353232841E-6
Fitness changed from -44.29705153300702 to -44.297056648059375
Iteration 1 complete. Error: -44.297056648059375 Total: 30.5349; Orientation: 0.1426; Line Search: 11.8332
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/0a9604d2-9fa8-4a8a-a30c-f0318cfd0dad.jpg)
Adding measurement 5ce61508 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-44.297056648059375;dx=-1.8382114135004398E-6
New Minimum: -44.297056648059375 > -44.29706687816229
WOLFE (weak): th(4.641588833612779)=-44.29706687816229; dx=-1.8371317983188587E-6 evalInputDelta=1.0230102915897987E-5
New Minimum: -44.29706687816229 > -44.29707540324626
WOLFE (weak): th(9.283177667225559)=-44.29707540324626; dx=-1.8361923791601338E-6 evalInputDelta=1.875518688621014E-5
New Minimum: -44.29707540324626 > -44.29711120858099
WOLFE (weak): th(27.849533001676676)=-44.29711120858099; dx=-1.8349765482905351E-6 evalInputDelta=5.456052161889602E-5
New Minimum: -44.29711120858099 > -44.2972800047692
WOLFE (weak): th(111.3981320067067)=-44.2972800047692; dx=-1.8348581975020609E-6 evalInputDelta=2.2335670982442934E-4
New Minimum: -44.2972800047692 > -44.29817342034661
WOLFE (weak): th(556.9906600335335)=-44.29817342034661; dx=-1.8350057703740487E-6 evalInputDelta=0.0011167722872329477
New Minimum: -44.29817342034661 > -44.30376708807857
WOLFE (weak): th(3341.9439602012008)=-44.30376708807857; dx=-1.8343424269282432E-6 evalInputDelta=0.006710440019197961
New Minimum: -44.30376708807857 > -44.34399648084519
WOLFE (weak): th(23393.607721408407)=-44.34399648084519; dx=-1.8323706748524075E-6 evalInputDelta=0.04693983278581726
New Minimum: -44.34399648084519 > -44.670808778775665
WOLFE (weak): th(187148.86177126726)=-44.670808778775665; dx=-1.8135640244580138E-6 evalInputDelta=0.37375213071629076
New Minimum: -44.670808778775665 > -47.48445490260311
END: th(1684339.7559414054)=-47.48445490260311; dx=-1.616469458084443E-6 evalInputDelta=3.187398254543737
Fitness changed from -44.297056648059375 to -47.48445490260311
Iteration 2 complete. Error: -47.48445490260311 Total: 69.2520; Orientation: 0.1440; Line Search: 61.8807
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/d06594f9-b88c-465e-92b5-4384bbd3d488.jpg)
Adding measurement 3fb1ae15 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-47.48445490260311;dx=-1.5501358458336406E-6
New Minimum: -47.48445490260311 > -52.69915593095663
END: th(3628800.0000000005)=-52.69915593095663; dx=-1.108722119232763E-6 evalInputDelta=5.214701028353517
Fitness changed from -47.48445490260311 to -52.69915593095663
Iteration 3 complete. Error: -52.69915593095663 Total: 19.0499; Orientation: 0.1363; Line Search: 11.9595
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/9ed5aeab-67ec-4443-aab0-28fc586226aa.jpg)
Adding measurement 600a7fe4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.431e+04, gradient 1.012e-03, dot -0.865; [de4800b2-1847-468f-884e-f308a6084a42 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -52.69915593095663, -47.48445490260311, -44.297056648059375, -44.29705153300702
LBFGS Accumulation History: 3 points
Removed measurement 600a7fe4 to history. Total: 3
th(0)=-52.69915593095663;dx=-1.0219993900014368E-6
New Minimum: -52.69915593095663 > -59.416395213879845
END: th(7818012.603187701)=-59.416395213879845; dx=-5.721482064196346E-7 evalInputDelta=6.717239282923217
Fitness changed from -52.69915593095663 to -59.416395213879845
Iteration 4 complete. Error: -59.416395213879845 Total: 21.8249; Orientation: 2.5100; Line Search: 12.1621
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/bcd9a615-0ef3-4349-b361-c71be2c4bdec.jpg)
Adding measurement 171f1b72 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.015e+04, gradient 8.261e-04, dot -0.629; [de4800b2-1847-468f-884e-f308a6084a42 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -59.416395213879845, -47.48445490260311, -44.297056648059375, -44.29705153300702
LBFGS Accumulation History: 3 points
Removed measurement 171f1b72 to history. Total: 3
th(0)=-59.416395213879845;dx=-6.802893256005085E-7
New Minimum: -59.416395213879845 > -66.59722469444931
END: th(1.6843397559414055E7)=-66.59722469444931; dx=-2.0542549361607651E-7 evalInputDelta=7.180829480569464
Fitness changed from -59.416395213879845 to -66.59722469444931
Iteration 5 complete. Error: -66.59722469444931 Total: 21.1945; Orientation: 2.5553; Line Search: 11.7133
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/10563f60-4593-4498-a51f-e928a33fbe30.jpg)
Adding measurement 2f09b3a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.250e+04, gradient 9.021e-04, dot -0.403; [de4800b2-1847-468f-884e-f308a6084a42 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -66.59722469444931, -47.48445490260311, -44.297056648059375, -44.29705153300702
LBFGS Accumulation History: 3 points
Removed measurement 2f09b3a to history. Total: 3
th(0)=-66.59722469444931;dx=-8.131365044849768E-7
Armijo: th(3.628800000000001E7)=-66.07876922928219; dx=1.9695525094506157E-7 evalInputDelta=-0.518455465167122
New Minimum: -66.59722469444931 > -70.28765002148451
WOLF (strong): th(1.8144000000000004E7)=-70.28765002148451; dx=1.520373964251583E-7 evalInputDelta=3.6904253270352
New Minimum: -70.28765002148451 > -70.3449321703117
END: th(6048000.000000001)=-70.3449321703117; dx=-3.2006422605864777E-7 evalInputDelta=3.7477074758623843
Fitness changed from -66.59722469444931 to -70.3449321703117
Iteration 6 complete. Error: -70.3449321703117 Total: 33.9888; Orientation: 2.4339; Line Search: 24.4162
Adding measurement 4928cc6c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.695e+04, gradient 6.689e-04, dot -0.636; [de4800b2-1847-468f-884e-f308a6084a42 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -70.3449321703117, -47.48445490260311, -44.297056648059375, -44.29705153300702
LBFGS Accumulation History: 3 points
Removed measurement 4928cc6c to history. Total: 3
th(0)=-70.3449321703117;dx=-4.4715342316917594E-7
New Minimum: -70.3449321703117 > -74.4808402189909
END: th(1.3030021005312836E7)=-74.4808402189909; dx=-1.9240493173356306E-7 evalInputDelta=4.135908048679212
Fitness changed from -70.3449321703117 to -74.4808402189909
Iteration 7 complete. Error: -74.4808402189909 Total: 20.5834; Orientation: 2.4094; Line Search: 12.2420
Adding measurement 30e5bd17 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.185e+04, gradient 7.550e-04, dot -0.528; [de4800b2-1847-468f-884e-f308a6084a42 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -74.4808402189909, -47.48445490260311, -44.297056648059375, -44.29705153300702
LBFGS Accumulation History: 3 points
Removed measurement 30e5bd17 to history. Total: 3
th(0)=-74.4808402189909;dx=-5.692019889436733E-7
New Minimum: -74.4808402189909 > -76.26317571379586
WOLF (strong): th(2.8072329265690096E7)=-76.26317571379586; dx=1.0245795142672719E-7 evalInputDelta=1.7823354948049541
New Minimum: -76.26317571379586 > -77.60393499284609
WOLF (strong): th(1.4036164632845048E7)=-77.60393499284609; dx=1.0787431837374399E-8 evalInputDelta=3.123094773855186
END: th(4678721.544281683)=-76.66578762868977; dx=-2.942565424786459E-7 evalInputDelta=2.1849474096988644
Fitness changed from -74.4808402189909 to -77.60393499284609
Iteration 8 complete. Error: -77.60393499284609 Total: 32.0428; Orientation: 2.4319; Line Search: 23.9619
Adding measurement 54b6cfce to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.272e+04, gradient 8.647e-04, dot -0.397; [de4800b2-1847-468f-884e-f308a6084a42 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -77.60393499284609, -47.48445490260311, -44.297056648059375, -44.29705153300702
LBFGS Accumulation History: 3 points
Removed measurement 54b6cfce to history. Total: 3
th(0)=-77.60393499284609;dx=-7.47666305253484E-7
New Minimum: -77.60393499284609 > -81.75435362259883
WOLF (strong): th(1.0080000000000004E7)=-81.75435362259883; dx=3.307378796480699E-9 evalInputDelta=4.1504186297527355
END: th(5040000.000000002)=-80.78490906172772; dx=-3.973350306440649E-7 evalInputDelta=3.180974068881625
Fitness changed from -77.60393499284609 to -81.75435362259883
Iteration 9 complete. Error: -81.75435362259883 Total: 27.0749; Orientation: 2.4321; Line Search: 18.3777
Adding measurement 5e30c25a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.122e+04, gradient 7.074e-04, dot -0.528; [de4800b2-1847-468f-884e-f308a6084a42 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -81.75435362259883, -47.48445490260311, -44.297056648059375, -44.29705153300702
LBFGS Accumulation History: 3 points
Removed measurement 5e30c25a to history. Total: 3
th(0)=-81.75435362259883;dx=-4.989867727237555E-7
New Minimum: -81.75435362259883 > -84.63239615820115
END: th(1.0858350837760698E7)=-84.63239615820115; dx=-3.871729111659361E-8 evalInputDelta=2.8780425356023187
Fitness changed from -81.75435362259883 to -84.63239615820115
Iteration 10 complete. Error: -84.63239615820115 Total: 20.2526; Orientation: 2.4219; Line Search: 11.9967
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/88a0b91a-809f-4445-81a1-f57f4ff194dd.jpg)
Final threshold in iteration 11: -84.63239615820115 (> -Infinity) after 297.046s (< 5400.000s)
Returns
-84.63239615820115