BasicOptimizer.scala:89 executed in 86.53 seconds (0.973 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: 306117892313100
Reset training subject: 306119617048400
Adding measurement 33cf3269 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-156.01473682775338;dx=-2.9331328625346964E-5
New Minimum: -156.01473682775338 > -156.01478300004248
END: th(2.154434690031884)=-156.01478300004248; dx=-1.8633178792925756E-5 evalInputDelta=4.617228910319682E-5
Fitness changed from -156.01473682775338 to -156.01478300004248
Iteration 1 complete. Error: -156.01478300004248 Total: 8.3784; Orientation: 0.0657; Line Search: 3.2569
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/7f6a1fd6-a084-45cc-b815-6a17c0664f5e.jpg)
Adding measurement 29eabb7e to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-156.01478300004248;dx=-1.8465628649840074E-5
New Minimum: -156.01478300004248 > -156.01486874854314
WOLFE (weak): th(4.641588833612779)=-156.01486874854314; dx=-1.8459411894443446E-5 evalInputDelta=8.574850065201645E-5
New Minimum: -156.01486874854314 > -156.0149742850946
WOLFE (weak): th(9.283177667225559)=-156.0149742850946; dx=-1.8438598525786704E-5 evalInputDelta=1.9128505212506752E-4
New Minimum: -156.0149742850946 > -156.01535025847912
WOLFE (weak): th(27.849533001676676)=-156.01535025847912; dx=-1.84354795905214E-5 evalInputDelta=5.672584366323008E-4
New Minimum: -156.01535025847912 > -156.0170652133023
WOLFE (weak): th(111.3981320067067)=-156.0170652133023; dx=-1.842181140235046E-5 evalInputDelta=0.0022822132598037115
New Minimum: -156.0170652133023 > -156.02618054140305
WOLFE (weak): th(556.9906600335335)=-156.02618054140305; dx=-1.8418734102990418E-5 evalInputDelta=0.01139754136056581
New Minimum: -156.02618054140305 > -156.08320191614624
WOLFE (weak): th(3341.9439602012008)=-156.08320191614624; dx=-1.839831873183824E-5 evalInputDelta=0.06841891610375228
New Minimum: -156.08320191614624 > -156.49300833442388
WOLFE (weak): th(23393.607721408407)=-156.49300833442388; dx=-1.8351574580955566E-5 evalInputDelta=0.47822533438139203
New Minimum: -156.49300833442388 > -159.78560310922683
WOLFE (weak): th(187148.86177126726)=-159.78560310922683; dx=-1.781529382117537E-5 evalInputDelta=3.770820109184342
New Minimum: -159.78560310922683 > -183.83319365038932
END: th(1684339.7559414054)=-183.83319365038932; dx=-1.0835364450140369E-5 evalInputDelta=27.818410650346834
Fitness changed from -156.01478300004248 to -183.83319365038932
Iteration 2 complete. Error: -183.83319365038932 Total: 18.3876; Orientation: 0.0604; Line Search: 16.5348
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/7c39ef3c-e5a7-47a9-90e5-9f714ebdc038.jpg)
Adding measurement e031f87 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-183.83319365038932;dx=-1.261651157794616E-5
New Minimum: -183.83319365038932 > -215.53481260501206
END: th(3628800.0000000005)=-215.53481260501206; dx=-4.5140930128118E-6 evalInputDelta=31.701618954622745
Fitness changed from -183.83319365038932 to -215.53481260501206
Iteration 3 complete. Error: -215.53481260501206 Total: 5.1606; Orientation: 0.0622; Line Search: 3.2956
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/97b6e89e-eca6-4aba-a95e-1c1a276c62f9.jpg)
Adding measurement 3bb94aba to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.273e+04, gradient 3.097e-03, dot -0.419; [43838f94-ddd3-41ad-920f-600650dd4766 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -215.53481260501206, -183.83319365038932, -156.01478300004248, -156.01473682775338
LBFGS Accumulation History: 3 points
Removed measurement 3bb94aba to history. Total: 3
th(0)=-215.53481260501206;dx=-9.58068459355224E-6
New Minimum: -215.53481260501206 > -239.29184087653553
WOLF (strong): th(7818012.603187701)=-239.29184087653553; dx=2.8947789261516636E-7 evalInputDelta=23.757028271523467
END: th(3909006.3015938504)=-237.02080436963422; dx=-2.0831047095339446E-6 evalInputDelta=21.485991764622156
Fitness changed from -215.53481260501206 to -239.29184087653553
Iteration 4 complete. Error: -239.29184087653553 Total: 7.9417; Orientation: 1.0633; Line Search: 4.8297
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/ffc576d3-362c-42da-96cb-831796a55cfe.jpg)
Adding measurement 29fa36b1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.473e+03, gradient 3.834e-03, dot -0.152; [43838f94-ddd3-41ad-920f-600650dd4766 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -239.29184087653553, -183.83319365038932, -156.01478300004248, -156.01473682775338
LBFGS Accumulation History: 3 points
Removed measurement 29fa36b1 to history. Total: 3
th(0)=-239.29184087653553;dx=-1.4692136197741154E-5
New Minimum: -239.29184087653553 > -244.6637812869467
WOLF (strong): th(8421698.779707028)=-244.6637812869467; dx=5.213075397800469E-6 evalInputDelta=5.371940410411156
New Minimum: -244.6637812869467 > -266.03231611012774
WOLF (strong): th(4210849.389853514)=-266.03231611012774; dx=1.6090719329279545E-6 evalInputDelta=26.740475233592207
END: th(1403616.4632845046)=-257.47776304484876; dx=-8.657958983482436E-6 evalInputDelta=18.185922168313226
Fitness changed from -239.29184087653553 to -266.03231611012774
Iteration 5 complete. Error: -266.03231611012774 Total: 9.4578; Orientation: 1.0182; Line Search: 6.5337
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/17c4a404-e561-4c26-9579-84d5765a6e78.jpg)
Adding measurement 6b9e2863 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.593e+04, gradient 3.110e-03, dot -0.232; [43838f94-ddd3-41ad-920f-600650dd4766 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -266.03231611012774, -183.83319365038932, -156.01478300004248, -156.01473682775338
LBFGS Accumulation History: 3 points
Removed measurement 6b9e2863 to history. Total: 3
th(0)=-266.03231611012774;dx=-9.658765757826552E-6
New Minimum: -266.03231611012774 > -283.17017218396524
END: th(3024000.0000000005)=-283.17017218396524; dx=-1.0030040737176802E-6 evalInputDelta=17.137856073837497
Fitness changed from -266.03231611012774 to -283.17017218396524
Iteration 6 complete. Error: -283.17017218396524 Total: 6.4109; Orientation: 1.0227; Line Search: 3.2341
Adding measurement 19f4195 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.718e+04, gradient 2.297e-03, dot -0.416; [43838f94-ddd3-41ad-920f-600650dd4766 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -283.17017218396524, -183.83319365038932, -156.01478300004248, -156.01473682775338
LBFGS Accumulation History: 3 points
Removed measurement 19f4195 to history. Total: 3
th(0)=-283.17017218396524;dx=-5.258957082707521E-6
New Minimum: -283.17017218396524 > -293.5233698047802
WOLF (strong): th(6515010.502656418)=-293.5233698047802; dx=9.06167858918293E-7 evalInputDelta=10.353197620814967
New Minimum: -293.5233698047802 > -294.122389107319
END: th(3257505.251328209)=-294.122389107319; dx=-1.2985121363325251E-6 evalInputDelta=10.952216923353774
Fitness changed from -283.17017218396524 to -294.122389107319
Iteration 7 complete. Error: -294.122389107319 Total: 7.6545; Orientation: 1.1254; Line Search: 4.9707
Adding measurement 550c8b39 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.927e+04, gradient 2.143e-03, dot -0.429; [43838f94-ddd3-41ad-920f-600650dd4766 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -294.122389107319, -183.83319365038932, -156.01478300004248, -156.01473682775338
LBFGS Accumulation History: 3 points
Removed measurement 550c8b39 to history. Total: 3
th(0)=-294.122389107319;dx=-4.587998541077349E-6
New Minimum: -294.122389107319 > -301.03174012138055
WOLF (strong): th(7018082.316422524)=-301.03174012138055; dx=1.021994824577443E-6 evalInputDelta=6.909351014061542
New Minimum: -301.03174012138055 > -303.0585879105301
END: th(3509041.158211262)=-303.0585879105301; dx=-6.642483959643527E-7 evalInputDelta=8.936198803211084
Fitness changed from -294.122389107319 to -303.0585879105301
Iteration 8 complete. Error: -303.0585879105301 Total: 7.5793; Orientation: 1.0504; Line Search: 4.9618
Adding measurement 1be173a4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.041e+04, gradient 2.188e-03, dot -0.395; [43838f94-ddd3-41ad-920f-600650dd4766 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -303.0585879105301, -183.83319365038932, -156.01478300004248, -156.01473682775338
LBFGS Accumulation History: 3 points
Removed measurement 1be173a4 to history. Total: 3
th(0)=-303.0585879105301;dx=-4.784969016779112E-6
New Minimum: -303.0585879105301 > -304.5378564373921
WOLF (strong): th(7560000.000000003)=-304.5378564373921; dx=1.8680410500086666E-6 evalInputDelta=1.479268526862029
New Minimum: -304.5378564373921 > -310.7783874980167
WOLF (strong): th(3780000.0000000014)=-310.7783874980167; dx=2.7854184449287706E-7 evalInputDelta=7.719799587486591
END: th(1260000.0000000005)=-308.1781942686806; dx=-2.8364047045390553E-6 evalInputDelta=5.11960635815052
Fitness changed from -303.0585879105301 to -310.7783874980167
Iteration 9 complete. Error: -310.7783874980167 Total: 9.2941; Orientation: 1.1159; Line Search: 6.5941
Adding measurement 76847834 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.881e+04, gradient 2.295e-03, dot -0.334; [43838f94-ddd3-41ad-920f-600650dd4766 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -310.7783874980167, -183.83319365038932, -156.01478300004248, -156.01473682775338
LBFGS Accumulation History: 3 points
Removed measurement 76847834 to history. Total: 3
th(0)=-310.7783874980167;dx=-5.243597462838379E-6
New Minimum: -310.7783874980167 > -318.67522701879454
END: th(2714587.7094401745)=-318.67522701879454; dx=-3.4905482949037507E-7 evalInputDelta=7.89683952077786
Fitness changed from -310.7783874980167 to -318.67522701879454
Iteration 10 complete. Error: -318.67522701879454 Total: 5.9841; Orientation: 1.0273; Line Search: 3.3662
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/a438a9be-3d8f-4d98-b12e-9611fbd343c9.jpg)
Final threshold in iteration 11: -318.67522701879454 (> -Infinity) after 86.530s (< 5400.000s)
Returns
-318.67522701879454