BasicOptimizer.scala:89 executed in 87.00 seconds (1.122 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: 304332160099600
Reset training subject: 304333891362200
Adding measurement 903803c to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-155.4061466691131;dx=-2.9206965343358572E-5
New Minimum: -155.4061466691131 > -155.40619302221867
END: th(2.154434690031884)=-155.40619302221867; dx=-1.8099719240757485E-5 evalInputDelta=4.635310557432604E-5
Fitness changed from -155.4061466691131 to -155.40619302221867
Iteration 1 complete. Error: -155.40619302221867 Total: 8.4121; Orientation: 0.0646; Line Search: 3.4771
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/a13edfb7-a9cc-429a-844e-ef68d9d894be.jpg)
Adding measurement 286477f8 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-155.40619302221867;dx=-1.7999899007736532E-5
New Minimum: -155.40619302221867 > -155.40628572838838
WOLFE (weak): th(4.641588833612779)=-155.40628572838838; dx=-1.799557427052913E-5 evalInputDelta=9.270616970979972E-5
New Minimum: -155.40628572838838 > -155.4063718126393
WOLFE (weak): th(9.283177667225559)=-155.4063718126393; dx=-1.7986039359764746E-5 evalInputDelta=1.7879042061963446E-4
New Minimum: -155.4063718126393 > -155.40674263655956
WOLFE (weak): th(27.849533001676676)=-155.40674263655956; dx=-1.794204053279159E-5 evalInputDelta=5.496143408834087E-4
New Minimum: -155.40674263655956 > -155.40840471147425
WOLFE (weak): th(111.3981320067067)=-155.40840471147425; dx=-1.7933184516917217E-5 evalInputDelta=0.002211689255574356
New Minimum: -155.40840471147425 > -155.41726439655818
WOLFE (weak): th(556.9906600335335)=-155.41726439655818; dx=-1.7925962951421037E-5 evalInputDelta=0.011071374339508111
New Minimum: -155.41726439655818 > -155.47260282314357
WOLFE (weak): th(3341.9439602012008)=-155.47260282314357; dx=-1.7944644620503843E-5 evalInputDelta=0.06640980092490167
New Minimum: -155.47260282314357 > -155.87024957636822
WOLFE (weak): th(23393.607721408407)=-155.87024957636822; dx=-1.7852497562446862E-5 evalInputDelta=0.4640565541495505
New Minimum: -155.87024957636822 > -159.05867274633897
WOLFE (weak): th(187148.86177126726)=-159.05867274633897; dx=-1.7312928663614723E-5 evalInputDelta=3.6524797241202975
New Minimum: -159.05867274633897 > -182.36424643669557
END: th(1684339.7559414054)=-182.36424643669557; dx=-1.0524005518296262E-5 evalInputDelta=26.958053414476893
Fitness changed from -155.40619302221867 to -182.36424643669557
Iteration 2 complete. Error: -182.36424643669557 Total: 18.2328; Orientation: 0.0660; Line Search: 16.2484
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/cbc319c6-64e5-4978-83f6-fbf6631714fb.jpg)
Adding measurement 7fc7a005 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-182.36424643669557;dx=-1.2527644153709628E-5
New Minimum: -182.36424643669557 > -213.55358255494502
END: th(3628800.0000000005)=-213.55358255494502; dx=-4.51016522394755E-6 evalInputDelta=31.189336118249457
Fitness changed from -182.36424643669557 to -213.55358255494502
Iteration 3 complete. Error: -213.55358255494502 Total: 5.1108; Orientation: 0.0644; Line Search: 3.2027
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/95980614-2b8c-46aa-b25f-f63c31384736.jpg)
Adding measurement 19deed0c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.364e+04, gradient 3.087e-03, dot -0.426; [de84df40-e9e0-4bb5-b2a2-488f313a4211 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -213.55358255494502, -182.36424643669557, -155.40619302221867, -155.4061466691131
LBFGS Accumulation History: 3 points
Removed measurement 19deed0c to history. Total: 3
th(0)=-213.55358255494502;dx=-9.510618002748643E-6
New Minimum: -213.55358255494502 > -238.7221176009013
END: th(7818012.603187701)=-238.7221176009013; dx=-2.6701298569410796E-8 evalInputDelta=25.168535045956276
Fitness changed from -213.55358255494502 to -238.7221176009013
Iteration 4 complete. Error: -238.7221176009013 Total: 6.4032; Orientation: 1.1180; Line Search: 3.4555
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/6240be73-c125-4737-9e8f-d1bad08f9def.jpg)
Adding measurement 6be62092 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.949e+03, gradient 3.693e-03, dot -0.166; [de84df40-e9e0-4bb5-b2a2-488f313a4211 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -238.7221176009013, -182.36424643669557, -155.40619302221867, -155.4061466691131
LBFGS Accumulation History: 3 points
Removed measurement 6be62092 to history. Total: 3
th(0)=-238.7221176009013;dx=-1.3640720722372348E-5
Armijo: th(1.6843397559414055E7)=-209.28004795251167; dx=3.209469085166807E-6 evalInputDelta=-29.442069648389634
New Minimum: -238.7221176009013 > -248.59806179348385
WOLF (strong): th(8421698.779707028)=-248.59806179348385; dx=4.323627168947573E-6 evalInputDelta=9.875944192582551
New Minimum: -248.59806179348385 > -264.1413706217574
END: th(2807232.926569009)=-264.1413706217574; dx=-3.0095474609136656E-6 evalInputDelta=25.419253020856104
Fitness changed from -238.7221176009013 to -264.1413706217574
Iteration 5 complete. Error: -264.1413706217574 Total: 9.9692; Orientation: 1.1107; Line Search: 6.9184
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/add627a8-3d81-45d6-9a85-6b18fd261cc7.jpg)
Adding measurement 34365908 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.326e+04, gradient 2.473e-03, dot -0.396; [de84df40-e9e0-4bb5-b2a2-488f313a4211 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -264.1413706217574, -182.36424643669557, -155.40619302221867, -155.4061466691131
LBFGS Accumulation History: 3 points
Removed measurement 34365908 to history. Total: 3
th(0)=-264.1413706217574;dx=-6.1153339313796606E-6
New Minimum: -264.1413706217574 > -281.0608093977874
END: th(6048000.000000001)=-281.0608093977874; dx=-1.8487258119604591E-7 evalInputDelta=16.919438776030006
Fitness changed from -264.1413706217574 to -281.0608093977874
Iteration 6 complete. Error: -281.0608093977874 Total: 6.2651; Orientation: 1.1051; Line Search: 3.2847
Adding measurement 3a18e56f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.283e+04, gradient 2.918e-03, dot -0.266; [de84df40-e9e0-4bb5-b2a2-488f313a4211 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -281.0608093977874, -182.36424643669557, -155.40619302221867, -155.4061466691131
LBFGS Accumulation History: 3 points
Removed measurement 3a18e56f to history. Total: 3
th(0)=-281.0608093977874;dx=-8.500485995858134E-6
Armijo: th(1.3030021005312836E7)=-260.4882533871405; dx=3.1180076549131105E-6 evalInputDelta=-20.572556010646906
New Minimum: -281.0608093977874 > -286.9172102980827
WOLF (strong): th(6515010.502656418)=-286.9172102980827; dx=3.185042379277796E-6 evalInputDelta=5.856400900295284
New Minimum: -286.9172102980827 > -294.0634631615078
END: th(2171670.167552139)=-294.0634631615078; dx=-2.451420922982328E-6 evalInputDelta=13.002653763720389
Fitness changed from -281.0608093977874 to -294.0634631615078
Iteration 7 complete. Error: -294.0634631615078 Total: 9.2296; Orientation: 1.0569; Line Search: 6.3969
Adding measurement 1d663b00 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.085e+04, gradient 1.888e-03, dot -0.481; [de84df40-e9e0-4bb5-b2a2-488f313a4211 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -294.0634631615078, -182.36424643669557, -155.40619302221867, -155.4061466691131
LBFGS Accumulation History: 3 points
Removed measurement 1d663b00 to history. Total: 3
th(0)=-294.0634631615078;dx=-3.549237000671482E-6
New Minimum: -294.0634631615078 > -305.27236881321124
END: th(4678721.544281682)=-305.27236881321124; dx=-1.2941649589121333E-6 evalInputDelta=11.208905651703446
Fitness changed from -294.0634631615078 to -305.27236881321124
Iteration 8 complete. Error: -305.27236881321124 Total: 6.1172; Orientation: 1.0595; Line Search: 3.4186
Adding measurement 66fc82 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.081e+04, gradient 2.031e-03, dot -0.401; [de84df40-e9e0-4bb5-b2a2-488f313a4211 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -305.27236881321124, -182.36424643669557, -155.40619302221867, -155.4061466691131
LBFGS Accumulation History: 3 points
Removed measurement 66fc82 to history. Total: 3
th(0)=-305.27236881321124;dx=-4.125494176683104E-6
New Minimum: -305.27236881321124 > -306.10908286589176
WOLF (strong): th(1.0080000000000002E7)=-306.10908286589176; dx=1.321488064138386E-6 evalInputDelta=0.8367140526805201
New Minimum: -306.10908286589176 > -312.47329592574016
WOLF (strong): th(5040000.000000001)=-312.47329592574016; dx=3.1766746341885337E-7 evalInputDelta=7.200927112528916
END: th(1680000.0000000002)=-310.6983232484315; dx=-2.033925501125792E-6 evalInputDelta=5.425954435220262
Fitness changed from -305.27236881321124 to -312.47329592574016
Iteration 9 complete. Error: -312.47329592574016 Total: 9.3532; Orientation: 1.1122; Line Search: 6.6671
Adding measurement b4ad831 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.709e+04, gradient 2.390e-03, dot -0.282; [de84df40-e9e0-4bb5-b2a2-488f313a4211 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -312.47329592574016, -182.36424643669557, -155.40619302221867, -155.4061466691131
LBFGS Accumulation History: 3 points
Removed measurement b4ad831 to history. Total: 3
th(0)=-312.47329592574016;dx=-5.704858997775529E-6
New Minimum: -312.47329592574016 > -321.5981729416713
WOLF (strong): th(3619450.2792535652)=-321.5981729416713; dx=7.380075477068519E-7 evalInputDelta=9.124877015931133
END: th(1809725.1396267826)=-320.4417386673822; dx=-2.3946951339501797E-6 evalInputDelta=7.968442741642036
Fitness changed from -312.47329592574016 to -321.5981729416713
Iteration 10 complete. Error: -321.5981729416713 Total: 7.5700; Orientation: 1.0994; Line Search: 4.9168
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/6c267cad-90b7-4047-b869-9e846297cd75.jpg)
Final threshold in iteration 11: -321.5981729416713 (> -Infinity) after 87.005s (< 5400.000s)
Returns
-321.5981729416713