BasicOptimizer.scala:89 executed in 204.50 seconds (2.193 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: 17075767467142
Reset training subject: 17080057353822
Adding measurement 6d206f73 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.4714827239513397;dx=-7.569893421511812E-7
New Minimum: -0.4714827239513397 > -0.4714832603931427
END: th(2.154434690031884)=-0.4714832603931427; dx=-6.572719840655112E-7 evalInputDelta=5.364418029785156E-7
Fitness changed from -0.4714827239513397 to -0.4714832603931427
Iteration 1 complete. Error: -0.4714832603931427 Total: 21.7393; Orientation: 0.0460; Line Search: 8.7530
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/cb623d32-2d8a-4122-a69a-7c90f8821fc4.jpg)
Adding measurement 72d2aad3 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.4714832603931427;dx=-6.572490169976491E-7
New Minimum: -0.4714832603931427 > -0.4714850038290024
WOLFE (weak): th(4.641588833612779)=-0.4714850038290024; dx=-6.572353603252679E-7 evalInputDelta=1.7434358596801758E-6
New Minimum: -0.4714850038290024 > -0.47148649394512177
WOLFE (weak): th(9.283177667225559)=-0.47148649394512177; dx=-6.572376425821952E-7 evalInputDelta=3.2335519790649414E-6
New Minimum: -0.47148649394512177 > -0.47149257361888885
WOLFE (weak): th(27.849533001676676)=-0.47149257361888885; dx=-6.572361960836117E-7 evalInputDelta=9.313225746154785E-6
New Minimum: -0.47149257361888885 > -0.4715200662612915
WOLFE (weak): th(111.3981320067067)=-0.4715200662612915; dx=-6.572346302608341E-7 evalInputDelta=3.680586814880371E-5
New Minimum: -0.4715200662612915 > -0.47166644036769867
WOLFE (weak): th(556.9906600335335)=-0.47166644036769867; dx=-6.5712368150589E-7 evalInputDelta=1.8317997455596924E-4
New Minimum: -0.47166644036769867 > -0.4725808948278427
WOLFE (weak): th(3341.9439602012008)=-0.4725808948278427; dx=-6.564101655768863E-7 evalInputDelta=0.0010976344347000122
New Minimum: -0.4725808948278427 > -0.4791402816772461
WOLFE (weak): th(23393.607721408407)=-0.4791402816772461; dx=-6.520529796302145E-7 evalInputDelta=0.0076570212841033936
New Minimum: -0.4791402816772461 > -0.5309033989906311
WOLFE (weak): th(187148.86177126726)=-0.5309033989906311; dx=-6.116910829451776E-7 evalInputDelta=0.0594201385974884
New Minimum: -0.5309033989906311 > -0.8522076159715652
END: th(1684339.7559414054)=-0.8522076159715652; dx=-2.793939318859226E-7 evalInputDelta=0.38072435557842255
Fitness changed from -0.4714832603931427 to -0.8522076159715652
Iteration 2 complete. Error: -0.8522076159715652 Total: 46.6682; Orientation: 0.0478; Line Search: 42.3133
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/a899ad23-d854-41bc-b37c-1ad0ac5e48a3.jpg)
Adding measurement 2dc463ed to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.8522076159715652;dx=-2.839331252584512E-7
New Minimum: -0.8522076159715652 > -1.18263640999794
END: th(3628800.0000000005)=-1.18263640999794; dx=-1.1149161398268909E-7 evalInputDelta=0.3304287940263748
Fitness changed from -0.8522076159715652 to -1.18263640999794
Iteration 3 complete. Error: -1.18263640999794 Total: 12.3044; Orientation: 0.0450; Line Search: 8.2329
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/bd84e0a7-fb9a-421e-ad27-050fc872cd09.jpg)
Adding measurement 7aecf598 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.750e+03, gradient 3.983e-04, dot -0.571; [7048d43f-5601-418d-96f1-0b323f99ca13 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.18263640999794, -0.8522076159715652, -0.4714832603931427, -0.4714827239513397
LBFGS Accumulation History: 3 points
Removed measurement 7aecf598 to history. Total: 3
th(0)=-1.18263640999794;dx=-1.5862011332438465E-7
New Minimum: -1.18263640999794 > -1.472285971045494
END: th(7818012.603187701)=-1.472285971045494; dx=-2.6159178880312468E-8 evalInputDelta=0.289649561047554
Fitness changed from -1.18263640999794 to -1.472285971045494
Iteration 4 complete. Error: -1.472285971045494 Total: 14.7481; Orientation: 1.1023; Line Search: 8.8934
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/5de6eefc-2673-4080-b84c-05f3b3cd809e.jpg)
Adding measurement fc441fd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.514e+03, gradient 3.640e-04, dot -0.341; [7048d43f-5601-418d-96f1-0b323f99ca13 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.472285971045494, -0.8522076159715652, -0.4714832603931427, -0.4714827239513397
LBFGS Accumulation History: 3 points
Removed measurement fc441fd to history. Total: 3
th(0)=-1.472285971045494;dx=-1.3251777506800984E-7
New Minimum: -1.472285971045494 > -1.5838365778326988
WOLF (strong): th(1.6843397559414055E7)=-1.5838365778326988; dx=2.4038117750687867E-8 evalInputDelta=0.11155060678720474
New Minimum: -1.5838365778326988 > -1.661380797624588
WOLF (strong): th(8421698.779707028)=-1.661380797624588; dx=6.7077998099432266E-9 evalInputDelta=0.18909482657909393
END: th(2807232.926569009)=-1.6031063795089722; dx=-5.784298567878356E-8 evalInputDelta=0.1308204084634781
Fitness changed from -1.472285971045494 to -1.661380797624588
Iteration 5 complete. Error: -1.661380797624588 Total: 22.7844; Orientation: 1.0496; Line Search: 17.7395
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/4cf343db-792d-4216-965f-7c03a8589c90.jpg)
Adding measurement 33042977 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.671e+03, gradient 3.126e-04, dot -0.294; [7048d43f-5601-418d-96f1-0b323f99ca13 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.661380797624588, -0.8522076159715652, -0.4714832603931427, -0.4714827239513397
LBFGS Accumulation History: 3 points
Removed measurement 33042977 to history. Total: 3
th(0)=-1.661380797624588;dx=-9.772383854908916E-8
New Minimum: -1.661380797624588 > -1.814066804945469
END: th(6048000.000000001)=-1.814066804945469; dx=-1.771460036265109E-8 evalInputDelta=0.1526860073208809
Fitness changed from -1.661380797624588 to -1.814066804945469
Iteration 6 complete. Error: -1.814066804945469 Total: 13.4108; Orientation: 1.0281; Line Search: 8.1535
Adding measurement 59551753 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.152e+03, gradient 2.065e-04, dot -0.488; [7048d43f-5601-418d-96f1-0b323f99ca13 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.814066804945469, -0.8522076159715652, -0.4714832603931427, -0.4714827239513397
LBFGS Accumulation History: 3 points
Removed measurement 59551753 to history. Total: 3
th(0)=-1.814066804945469;dx=-4.264798938904904E-8
New Minimum: -1.814066804945469 > -1.939765214920044
END: th(1.3030021005312836E7)=-1.939765214920044; dx=-4.770686725348966E-10 evalInputDelta=0.12569840997457504
Fitness changed from -1.814066804945469 to -1.939765214920044
Iteration 7 complete. Error: -1.939765214920044 Total: 13.3709; Orientation: 1.0152; Line Search: 8.0344
Adding measurement 387af356 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.898e+03, gradient 2.460e-04, dot -0.282; [7048d43f-5601-418d-96f1-0b323f99ca13 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.939765214920044, -0.8522076159715652, -0.4714832603931427, -0.4714827239513397
LBFGS Accumulation History: 3 points
Removed measurement 387af356 to history. Total: 3
th(0)=-1.939765214920044;dx=-6.050896949958085E-8
Armijo: th(2.8072329265690096E7)=-1.8300133273005486; dx=2.4782589700954918E-8 evalInputDelta=-0.10975188761949539
New Minimum: -1.939765214920044 > -1.9873488321900368
WOLF (strong): th(1.4036164632845048E7)=-1.9873488321900368; dx=1.825139081647737E-8 evalInputDelta=0.04758361726999283
New Minimum: -1.9873488321900368 > -2.018900342285633
END: th(4678721.544281683)=-2.018900342285633; dx=-1.2466720669476392E-8 evalInputDelta=0.07913512736558914
Fitness changed from -1.939765214920044 to -2.018900342285633
Iteration 8 complete. Error: -2.018900342285633 Total: 22.1923; Orientation: 1.0440; Line Search: 17.1384
Adding measurement 6fcc1748 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.298e+03, gradient 1.522e-04, dot -0.513; [7048d43f-5601-418d-96f1-0b323f99ca13 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.018900342285633, -0.8522076159715652, -0.4714832603931427, -0.4714827239513397
LBFGS Accumulation History: 3 points
Removed measurement 6fcc1748 to history. Total: 3
th(0)=-2.018900342285633;dx=-2.3159848027483355E-8
New Minimum: -2.018900342285633 > -2.0888793244957924
END: th(1.0080000000000004E7)=-2.0888793244957924; dx=-5.600351651396555E-9 evalInputDelta=0.0699789822101593
Fitness changed from -2.018900342285633 to -2.0888793244957924
Iteration 9 complete. Error: -2.0888793244957924 Total: 14.0699; Orientation: 1.0294; Line Search: 8.4876
Adding measurement 379a8ff2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.259e+03, gradient 1.719e-04, dot -0.392; [7048d43f-5601-418d-96f1-0b323f99ca13 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.0888793244957924, -0.8522076159715652, -0.4714832603931427, -0.4714827239513397
LBFGS Accumulation History: 3 points
Removed measurement 379a8ff2 to history. Total: 3
th(0)=-2.0888793244957924;dx=-2.9539772984192872E-8
New Minimum: -2.0888793244957924 > -2.095774084329605
WOLF (strong): th(2.1716701675521396E7)=-2.095774084329605; dx=8.063475596689845E-9 evalInputDelta=0.006894759833812714
New Minimum: -2.095774084329605 > -2.1302141696214676
WOLF (strong): th(1.0858350837760698E7)=-2.1302141696214676; dx=3.61434560644101E-9 evalInputDelta=0.0413348451256752
END: th(3619450.279253566)=-2.124291315674782; dx=-1.0702885099771658E-8 evalInputDelta=0.03541199117898941
Fitness changed from -2.0888793244957924 to -2.1302141696214676
Iteration 10 complete. Error: -2.1302141696214676 Total: 23.1415; Orientation: 1.0072; Line Search: 18.0510
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/c23fc1d1-2fb2-436e-9266-1369bbeb2744.jpg)
Final threshold in iteration 11: -2.1302141696214676 (> -Infinity) after 204.500s (< 5400.000s)
Returns
-2.1302141696214676