BasicOptimizer.scala:89 executed in 150.23 seconds (2.611 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: 460417046041000
Reset training subject: 460419896527700
Adding measurement a0ef9ab to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-107.87003722421757;dx=-1.4443305827745541E-5
New Minimum: -107.87003722421757 > -107.87006813093332
END: th(2.154434690031884)=-107.87006813093332; dx=-1.2356315721239908E-5 evalInputDelta=3.090671575023407E-5
Fitness changed from -107.87003722421757 to -107.87006813093332
Iteration 1 complete. Error: -107.87006813093332 Total: 13.8708; Orientation: 0.1011; Line Search: 5.7010
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/0e7f0f30-8f80-4114-9e11-bc04a8222595.jpg)
Adding measurement 7b555fa4 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-107.87006813093332;dx=-1.2420567170594047E-5
New Minimum: -107.87006813093332 > -107.87012994433825
WOLFE (weak): th(4.641588833612779)=-107.87012994433825; dx=-1.2385481672667334E-5 evalInputDelta=6.181340492616982E-5
New Minimum: -107.87012994433825 > -107.87019175770776
WOLFE (weak): th(9.283177667225559)=-107.87019175770776; dx=-1.2403200933313146E-5 evalInputDelta=1.236267744388897E-4
New Minimum: -107.87019175770776 > -107.87042870862939
WOLFE (weak): th(27.849533001676676)=-107.87042870862939; dx=-1.2370067130435618E-5 evalInputDelta=3.605776960711182E-4
New Minimum: -107.87042870862939 > -107.87152073658476
WOLFE (weak): th(111.3981320067067)=-107.87152073658476; dx=-1.2390332862610517E-5 evalInputDelta=0.0014526056514370111
New Minimum: -107.87152073658476 > -107.87731036050313
WOLFE (weak): th(556.9906600335335)=-107.87731036050313; dx=-1.2389185001894588E-5 evalInputDelta=0.007242229569811798
New Minimum: -107.87731036050313 > -107.91352966494044
WOLFE (weak): th(3341.9439602012008)=-107.91352966494044; dx=-1.2382527610095368E-5 evalInputDelta=0.04346153400712183
New Minimum: -107.91352966494044 > -108.17377293685892
WOLFE (weak): th(23393.607721408407)=-108.17377293685892; dx=-1.2337974470371041E-5 evalInputDelta=0.3037048059256051
New Minimum: -108.17377293685892 > -110.25956973315239
WOLFE (weak): th(187148.86177126726)=-110.25956973315239; dx=-1.1891315047205985E-5 evalInputDelta=2.3895016022190703
New Minimum: -110.25956973315239 > -125.78812489541637
END: th(1684339.7559414054)=-125.78812489541637; dx=-7.898197997089144E-6 evalInputDelta=17.918056764483055
Fitness changed from -107.87006813093332 to -125.78812489541637
Iteration 2 complete. Error: -125.78812489541637 Total: 32.3681; Orientation: 0.1013; Line Search: 28.8737
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/ecc2df51-343f-48f7-9344-d293d04a99fa.jpg)
Adding measurement 411b7784 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-125.78812489541637;dx=-7.90702138121785E-6
New Minimum: -125.78812489541637 > -146.12068974304523
END: th(3628800.0000000005)=-146.12068974304523; dx=-3.474560668947379E-6 evalInputDelta=20.33256484762886
Fitness changed from -125.78812489541637 to -146.12068974304523
Iteration 3 complete. Error: -146.12068974304523 Total: 9.2024; Orientation: 0.1019; Line Search: 5.7112
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/0afa4220-4c79-4b02-8baf-0a13cd3b0c1c.jpg)
Adding measurement 7ed13e48 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.006e+04, gradient 2.260e-03, dot -0.544; [d97d767f-ebd2-4c5f-9470-11d91a932df0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -146.12068974304523, -125.78812489541637, -107.87006813093332, -107.87003722421757
LBFGS Accumulation History: 3 points
Removed measurement 7ed13e48 to history. Total: 3
th(0)=-146.12068974304523;dx=-5.079688712339192E-6
New Minimum: -146.12068974304523 > -164.97106068281207
END: th(7818012.603187701)=-164.97106068281207; dx=-7.869312767154703E-7 evalInputDelta=18.850370939766833
Fitness changed from -146.12068974304523 to -164.97106068281207
Iteration 4 complete. Error: -164.97106068281207 Total: 11.1652; Orientation: 1.9314; Line Search: 5.8362
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/83443f7f-dcba-46a3-8044-ba8a1f5cb39f.jpg)
Adding measurement 3df4783 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.037e+04, gradient 2.480e-03, dot -0.288; [d97d767f-ebd2-4c5f-9470-11d91a932df0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -164.97106068281207, -125.78812489541637, -107.87006813093332, -107.87003722421757
LBFGS Accumulation History: 3 points
Removed measurement 3df4783 to history. Total: 3
th(0)=-164.97106068281207;dx=-6.124360099408948E-6
Armijo: th(1.6843397559414055E7)=-158.8178975806966; dx=1.8400431162122123E-6 evalInputDelta=-6.153163102115457
New Minimum: -164.97106068281207 > -176.05067138884937
WOLF (strong): th(8421698.779707028)=-176.05067138884937; dx=1.2921872233654035E-6 evalInputDelta=11.0796107060373
New Minimum: -176.05067138884937 > -177.07259368762718
END: th(2807232.926569009)=-177.07259368762718; dx=-2.231029649089427E-6 evalInputDelta=12.10153300481511
Fitness changed from -164.97106068281207 to -177.07259368762718
Iteration 5 complete. Error: -177.07259368762718 Total: 16.6545; Orientation: 1.7815; Line Search: 11.3921
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/bd721f5d-bd6f-42c2-9ed3-557090cca640.jpg)
Adding measurement 6241df18 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.899e+04, gradient 1.765e-03, dot -0.550; [d97d767f-ebd2-4c5f-9470-11d91a932df0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -177.07259368762718, -125.78812489541637, -107.87006813093332, -107.87003722421757
LBFGS Accumulation History: 3 points
Removed measurement 6241df18 to history. Total: 3
th(0)=-177.07259368762718;dx=-3.1163414258699993E-6
New Minimum: -177.07259368762718 > -188.36130245077757
END: th(6048000.000000001)=-188.36130245077757; dx=-9.829075736908195E-7 evalInputDelta=11.288708763150396
Fitness changed from -177.07259368762718 to -188.36130245077757
Iteration 6 complete. Error: -188.36130245077757 Total: 11.1159; Orientation: 1.7875; Line Search: 5.7877
Adding measurement 2ac8030b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.315e+04, gradient 1.936e-03, dot -0.456; [d97d767f-ebd2-4c5f-9470-11d91a932df0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -188.36130245077757, -125.78812489541637, -107.87006813093332, -107.87003722421757
LBFGS Accumulation History: 3 points
Removed measurement 2ac8030b to history. Total: 3
th(0)=-188.36130245077757;dx=-3.732182954963817E-6
New Minimum: -188.36130245077757 > -190.79852624754267
WOLF (strong): th(1.3030021005312836E7)=-190.79852624754267; dx=9.59016984778942E-7 evalInputDelta=2.437223796765096
New Minimum: -190.79852624754267 > -196.51509969950234
WOLF (strong): th(6515010.502656418)=-196.51509969950234; dx=2.1709621549801327E-7 evalInputDelta=8.153797248724771
END: th(2171670.167552139)=-194.46737954837735; dx=-1.7781480645955673E-6 evalInputDelta=6.10607709759978
Fitness changed from -188.36130245077757 to -196.51509969950234
Iteration 7 complete. Error: -196.51509969950234 Total: 15.3714; Orientation: 1.6880; Line Search: 10.9395
Adding measurement 79f0a322 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.455e+04, gradient 2.163e-03, dot -0.354; [d97d767f-ebd2-4c5f-9470-11d91a932df0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -196.51509969950234, -125.78812489541637, -107.87006813093332, -107.87003722421757
LBFGS Accumulation History: 3 points
Removed measurement 79f0a322 to history. Total: 3
th(0)=-196.51509969950234;dx=-4.676541855227234E-6
New Minimum: -196.51509969950234 > -207.1710364898525
WOLF (strong): th(4678721.544281682)=-207.1710364898525; dx=2.6255398822469416E-8 evalInputDelta=10.655936790350154
END: th(2339360.772140841)=-204.89906734803932; dx=-2.2050878025179736E-6 evalInputDelta=8.38396764853698
Fitness changed from -196.51509969950234 to -207.1710364898525
Iteration 8 complete. Error: -207.1710364898525 Total: 13.8121; Orientation: 1.8193; Line Search: 8.9172
Adding measurement 4064e8e8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.176e+04, gradient 1.754e-03, dot -0.465; [d97d767f-ebd2-4c5f-9470-11d91a932df0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -207.1710364898525, -125.78812489541637, -107.87006813093332, -107.87003722421757
LBFGS Accumulation History: 3 points
Removed measurement 4064e8e8 to history. Total: 3
th(0)=-207.1710364898525;dx=-3.073238073762067E-6
New Minimum: -207.1710364898525 > -214.46863728123967
END: th(5040000.000000001)=-214.46863728123967; dx=-1.5097256499641183E-7 evalInputDelta=7.297600791387168
Fitness changed from -207.1710364898525 to -214.46863728123967
Iteration 9 complete. Error: -214.46863728123967 Total: 10.2537; Orientation: 1.8506; Line Search: 5.7347
Adding measurement 1e21bac7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.518e+04, gradient 1.719e-03, dot -0.459; [d97d767f-ebd2-4c5f-9470-11d91a932df0 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -214.46863728123967, -125.78812489541637, -107.87006813093332, -107.87003722421757
LBFGS Accumulation History: 3 points
Removed measurement 1e21bac7 to history. Total: 3
th(0)=-214.46863728123967;dx=-2.9197547325812265E-6
New Minimum: -214.46863728123967 > -216.3024618791898
WOLF (strong): th(1.0858350837760696E7)=-216.3024618791898; dx=1.041936379143514E-6 evalInputDelta=1.8338245979501266
New Minimum: -216.3024618791898 > -221.04767222317733
WOLF (strong): th(5429175.418880348)=-221.04767222317733; dx=1.3638028658498926E-7 evalInputDelta=6.579034941937664
END: th(1809725.1396267826)=-218.7987414104848; dx=-1.7185942252274454E-6 evalInputDelta=4.330104129245143
Fitness changed from -214.46863728123967 to -221.04767222317733
Iteration 10 complete. Error: -221.04767222317733 Total: 15.8256; Orientation: 1.6829; Line Search: 11.4425
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/625bc15d-4100-4b23-a0b2-8d1b67b9e203.jpg)
Final threshold in iteration 11: -221.04767222317733 (> -Infinity) after 150.232s (< 5400.000s)
Returns
-221.04767222317733