BasicOptimizer.scala:89 executed in 96.07 seconds (1.456 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: 284853290528300
Reset training subject: 284855346210300
Adding measurement f21637b to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-57.08651169776059;dx=-5.428048191609262E-6
New Minimum: -57.08651169776059 > -57.086518263933975
END: th(2.154434690031884)=-57.086518263933975; dx=-3.529514793754081E-6 evalInputDelta=6.56617338279375E-6
Fitness changed from -57.08651169776059 to -57.086518263933975
Iteration 1 complete. Error: -57.086518263933975 Total: 9.5258; Orientation: 0.0595; Line Search: 3.7359
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/ac840f3c-a6f5-414b-9288-86bec8226d55.jpg)
Adding measurement 3a14e8b9 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-57.086518263933975;dx=-3.5295241407115633E-6
New Minimum: -57.086518263933975 > -57.08653467936414
WOLFE (weak): th(4.641588833612779)=-57.08653467936414; dx=-3.529512986950087E-6 evalInputDelta=1.6415430167171507E-5
New Minimum: -57.08653467936414 > -57.086551094789584
WOLFE (weak): th(9.283177667225559)=-57.086551094789584; dx=-3.5295175952412352E-6 evalInputDelta=3.283085560923382E-5
New Minimum: -57.086551094789584 > -57.08661347336322
WOLFE (weak): th(27.849533001676676)=-57.08661347336322; dx=-3.529512842245378E-6 evalInputDelta=9.520942924723386E-5
New Minimum: -57.08661347336322 > -57.086908949891175
WOLFE (weak): th(111.3981320067067)=-57.086908949891175; dx=-3.529445621100662E-6 evalInputDelta=3.9068595719982113E-4
New Minimum: -57.086908949891175 > -57.08848479887847
WOLFE (weak): th(556.9906600335335)=-57.08848479887847; dx=-3.5291693301414396E-6 evalInputDelta=0.001966534944493503
New Minimum: -57.08848479887847 > -57.098313175245146
WOLFE (weak): th(3341.9439602012008)=-57.098313175245146; dx=-3.5278993109443053E-6 evalInputDelta=0.011794911311170608
New Minimum: -57.098313175245146 > -57.16897580802517
WOLFE (weak): th(23393.607721408407)=-57.16897580802517; dx=-3.5207492631320525E-6 evalInputDelta=0.08245754409119854
New Minimum: -57.16897580802517 > -57.74039538844013
WOLFE (weak): th(187148.86177126726)=-57.74039538844013; dx=-3.4573504554584495E-6 evalInputDelta=0.6538771245061525
New Minimum: -57.74039538844013 > -62.454011968068386
END: th(1684339.7559414054)=-62.454011968068386; dx=-2.8181314281648413E-6 evalInputDelta=5.367493704134411
Fitness changed from -57.086518263933975 to -62.454011968068386
Iteration 2 complete. Error: -62.454011968068386 Total: 21.9296; Orientation: 0.0586; Line Search: 19.6778
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/153780a1-42e9-4bbf-8485-f55c5a34f5b6.jpg)
Adding measurement 1704cc30 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-62.454011968068386;dx=-2.539684102705942E-6
New Minimum: -62.454011968068386 > -69.94595476192087
END: th(3628800.0000000005)=-69.94595476192087; dx=-1.582523809060718E-6 evalInputDelta=7.491942793852488
Fitness changed from -62.454011968068386 to -69.94595476192087
Iteration 3 complete. Error: -69.94595476192087 Total: 6.2676; Orientation: 0.0608; Line Search: 4.0177
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/a7e421b0-b451-4ff7-85ff-dbda8eb14721.jpg)
Adding measurement 7ee83545 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.017e+04, gradient 1.233e-03, dot -0.771; [1dcef19b-ccd6-4e3d-8b88-0ff7b937906e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -69.94595476192087, -62.454011968068386, -57.086518263933975, -57.08651169776059
LBFGS Accumulation History: 3 points
Removed measurement 7ee83545 to history. Total: 3
th(0)=-69.94595476192087;dx=-1.5193247596301855E-6
New Minimum: -69.94595476192087 > -78.46240700256101
END: th(7818012.603187701)=-78.46240700256101; dx=-7.030131728067464E-7 evalInputDelta=8.516452240640135
Fitness changed from -69.94595476192087 to -78.46240700256101
Iteration 4 complete. Error: -78.46240700256101 Total: 6.9644; Orientation: 1.0250; Line Search: 3.7519
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/6e09d943-8621-43d8-91ef-7f4ed77a7a05.jpg)
Adding measurement 4451768a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.160e+03, gradient 1.050e-03, dot -0.535; [1dcef19b-ccd6-4e3d-8b88-0ff7b937906e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -78.46240700256101, -62.454011968068386, -57.086518263933975, -57.08651169776059
LBFGS Accumulation History: 3 points
Removed measurement 4451768a to history. Total: 3
th(0)=-78.46240700256101;dx=-1.1035097246216055E-6
New Minimum: -78.46240700256101 > -85.74369039031977
END: th(1.6843397559414055E7)=-85.74369039031977; dx=-7.574996132687417E-8 evalInputDelta=7.281283387758762
Fitness changed from -78.46240700256101 to -85.74369039031977
Iteration 5 complete. Error: -85.74369039031977 Total: 7.2519; Orientation: 1.0122; Line Search: 3.8003
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/22c846d5-03c1-4ca4-8309-a20d0947e01c.jpg)
Adding measurement 69e3d240 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.470e+03, gradient 1.274e-03, dot -0.228; [1dcef19b-ccd6-4e3d-8b88-0ff7b937906e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -85.74369039031977, -62.454011968068386, -57.086518263933975, -57.08651169776059
LBFGS Accumulation History: 3 points
Removed measurement 69e3d240 to history. Total: 3
th(0)=-85.74369039031977;dx=-1.6232962907352628E-6
Armijo: th(3.628800000000001E7)=-79.7718009311986; dx=4.091974465111921E-7 evalInputDelta=-5.971889459121172
New Minimum: -85.74369039031977 > -88.79999111722327
WOLF (strong): th(1.8144000000000004E7)=-88.79999111722327; dx=5.52906426733383E-7 evalInputDelta=3.056300726903501
New Minimum: -88.79999111722327 > -92.05644985078632
END: th(6048000.000000001)=-92.05644985078632; dx=-4.137949227083173E-7 evalInputDelta=6.312759460466552
Fitness changed from -85.74369039031977 to -92.05644985078632
Iteration 6 complete. Error: -92.05644985078632 Total: 10.8828; Orientation: 1.0840; Line Search: 7.6454
Adding measurement 717315c2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.632e+04, gradient 8.613e-04, dot -0.501; [1dcef19b-ccd6-4e3d-8b88-0ff7b937906e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -92.05644985078632, -62.454011968068386, -57.086518263933975, -57.08651169776059
LBFGS Accumulation History: 3 points
Removed measurement 717315c2 to history. Total: 3
th(0)=-92.05644985078632;dx=-7.418252447576282E-7
New Minimum: -92.05644985078632 > -96.72574422452878
END: th(1.3030021005312836E7)=-96.72574422452878; dx=-7.692041688831453E-8 evalInputDelta=4.66929437374246
Fitness changed from -92.05644985078632 to -96.72574422452878
Iteration 7 complete. Error: -96.72574422452878 Total: 6.9485; Orientation: 1.0603; Line Search: 3.9438
Adding measurement 5f884388 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.849e+04, gradient 1.025e-03, dot -0.363; [1dcef19b-ccd6-4e3d-8b88-0ff7b937906e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -96.72574422452878, -62.454011968068386, -57.086518263933975, -57.08651169776059
LBFGS Accumulation History: 3 points
Removed measurement 5f884388 to history. Total: 3
th(0)=-96.72574422452878;dx=-1.0512378198446632E-6
Armijo: th(2.8072329265690096E7)=-94.37733024543802; dx=3.3843260869561964E-7 evalInputDelta=-2.3484139790907648
New Minimum: -96.72574422452878 > -99.43521466628681
WOLF (strong): th(1.4036164632845048E7)=-99.43521466628681; dx=3.3275092021139916E-7 evalInputDelta=2.709470441758029
New Minimum: -99.43521466628681 > -100.18585198319529
END: th(4678721.544281683)=-100.18585198319529; dx=-3.975469206473298E-7 evalInputDelta=3.46010775866651
Fitness changed from -96.72574422452878 to -100.18585198319529
Iteration 8 complete. Error: -100.18585198319529 Total: 10.6392; Orientation: 1.0160; Line Search: 7.7713
Adding measurement 7f194cbb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.395e+04, gradient 6.836e-04, dot -0.617; [1dcef19b-ccd6-4e3d-8b88-0ff7b937906e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -100.18585198319529, -62.454011968068386, -57.086518263933975, -57.08651169776059
LBFGS Accumulation History: 3 points
Removed measurement 7f194cbb to history. Total: 3
th(0)=-100.18585198319529;dx=-4.673030432982674E-7
New Minimum: -100.18585198319529 > -103.64745015621679
END: th(1.0080000000000004E7)=-103.64745015621679; dx=-2.3823572048079415E-7 evalInputDelta=3.4615981730214997
Fitness changed from -100.18585198319529 to -103.64745015621679
Iteration 9 complete. Error: -103.64745015621679 Total: 6.8181; Orientation: 1.0180; Line Search: 3.9782
Adding measurement 7ab9d9f3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.584e+04, gradient 7.287e-04, dot -0.538; [1dcef19b-ccd6-4e3d-8b88-0ff7b937906e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -103.64745015621679, -62.454011968068386, -57.086518263933975, -57.08651169776059
LBFGS Accumulation History: 3 points
Removed measurement 7ab9d9f3 to history. Total: 3
th(0)=-103.64745015621679;dx=-5.309333734698044E-7
New Minimum: -103.64745015621679 > -106.3970644912404
WOLF (strong): th(2.1716701675521396E7)=-106.3970644912404; dx=5.346309734964225E-8 evalInputDelta=2.749614335023608
New Minimum: -106.3970644912404 > -106.44351253758032
END: th(1.0858350837760698E7)=-106.44351253758032; dx=-6.909690416882291E-8 evalInputDelta=2.7960623813635266
Fitness changed from -103.64745015621679 to -106.44351253758032
Iteration 10 complete. Error: -106.44351253758032 Total: 8.4301; Orientation: 0.9759; Line Search: 5.6775
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/2c6ea2fe-0a44-4e0a-a414-8436af5a6613.jpg)
Final threshold in iteration 11: -106.44351253758032 (> -Infinity) after 96.074s (< 5400.000s)
Returns
-106.44351253758032