BasicOptimizer.scala:89 executed in 129.58 seconds (1.512 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: 29401150157000
Reset training subject: 29403780697800
Adding measurement 7502c979 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-73.63966363974868;dx=-4.73678770386845E-6
New Minimum: -73.63966363974868 > -73.63967060995255
END: th(2.154434690031884)=-73.63967060995255; dx=-3.2239684632019822E-6 evalInputDelta=6.970203870082514E-6
Fitness changed from -73.63966363974868 to -73.63967060995255
Iteration 1 complete. Error: -73.63967060995255 Total: 12.7694; Orientation: 0.0637; Line Search: 5.1844
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/b3dbd404-8543-4f54-97fa-f05ac16c4c9e.jpg)
Adding measurement 399e3791 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-73.63967060995255;dx=-3.1963117719816873E-6
New Minimum: -73.63967060995255 > -73.63968919715963
WOLFE (weak): th(4.641588833612779)=-73.63968919715963; dx=-3.1943137765995495E-6 evalInputDelta=1.8587207080145163E-5
New Minimum: -73.63968919715963 > -73.639707784362
WOLFE (weak): th(9.283177667225559)=-73.639707784362; dx=-3.193109245192459E-6 evalInputDelta=3.7174409456497415E-5
New Minimum: -73.639707784362 > -73.63977748632918
WOLFE (weak): th(27.849533001676676)=-73.63977748632918; dx=-3.1906457358844853E-6 evalInputDelta=1.0687637663409078E-4
New Minimum: -73.63977748632918 > -73.64008649758907
WOLFE (weak): th(111.3981320067067)=-73.64008649758907; dx=-3.187718184798495E-6 evalInputDelta=4.1588763652100624E-4
New Minimum: -73.64008649758907 > -73.64171749794296
WOLFE (weak): th(556.9906600335335)=-73.64171749794296; dx=-3.18816394279964E-6 evalInputDelta=0.00204688799041719
New Minimum: -73.64171749794296 > -73.65194876159416
WOLFE (weak): th(3341.9439602012008)=-73.65194876159416; dx=-3.1870446568896734E-6 evalInputDelta=0.012278151641609725
New Minimum: -73.65194876159416 > -73.72554920331653
WOLFE (weak): th(23393.607721408407)=-73.72554920331653; dx=-3.1821258966756226E-6 evalInputDelta=0.08587859336398651
New Minimum: -73.72554920331653 > -74.32187216185778
WOLFE (weak): th(187148.86177126726)=-74.32187216185778; dx=-3.133601343660504E-6 evalInputDelta=0.6822015519052371
New Minimum: -74.32187216185778 > -79.27420414134819
END: th(1684339.7559414054)=-79.27420414134819; dx=-2.5706650777589517E-6 evalInputDelta=5.634533531395647
Fitness changed from -73.63967060995255 to -79.27420414134819
Iteration 2 complete. Error: -79.27420414134819 Total: 28.3906; Orientation: 0.0570; Line Search: 25.4432
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/a86441d0-24f7-47e5-84f3-f9446b359a64.jpg)
Adding measurement 6fe7c0d to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-79.27420414134819;dx=-2.530621708465299E-6
New Minimum: -79.27420414134819 > -87.32732828894616
END: th(3628800.0000000005)=-87.32732828894616; dx=-1.4389333283178448E-6 evalInputDelta=8.05312414759797
Fitness changed from -79.27420414134819 to -87.32732828894616
Iteration 3 complete. Error: -87.32732828894616 Total: 7.8590; Orientation: 0.0642; Line Search: 4.9546
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/040cf4e1-c151-44a4-a853-1d4bc3e6199e.jpg)
Adding measurement 546fb8a2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.102e+04, gradient 1.240e-03, dot -0.698; [eeabfabd-6cc9-461f-ad72-d84863dc690a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -87.32732828894616, -79.27420414134819, -73.63967060995255, -73.63966363974868
LBFGS Accumulation History: 3 points
Removed measurement 546fb8a2 to history. Total: 3
th(0)=-87.32732828894616;dx=-1.5359932809766573E-6
New Minimum: -87.32732828894616 > -96.86975571892195
END: th(7818012.603187701)=-96.86975571892195; dx=-6.5764308080831E-7 evalInputDelta=9.542427429975788
Fitness changed from -87.32732828894616 to -96.86975571892195
Iteration 4 complete. Error: -96.86975571892195 Total: 9.0270; Orientation: 1.0989; Line Search: 5.0185
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/87b282c6-a7d2-4257-bf13-e2f8b008523c.jpg)
Adding measurement 1b7c8ecc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.318e+04, gradient 1.187e-03, dot -0.493; [eeabfabd-6cc9-461f-ad72-d84863dc690a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -96.86975571892195, -79.27420414134819, -73.63967060995255, -73.63966363974868
LBFGS Accumulation History: 3 points
Removed measurement 1b7c8ecc to history. Total: 3
th(0)=-96.86975571892195;dx=-1.4080637039647793E-6
New Minimum: -96.86975571892195 > -100.36595403497287
WOLF (strong): th(1.6843397559414055E7)=-100.36595403497287; dx=2.931706295158943E-7 evalInputDelta=3.496198316050922
New Minimum: -100.36595403497287 > -102.21875508446796
END: th(8421698.779707028)=-102.21875508446796; dx=-3.030838744678395E-8 evalInputDelta=5.348999365546007
Fitness changed from -96.86975571892195 to -102.21875508446796
Iteration 5 complete. Error: -102.21875508446796 Total: 11.7625; Orientation: 1.1241; Line Search: 7.5484
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/4ea730ff-440e-460a-8cf3-78033cc5d06b.jpg)
Adding measurement 304d551e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.178e+04, gradient 1.418e-03, dot -0.317; [eeabfabd-6cc9-461f-ad72-d84863dc690a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -102.21875508446796, -79.27420414134819, -73.63967060995255, -73.63966363974868
LBFGS Accumulation History: 3 points
Removed measurement 304d551e to history. Total: 3
th(0)=-102.21875508446796;dx=-2.0076686940614052E-6
Armijo: th(1.8144000000000004E7)=-95.40994400758152; dx=8.890661220701694E-7 evalInputDelta=-6.8088110768864425
New Minimum: -102.21875508446796 > -105.4591112099644
WOLF (strong): th(9072000.000000002)=-105.4591112099644; dx=8.047741705875461E-7 evalInputDelta=3.2403561254964472
New Minimum: -105.4591112099644 > -107.20713618387178
END: th(3024000.0000000005)=-107.20713618387178; dx=-8.119167249552963E-7 evalInputDelta=4.988381099403824
Fitness changed from -102.21875508446796 to -107.20713618387178
Iteration 6 complete. Error: -107.20713618387178 Total: 14.4932; Orientation: 1.0742; Line Search: 10.3761
Adding measurement 4b9447b1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.212e+04, gradient 9.174e-04, dot -0.649; [eeabfabd-6cc9-461f-ad72-d84863dc690a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -107.20713618387178, -79.27420414134819, -73.63967060995255, -73.63966363974868
LBFGS Accumulation History: 3 points
Removed measurement 4b9447b1 to history. Total: 3
th(0)=-107.20713618387178;dx=-8.409621237760046E-7
New Minimum: -107.20713618387178 > -111.66452404231462
END: th(6515010.502656418)=-111.66452404231462; dx=-4.1212834594421564E-7 evalInputDelta=4.457387858442843
Fitness changed from -107.20713618387178 to -111.66452404231462
Iteration 7 complete. Error: -111.66452404231462 Total: 8.5821; Orientation: 1.0431; Line Search: 5.0780
Adding measurement 43d2a6c1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.550e+04, gradient 9.522e-04, dot -0.575; [eeabfabd-6cc9-461f-ad72-d84863dc690a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -111.66452404231462, -79.27420414134819, -73.63967060995255, -73.63966363974868
LBFGS Accumulation History: 3 points
Removed measurement 43d2a6c1 to history. Total: 3
th(0)=-111.66452404231462;dx=-9.055528868345448E-7
New Minimum: -111.66452404231462 > -115.04703246829713
WOLF (strong): th(1.4036164632845048E7)=-115.04703246829713; dx=9.832251850917788E-8 evalInputDelta=3.3825084259825076
New Minimum: -115.04703246829713 > -115.22709492413047
END: th(7018082.316422524)=-115.22709492413047; dx=-1.364362243051889E-7 evalInputDelta=3.5625708818158444
Fitness changed from -111.66452404231462 to -115.22709492413047
Iteration 8 complete. Error: -115.22709492413047 Total: 11.2949; Orientation: 1.0691; Line Search: 7.7017
Adding measurement 420dcb9b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.600e+04, gradient 1.091e-03, dot -0.454; [eeabfabd-6cc9-461f-ad72-d84863dc690a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -115.22709492413047, -79.27420414134819, -73.63967060995255, -73.63966363974868
LBFGS Accumulation History: 3 points
Removed measurement 420dcb9b to history. Total: 3
th(0)=-115.22709492413047;dx=-1.1890298175466226E-6
Armijo: th(1.5120000000000006E7)=-113.74764121057552; dx=5.407712929639157E-7 evalInputDelta=-1.4794537135549461
New Minimum: -115.22709492413047 > -118.11749243834039
WOLF (strong): th(7560000.000000003)=-118.11749243834039; dx=3.083774775507902E-7 evalInputDelta=2.8903975142099227
END: th(2520000.000000001)=-117.82887452750788; dx=-6.215839579448292E-7 evalInputDelta=2.601779603377409
Fitness changed from -115.22709492413047 to -118.11749243834039
Iteration 9 complete. Error: -118.11749243834039 Total: 13.9339; Orientation: 1.1111; Line Search: 10.3927
Adding measurement 13202160 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.540e+04, gradient 1.297e-03, dot -0.326; [eeabfabd-6cc9-461f-ad72-d84863dc690a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -118.11749243834039, -79.27420414134819, -73.63967060995255, -73.63966363974868
LBFGS Accumulation History: 3 points
Removed measurement 13202160 to history. Total: 3
th(0)=-118.11749243834039;dx=-1.6828706339471856E-6
New Minimum: -118.11749243834039 > -122.26009074503185
WOLF (strong): th(5429175.418880349)=-122.26009074503185; dx=3.239361719114605E-7 evalInputDelta=4.142598306691454
END: th(2714587.7094401745)=-121.88007536577568; dx=-6.976296788936851E-7 evalInputDelta=3.7625829274352895
Fitness changed from -118.11749243834039 to -122.26009074503185
Iteration 10 complete. Error: -122.26009074503185 Total: 11.0469; Orientation: 1.0809; Line Search: 7.5195
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/0b663a38-a250-486f-b096-53caaec07b8f.jpg)
Final threshold in iteration 11: -122.26009074503185 (> -Infinity) after 129.581s (< 5400.000s)
Returns
-122.26009074503185