BasicOptimizer.scala:89 executed in 221.15 seconds (3.982 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: 682781114327100
Reset training subject: 682785715115900
Adding measurement 696856d9 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-2484.9005010261476;dx=-0.008543322590012947
New Minimum: -2484.9005010261476 > -2484.9208236883524
WOLFE (weak): th(2.154434690031884)=-2484.9208236883524; dx=-0.008479223435117408 evalInputDelta=0.02032266220476231
New Minimum: -2484.9208236883524 > -2484.9410455783454
WOLFE (weak): th(4.308869380063768)=-2484.9410455783454; dx=-0.008480284425477005 evalInputDelta=0.040544552197843586
New Minimum: -2484.9410455783454 > -2485.0219314927585
WOLFE (weak): th(12.926608140191302)=-2485.0219314927585; dx=-0.008474115957120585 evalInputDelta=0.12143046661094559
New Minimum: -2485.0219314927585 > -2485.386287883636
WOLFE (weak): th(51.70643256076521)=-2485.386287883636; dx=-0.008474634159956276 evalInputDelta=0.4857868574886197
New Minimum: -2485.386287883636 > -2487.3266773787477
WOLFE (weak): th(258.53216280382605)=-2487.3266773787477; dx=-0.008451111718130701 evalInputDelta=2.426176352600123
New Minimum: -2487.3266773787477 > -2499.3327109450634
WOLFE (weak): th(1551.1929768229563)=-2499.3327109450634; dx=-0.008304176236562974 evalInputDelta=14.43220991891576
New Minimum: -2499.3327109450634 > -2579.2041408155346
END: th(10858.350837760694)=-2579.2041408155346; dx=-0.007174531672578593 evalInputDelta=94.30363978938703
Fitness changed from -2484.9005010261476 to -2579.2041408155346
Iteration 1 complete. Error: -2579.2041408155346 Total: 51.5920; Orientation: 0.1063; Line Search: 37.6414
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/5c44276d-e113-45db-9743-0ecc4809ab4f.jpg)
Adding measurement 14cbd559 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-2579.2041408155346;dx=-0.006467182309714636
New Minimum: -2579.2041408155346 > -2722.871645891521
END: th(23393.607721408407)=-2722.871645891521; dx=-0.004630112839891884 evalInputDelta=143.66750507598636
Fitness changed from -2579.2041408155346 to -2722.871645891521
Iteration 2 complete. Error: -2722.871645891521 Total: 14.6600; Orientation: 0.0881; Line Search: 9.2430
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/17d8ee35-d0a7-4f95-8fc6-b10102a7a93a.jpg)
Adding measurement 58958185 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-2722.871645891521;dx=-0.004104912677769263
New Minimum: -2722.871645891521 > -2904.5183765987776
END: th(50400.00000000001)=-2904.5183765987776; dx=-0.002559808119458913 evalInputDelta=181.64673070725667
Fitness changed from -2722.871645891521 to -2904.5183765987776
Iteration 3 complete. Error: -2904.5183765987776 Total: 14.9735; Orientation: 0.1029; Line Search: 9.1281
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/e06df690-d310-492a-8342-9637cb5faf51.jpg)
Adding measurement 4709ba4a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.252e+03, gradient 5.149e-02, dot -0.858; [73274583-a3de-4a6d-b255-2501b7aa5f0a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2904.5183765987776, -2722.871645891521, -2579.2041408155346, -2484.9005010261476
LBFGS Accumulation History: 3 points
Removed measurement 4709ba4a to history. Total: 3
th(0)=-2904.5183765987776;dx=-0.002649095188462021
New Minimum: -2904.5183765987776 > -3137.830620030342
END: th(108583.50837760697)=-3137.830620030342; dx=-0.0015009543805294934 evalInputDelta=233.31224343156418
Fitness changed from -2904.5183765987776 to -3137.830620030342
Iteration 4 complete. Error: -3137.830620030342 Total: 16.8051; Orientation: 1.7913; Line Search: 9.4162
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/e166298a-0a3b-4b2a-8955-39e72aad867b.jpg)
Adding measurement 544ed568 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.369e+04, gradient 4.999e-02, dot -0.715; [73274583-a3de-4a6d-b255-2501b7aa5f0a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3137.830620030342, -2722.871645891521, -2579.2041408155346, -2484.9005010261476
LBFGS Accumulation History: 3 points
Removed measurement 544ed568 to history. Total: 3
th(0)=-3137.830620030342;dx=-0.0024947022129210438
New Minimum: -3137.830620030342 > -3353.8580769018836
END: th(233936.07721408413)=-3353.8580769018836; dx=-2.5982592653889686E-4 evalInputDelta=216.02745687154174
Fitness changed from -3137.830620030342 to -3353.8580769018836
Iteration 5 complete. Error: -3353.8580769018836 Total: 16.1418; Orientation: 1.6713; Line Search: 8.9346
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/7ebd4c9d-4e5b-496e-b0a0-8ad665ef45c8.jpg)
Adding measurement eaf9b8f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.178e+04, gradient 6.597e-02, dot -0.405; [73274583-a3de-4a6d-b255-2501b7aa5f0a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3353.8580769018836, -2722.871645891521, -2579.2041408155346, -2484.9005010261476
LBFGS Accumulation History: 3 points
Removed measurement eaf9b8f to history. Total: 3
th(0)=-3353.8580769018836;dx=-0.004346252546624284
Armijo: th(504000.0000000002)=-2897.3405046697567; dx=0.0013766715505616914 evalInputDelta=-456.5175722321269
New Minimum: -3353.8580769018836 > -3360.9376667828874
WOLF (strong): th(252000.0000000001)=-3360.9376667828874; dx=0.0016309812192720468 evalInputDelta=7.0795898810038125
New Minimum: -3360.9376667828874 > -3563.229995383402
END: th(84000.00000000003)=-3563.229995383402; dx=-5.217254710357944E-4 evalInputDelta=209.3719184815186
Fitness changed from -3353.8580769018836 to -3563.229995383402
Iteration 6 complete. Error: -3563.229995383402 Total: 25.3569; Orientation: 1.6584; Line Search: 18.2454
Adding measurement 1bc45b40 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.077e+04, gradient 5.003e-02, dot -0.535; [73274583-a3de-4a6d-b255-2501b7aa5f0a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3563.229995383402, -2722.871645891521, -2579.2041408155346, -2484.9005010261476
LBFGS Accumulation History: 3 points
Removed measurement 1bc45b40 to history. Total: 3
th(0)=-3563.229995383402;dx=-0.002502737921528145
New Minimum: -3563.229995383402 > -3688.294999047663
WOLF (strong): th(180972.5139626783)=-3688.294999047663; dx=3.95721016633808E-4 evalInputDelta=125.06500366426098
New Minimum: -3688.294999047663 > -3696.6893296570106
END: th(90486.25698133915)=-3696.6893296570106; dx=-5.466907013612624E-4 evalInputDelta=133.45933427360842
Fitness changed from -3563.229995383402 to -3696.6893296570106
Iteration 7 complete. Error: -3696.6893296570106 Total: 21.0200; Orientation: 1.6584; Line Search: 14.7082
Adding measurement 4776d8ed to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.635e+04, gradient 4.636e-02, dot -0.589; [73274583-a3de-4a6d-b255-2501b7aa5f0a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3696.6893296570106, -2722.871645891521, -2579.2041408155346, -2484.9005010261476
LBFGS Accumulation History: 3 points
Removed measurement 4776d8ed to history. Total: 3
th(0)=-3696.6893296570106;dx=-0.002146096489888699
New Minimum: -3696.6893296570106 > -3782.994581016473
WOLF (strong): th(194946.7310117368)=-3782.994581016473; dx=3.6743046924226275E-4 evalInputDelta=86.30525135946255
New Minimum: -3782.994581016473 > -3803.512849984866
END: th(97473.3655058684)=-3803.512849984866; dx=-2.810790026047357E-4 evalInputDelta=106.82352032785548
Fitness changed from -3696.6893296570106 to -3803.512849984866
Iteration 8 complete. Error: -3803.512849984866 Total: 19.9325; Orientation: 1.6930; Line Search: 13.6920
Adding measurement 269e3118 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.010e+04, gradient 4.792e-02, dot -0.551; [73274583-a3de-4a6d-b255-2501b7aa5f0a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3803.512849984866, -2722.871645891521, -2579.2041408155346, -2484.9005010261476
LBFGS Accumulation History: 3 points
Removed measurement 269e3118 to history. Total: 3
th(0)=-3803.512849984866;dx=-0.002294260086350877
New Minimum: -3803.512849984866 > -3832.457697092037
WOLF (strong): th(210000.0000000001)=-3832.457697092037; dx=7.073101342007666E-4 evalInputDelta=28.944847107170972
New Minimum: -3832.457697092037 > -3897.7506333781794
WOLF (strong): th(105000.00000000004)=-3897.7506333781794; dx=9.626944197144117E-5 evalInputDelta=94.2377833933133
END: th(35000.000000000015)=-3868.0833755233352; dx=-0.0012268832160297327 evalInputDelta=64.57052553846916
Fitness changed from -3803.512849984866 to -3897.7506333781794
Iteration 9 complete. Error: -3897.7506333781794 Total: 24.4398; Orientation: 1.6087; Line Search: 18.2811
Adding measurement 604f3896 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.165e+04, gradient 5.123e-02, dot -0.502; [73274583-a3de-4a6d-b255-2501b7aa5f0a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3897.7506333781794, -2722.871645891521, -2579.2041408155346, -2484.9005010261476
LBFGS Accumulation History: 3 points
Removed measurement 604f3896 to history. Total: 3
th(0)=-3897.7506333781794;dx=-0.002624364146645965
New Minimum: -3897.7506333781794 > -3999.457088155841
END: th(75405.21415111597)=-3999.457088155841; dx=-1.8363850291168218E-4 evalInputDelta=101.70645477766175
Fitness changed from -3897.7506333781794 to -3999.457088155841
Iteration 10 complete. Error: -3999.457088155841 Total: 15.2116; Orientation: 1.6264; Line Search: 9.0863
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/27bf3cd1-1517-4799-a2fb-22e889b8a714.jpg)
Final threshold in iteration 11: -3999.457088155841 (> -Infinity) after 221.149s (< 5400.000s)
Returns
-3999.457088155841