BasicOptimizer.scala:89 executed in 301.27 seconds (4.217 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: 580276249732800
Reset training subject: 580282258979100
Adding measurement ea336d1 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-40.07757914453652;dx=-2.1371832777365484E-6
New Minimum: -40.07757914453652 > -40.07758479811489
END: th(2.154434690031884)=-40.07758479811489; dx=-1.854530595671537E-6 evalInputDelta=5.653578369901879E-6
Fitness changed from -40.07757914453652 to -40.07758479811489
Iteration 1 complete. Error: -40.07758479811489 Total: 30.2268; Orientation: 0.1426; Line Search: 12.3093
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/52e1ee54-333e-4e72-bfd9-f33a6e4d14c5.jpg)
Adding measurement 59b99a14 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-40.07758479811489;dx=-1.8533597262659744E-6
New Minimum: -40.07758479811489 > -40.077594220743734
WOLFE (weak): th(4.641588833612779)=-40.077594220743734; dx=-1.8516406266928704E-6 evalInputDelta=9.422628842514769E-6
New Minimum: -40.077594220743734 > -40.07760364337037
WOLFE (weak): th(9.283177667225559)=-40.07760364337037; dx=-1.8508753405372974E-6 evalInputDelta=1.884525547524163E-5
New Minimum: -40.07760364337037 > -40.077641333854714
WOLFE (weak): th(27.849533001676676)=-40.077641333854714; dx=-1.849761724821634E-6 evalInputDelta=5.653573982300486E-5
New Minimum: -40.077641333854714 > -40.07781282511099
WOLFE (weak): th(111.3981320067067)=-40.07781282511099; dx=-1.8488895495176035E-6 evalInputDelta=2.280269960976966E-4
New Minimum: -40.07781282511099 > -40.07871549775882
WOLFE (weak): th(556.9906600335335)=-40.07871549775882; dx=-1.8487975337615106E-6 evalInputDelta=0.0011306996439301997
New Minimum: -40.07871549775882 > -40.08437228597087
WOLFE (weak): th(3341.9439602012008)=-40.08437228597087; dx=-1.8484775035390412E-6 evalInputDelta=0.006787487855980601
New Minimum: -40.08437228597087 > -40.12506369028127
WOLFE (weak): th(23393.607721408407)=-40.12506369028127; dx=-1.845839307265457E-6 evalInputDelta=0.04747889216638157
New Minimum: -40.12506369028127 > -40.455170614406924
WOLFE (weak): th(187148.86177126726)=-40.455170614406924; dx=-1.823303966956542E-6 evalInputDelta=0.3775858162920329
New Minimum: -40.455170614406924 > -43.254334773444135
END: th(1684339.7559414054)=-43.254334773444135; dx=-1.5733696660511156E-6 evalInputDelta=3.176749975329244
Fitness changed from -40.07758479811489 to -43.254334773444135
Iteration 2 complete. Error: -43.254334773444135 Total: 69.5969; Orientation: 0.1383; Line Search: 62.2681
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/6c50b356-c69c-4a64-8d9f-4c3efe5e89db.jpg)
Adding measurement 1602e339 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-43.254334773444135;dx=-1.5089361538783952E-6
New Minimum: -43.254334773444135 > -48.15308568653451
END: th(3628800.0000000005)=-48.15308568653451; dx=-9.929692150106077E-7 evalInputDelta=4.898750913090375
Fitness changed from -43.254334773444135 to -48.15308568653451
Iteration 3 complete. Error: -48.15308568653451 Total: 19.0212; Orientation: 0.1354; Line Search: 11.7697
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/060d33dd-0285-4075-99b6-8a2baa0dcc1b.jpg)
Adding measurement 4e5e2624 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.064e+04, gradient 9.797e-04, dot -0.802; [2ecc2058-1fef-4f7a-9c35-406a41f3e0a3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -48.15308568653451, -43.254334773444135, -40.07758479811489, -40.07757914453652
LBFGS Accumulation History: 3 points
Removed measurement 4e5e2624 to history. Total: 3
th(0)=-48.15308568653451;dx=-9.569541550305744E-7
New Minimum: -48.15308568653451 > -54.282512245133816
END: th(7818012.603187701)=-54.282512245133816; dx=-5.070891304341749E-7 evalInputDelta=6.129426558599306
Fitness changed from -48.15308568653451 to -54.282512245133816
Iteration 4 complete. Error: -54.282512245133816 Total: 21.2456; Orientation: 2.5054; Line Search: 11.7756
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/60b78856-aacf-4ade-91a9-7ae23ed57222.jpg)
Adding measurement 44172d10 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.581e+03, gradient 8.538e-04, dot -0.587; [2ecc2058-1fef-4f7a-9c35-406a41f3e0a3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -54.282512245133816, -43.254334773444135, -40.07758479811489, -40.07757914453652
LBFGS Accumulation History: 3 points
Removed measurement 44172d10 to history. Total: 3
th(0)=-54.282512245133816;dx=-7.280561026597029E-7
New Minimum: -54.282512245133816 > -60.37970540443805
END: th(1.6843397559414055E7)=-60.37970540443805; dx=-1.3176810175010531E-7 evalInputDelta=6.097193159304233
Fitness changed from -54.282512245133816 to -60.37970540443805
Iteration 5 complete. Error: -60.37970540443805 Total: 22.0355; Orientation: 2.5049; Line Search: 12.4323
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/293a8e5a-871c-45f7-94b8-68c2f5e6d166.jpg)
Adding measurement 35c796ac to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.107e+04, gradient 1.018e-03, dot -0.319; [2ecc2058-1fef-4f7a-9c35-406a41f3e0a3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -60.37970540443805, -43.254334773444135, -40.07758479811489, -40.07757914453652
LBFGS Accumulation History: 3 points
Removed measurement 35c796ac to history. Total: 3
th(0)=-60.37970540443805;dx=-1.0354213942438286E-6
Armijo: th(3.628800000000001E7)=-57.563923024982; dx=2.5250175650224144E-7 evalInputDelta=-2.8157823794560457
New Minimum: -60.37970540443805 > -63.79258370666587
WOLF (strong): th(1.8144000000000004E7)=-63.79258370666587; dx=2.8406895655804516E-7 evalInputDelta=3.412878302227824
New Minimum: -63.79258370666587 > -65.07874785459252
END: th(6048000.000000001)=-65.07874785459252; dx=-3.5834420610663406E-7 evalInputDelta=4.699042450154472
Fitness changed from -60.37970540443805 to -65.07874785459252
Iteration 6 complete. Error: -65.07874785459252 Total: 34.2710; Orientation: 2.4565; Line Search: 24.8212
Adding measurement c3666ac to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.928e+04, gradient 7.208e-04, dot -0.599; [2ecc2058-1fef-4f7a-9c35-406a41f3e0a3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -65.07874785459252, -43.254334773444135, -40.07758479811489, -40.07757914453652
LBFGS Accumulation History: 3 points
Removed measurement c3666ac to history. Total: 3
th(0)=-65.07874785459252;dx=-5.188159574988761E-7
New Minimum: -65.07874785459252 > -69.37576214434057
END: th(1.3030021005312836E7)=-69.37576214434057; dx=-1.537640949033239E-7 evalInputDelta=4.2970142897480486
Fitness changed from -65.07874785459252 to -69.37576214434057
Iteration 7 complete. Error: -69.37576214434057 Total: 20.6338; Orientation: 2.4243; Line Search: 12.3093
Adding measurement 405b8c81 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.492e+04, gradient 8.274e-04, dot -0.483; [2ecc2058-1fef-4f7a-9c35-406a41f3e0a3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -69.37576214434057, -43.254334773444135, -40.07758479811489, -40.07757914453652
LBFGS Accumulation History: 3 points
Removed measurement 405b8c81 to history. Total: 3
th(0)=-69.37576214434057;dx=-6.839723035804382E-7
New Minimum: -69.37576214434057 > -69.99145942592229
WOLF (strong): th(2.8072329265690096E7)=-69.99145942592229; dx=1.6261526084628483E-7 evalInputDelta=0.615697281581717
New Minimum: -69.99145942592229 > -72.48196771192238
WOLF (strong): th(1.4036164632845048E7)=-72.48196771192238; dx=8.331270161327846E-8 evalInputDelta=3.10620556758181
END: th(4678721.544281683)=-71.95991409682946; dx=-3.232853914383445E-7 evalInputDelta=2.584151952488895
Fitness changed from -69.37576214434057 to -72.48196771192238
Iteration 8 complete. Error: -72.48196771192238 Total: 33.9417; Orientation: 2.6208; Line Search: 24.9789
Adding measurement 3faef649 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.666e+04, gradient 9.492e-04, dot -0.366; [2ecc2058-1fef-4f7a-9c35-406a41f3e0a3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -72.48196771192238, -43.254334773444135, -40.07758479811489, -40.07757914453652
LBFGS Accumulation History: 3 points
Removed measurement 3faef649 to history. Total: 3
th(0)=-72.48196771192238;dx=-9.002495852585302E-7
New Minimum: -72.48196771192238 > -77.36574854980152
WOLF (strong): th(1.0080000000000004E7)=-77.36574854980152; dx=3.8585832924396203E-8 evalInputDelta=4.883780837879144
END: th(5040000.000000002)=-76.33138034273085; dx=-4.6112704963299936E-7 evalInputDelta=3.849412630808473
Fitness changed from -72.48196771192238 to -77.36574854980152
Iteration 9 complete. Error: -77.36574854980152 Total: 27.6010; Orientation: 2.8611; Line Search: 18.4759
Adding measurement 5d447ff2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.766e+04, gradient 7.472e-04, dot -0.512; [2ecc2058-1fef-4f7a-9c35-406a41f3e0a3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -77.36574854980152, -43.254334773444135, -40.07758479811489, -40.07757914453652
LBFGS Accumulation History: 3 points
Removed measurement 5d447ff2 to history. Total: 3
th(0)=-77.36574854980152;dx=-5.56759539322661E-7
New Minimum: -77.36574854980152 > -80.52834914420397
END: th(1.0858350837760698E7)=-80.52834914420397; dx=-2.6965334423615194E-8 evalInputDelta=3.1626005944024485
Fitness changed from -77.36574854980152 to -80.52834914420397
Iteration 10 complete. Error: -80.52834914420397 Total: 21.4473; Orientation: 3.1274; Line Search: 12.7006
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/8596678c-0b76-423a-97f7-24509bc67e1b.jpg)
Final threshold in iteration 11: -80.52834914420397 (> -Infinity) after 301.269s (< 5400.000s)
Returns
-80.52834914420397