BasicOptimizer.scala:89 executed in 223.81 seconds (2.607 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: 1001931015094
Reset training subject: 1007176391148
Adding measurement 1a2d749b to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-14.588541984558105;dx=-2.0719457803223435E-6
New Minimum: -14.588541984558105 > -14.58854666352272
WOLFE (weak): th(2.154434690031884)=-14.58854666352272; dx=-1.867559408102679E-6 evalInputDelta=4.678964614868164E-6
New Minimum: -14.58854666352272 > -14.588550746440887
WOLFE (weak): th(4.308869380063768)=-14.588550746440887; dx=-1.868539267614436E-6 evalInputDelta=8.761882781982422E-6
New Minimum: -14.588550746440887 > -14.588570654392242
WOLFE (weak): th(12.926608140191302)=-14.588570654392242; dx=-1.8685725260957396E-6 evalInputDelta=2.866983413696289E-5
New Minimum: -14.588570654392242 > -14.588657230138779
WOLFE (weak): th(51.70643256076521)=-14.588657230138779; dx=-1.868627280428589E-6 evalInputDelta=1.1524558067321777E-4
New Minimum: -14.588657230138779 > -14.589120626449585
WOLFE (weak): th(258.53216280382605)=-14.589120626449585; dx=-1.8675783414563469E-6 evalInputDelta=5.786418914794922E-4
New Minimum: -14.589120626449585 > -14.592012286186218
WOLFE (weak): th(1551.1929768229563)=-14.592012286186218; dx=-1.8652193183011206E-6 evalInputDelta=0.003470301628112793
New Minimum: -14.592012286186218 > -14.612720787525177
END: th(10858.350837760694)=-14.612720787525177; dx=-1.8466396216077202E-6 evalInputDelta=0.024178802967071533
Fitness changed from -14.588541984558105 to -14.612720787525177
Iteration 1 complete. Error: -14.612720787525177 Total: 55.1764; Orientation: 0.0258; Line Search: 39.9145
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/04296491-b141-476a-b5b2-dc1ab2c49fc9.jpg)
Adding measurement 74a33400 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-14.612720787525177;dx=-1.8223311804734748E-6
New Minimum: -14.612720787525177 > -14.663087517023087
WOLFE (weak): th(23393.607721408407)=-14.663087517023087; dx=-1.7776213234996297E-6 evalInputDelta=0.050366729497909546
New Minimum: -14.663087517023087 > -14.71212187409401
WOLFE (weak): th(46787.215442816814)=-14.71212187409401; dx=-1.7283013269311524E-6 evalInputDelta=0.0994010865688324
New Minimum: -14.71212187409401 > -14.893766283988953
END: th(140361.64632845044)=-14.893766283988953; dx=-1.5195577347022537E-6 evalInputDelta=0.28104549646377563
Fitness changed from -14.612720787525177 to -14.893766283988953
Iteration 2 complete. Error: -14.893766283988953 Total: 25.7394; Orientation: 0.0265; Line Search: 20.3215
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/e5e8806f-8aaa-49f3-8af2-b3b5cf67c46a.jpg)
Adding measurement 5cf27279 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-14.893766283988953;dx=-1.3851466316846202E-6
New Minimum: -14.893766283988953 > -15.322050541639328
END: th(302400.00000000006)=-15.322050541639328; dx=-9.98654405493636E-7 evalInputDelta=0.42828425765037537
Fitness changed from -14.893766283988953 to -15.322050541639328
Iteration 3 complete. Error: -15.322050541639328 Total: 15.3680; Orientation: 0.0285; Line Search: 9.8542
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/0f47d670-4695-49f7-9564-27d11a4dae5d.jpg)
Adding measurement 46d15a8a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.722e+02, gradient 9.595e-04, dot -0.866; [5ee8118f-fa1c-4d70-8d16-cbcb62254ad4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -15.322050541639328, -14.893766283988953, -14.612720787525177, -14.588541984558105
LBFGS Accumulation History: 3 points
Removed measurement 46d15a8a to history. Total: 3
th(0)=-15.322050541639328;dx=-9.192145974835679E-7
New Minimum: -15.322050541639328 > -15.88296166062355
END: th(651501.0502656418)=-15.88296166062355; dx=-5.800786901014619E-7 evalInputDelta=0.5609111189842224
Fitness changed from -15.322050541639328 to -15.88296166062355
Iteration 4 complete. Error: -15.88296166062355 Total: 15.5052; Orientation: 0.6104; Line Search: 9.5415
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/9e2f91ae-b6cd-412c-b8fe-4e54d10294b5.jpg)
Adding measurement 3c30971 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.262e+02, gradient 7.957e-04, dot -0.754; [5ee8118f-fa1c-4d70-8d16-cbcb62254ad4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -15.88296166062355, -14.893766283988953, -14.612720787525177, -14.588541984558105
LBFGS Accumulation History: 3 points
Removed measurement 3c30971 to history. Total: 3
th(0)=-15.88296166062355;dx=-6.324347581612147E-7
New Minimum: -15.88296166062355 > -16.55445745587349
END: th(1403616.4632845046)=-16.55445745587349; dx=-2.874911504120025E-7 evalInputDelta=0.671495795249939
Fitness changed from -15.88296166062355 to -16.55445745587349
Iteration 5 complete. Error: -16.55445745587349 Total: 16.2338; Orientation: 0.6053; Line Search: 9.9481
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/c952ea85-26be-4963-b97b-c667e8c1c567.jpg)
Adding measurement 353a8b70 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.636e+02, gradient 7.721e-04, dot -0.558; [5ee8118f-fa1c-4d70-8d16-cbcb62254ad4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -16.55445745587349, -14.893766283988953, -14.612720787525177, -14.588541984558105
LBFGS Accumulation History: 3 points
Removed measurement 353a8b70 to history. Total: 3
th(0)=-16.55445745587349;dx=-5.953715204604794E-7
New Minimum: -16.55445745587349 > -16.994228303432465
END: th(3024000.0000000005)=-16.994228303432465; dx=-4.374652198382557E-9 evalInputDelta=0.4397708475589752
Fitness changed from -16.55445745587349 to -16.994228303432465
Iteration 6 complete. Error: -16.994228303432465 Total: 16.1408; Orientation: 0.6028; Line Search: 10.2133
Adding measurement 424a800 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.933e+02, gradient 1.039e-03, dot -0.194; [5ee8118f-fa1c-4d70-8d16-cbcb62254ad4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -16.994228303432465, -14.893766283988953, -14.612720787525177, -14.588541984558105
LBFGS Accumulation History: 3 points
Removed measurement 424a800 to history. Total: 3
th(0)=-16.994228303432465;dx=-1.0779662960361554E-6
Armijo: th(6515010.502656418)=-15.318368554115295; dx=2.875813854383208E-7 evalInputDelta=-1.6758597493171692
Armijo: th(3257505.251328209)=-16.70029765367508; dx=3.636576152134177E-7 evalInputDelta=-0.29393064975738525
New Minimum: -16.994228303432465 > -17.563519805669785
WOLF (strong): th(1085835.0837760696)=-17.563519805669785; dx=1.0123545796442269E-8 evalInputDelta=0.56929150223732
END: th(271458.7709440174)=-17.288096964359283; dx=-7.01842611211749E-7 evalInputDelta=0.29386866092681885
Fitness changed from -16.994228303432465 to -17.563519805669785
Iteration 7 complete. Error: -17.563519805669785 Total: 30.9305; Orientation: 0.6198; Line Search: 24.7132
Adding measurement 6ed1e5ca to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.363e+03, gradient 7.197e-04, dot -0.339; [5ee8118f-fa1c-4d70-8d16-cbcb62254ad4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -17.563519805669785, -14.893766283988953, -14.612720787525177, -14.588541984558105
LBFGS Accumulation History: 3 points
Removed measurement 6ed1e5ca to history. Total: 3
th(0)=-17.563519805669785;dx=-5.175369260146406E-7
New Minimum: -17.563519805669785 > -17.833367437124252
END: th(584840.1930352102)=-17.833367437124252; dx=-2.676408260105206E-7 evalInputDelta=0.2698476314544678
Fitness changed from -17.563519805669785 to -17.833367437124252
Iteration 8 complete. Error: -17.833367437124252 Total: 15.9770; Orientation: 0.6059; Line Search: 10.1646
Adding measurement 66b9b350 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.732e+03, gradient 5.070e-04, dot -0.548; [5ee8118f-fa1c-4d70-8d16-cbcb62254ad4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -17.833367437124252, -14.893766283988953, -14.612720787525177, -14.588541984558105
LBFGS Accumulation History: 3 points
Removed measurement 66b9b350 to history. Total: 3
th(0)=-17.833367437124252;dx=-2.5674836222970735E-7
New Minimum: -17.833367437124252 > -18.13614821434021
END: th(1260000.0000000002)=-18.13614821434021; dx=-1.548312317616904E-7 evalInputDelta=0.30278077721595764
Fitness changed from -17.833367437124252 to -18.13614821434021
Iteration 9 complete. Error: -18.13614821434021 Total: 16.5412; Orientation: 0.5974; Line Search: 10.8508
Adding measurement 27c9b0d2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.985e+03, gradient 4.611e-04, dot -0.606; [5ee8118f-fa1c-4d70-8d16-cbcb62254ad4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -18.13614821434021, -14.893766283988953, -14.612720787525177, -14.588541984558105
LBFGS Accumulation History: 3 points
Removed measurement 27c9b0d2 to history. Total: 3
th(0)=-18.13614821434021;dx=-2.121103691584768E-7
New Minimum: -18.13614821434021 > -18.503153026103973
END: th(2714587.709440174)=-18.503153026103973; dx=-7.083273427989457E-8 evalInputDelta=0.3670048117637634
Fitness changed from -18.13614821434021 to -18.503153026103973
Iteration 10 complete. Error: -18.503153026103973 Total: 15.9380; Orientation: 0.9155; Line Search: 9.8957
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/a9e9a036-18e3-4d18-ad8c-7eee39078655.jpg)
Final threshold in iteration 11: -18.503153026103973 (> -Infinity) after 223.806s (< 5400.000s)
Returns
-18.503153026103973