BasicOptimizer.scala:89 executed in 201.86 seconds (2.035 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: 6760146246680
Reset training subject: 6764565207597
Adding measurement 48179184 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.7930501401424408;dx=-5.531471831344693E-7
New Minimum: -0.7930501401424408 > -0.7930504828691483
END: th(2.154434690031884)=-0.7930504828691483; dx=-4.7569359476442945E-7 evalInputDelta=3.427267074584961E-7
Fitness changed from -0.7930501401424408 to -0.7930504828691483
Iteration 1 complete. Error: -0.7930504828691483 Total: 21.7863; Orientation: 0.0457; Line Search: 8.8937
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/76464e4a-e429-4f76-a0ed-c1b6762af150.jpg)
Adding measurement 638d8bf6 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.7930504828691483;dx=-4.7568004441302055E-7
New Minimum: -0.7930504828691483 > -0.7930517196655273
WOLFE (weak): th(4.641588833612779)=-0.7930517196655273; dx=-4.756308465472585E-7 evalInputDelta=1.2367963790893555E-6
New Minimum: -0.7930517196655273 > -0.7930528372526169
WOLFE (weak): th(9.283177667225559)=-0.7930528372526169; dx=-4.7562776386114125E-7 evalInputDelta=2.3543834686279297E-6
New Minimum: -0.7930528372526169 > -0.7930572479963303
WOLFE (weak): th(27.849533001676676)=-0.7930572479963303; dx=-4.7562295097370855E-7 evalInputDelta=6.765127182006836E-6
New Minimum: -0.7930572479963303 > -0.7930772006511688
WOLFE (weak): th(111.3981320067067)=-0.7930772006511688; dx=-4.756174799968455E-7 evalInputDelta=2.6717782020568848E-5
New Minimum: -0.7930772006511688 > -0.7931831181049347
WOLFE (weak): th(556.9906600335335)=-0.7931831181049347; dx=-4.755517478725706E-7 evalInputDelta=1.32635235786438E-4
New Minimum: -0.7931831181049347 > -0.7938449829816818
WOLFE (weak): th(3341.9439602012008)=-0.7938449829816818; dx=-4.750962807487496E-7 evalInputDelta=7.945001125335693E-4
New Minimum: -0.7938449829816818 > -0.7985914200544357
WOLFE (weak): th(23393.607721408407)=-0.7985914200544357; dx=-4.7185278029583796E-7 evalInputDelta=0.005540937185287476
New Minimum: -0.7985914200544357 > -0.8360190689563751
WOLFE (weak): th(187148.86177126726)=-0.8360190689563751; dx=-4.4217668291625755E-7 evalInputDelta=0.04296858608722687
New Minimum: -0.8360190689563751 > -1.0740243643522263
END: th(1684339.7559414054)=-1.0740243643522263; dx=-2.1790507368365685E-7 evalInputDelta=0.280973881483078
Fitness changed from -0.7930504828691483 to -1.0740243643522263
Iteration 2 complete. Error: -1.0740243643522263 Total: 47.6218; Orientation: 0.0501; Line Search: 42.5614
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/292b4db4-df36-4b71-96f2-4a69a147eba5.jpg)
Adding measurement 1cab19a9 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-1.0740243643522263;dx=-2.0532703628360875E-7
New Minimum: -1.0740243643522263 > -1.324882596731186
END: th(3628800.0000000005)=-1.324882596731186; dx=-9.047113181872165E-8 evalInputDelta=0.25085823237895966
Fitness changed from -1.0740243643522263 to -1.324882596731186
Iteration 3 complete. Error: -1.324882596731186 Total: 12.3839; Orientation: 0.0463; Line Search: 8.3467
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/499ba792-aad3-474a-9903-84f0ee27f2c3.jpg)
Adding measurement 6baa2c67 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.553e+03, gradient 3.170e-04, dot -0.645; [fb776f84-93b3-4f36-a794-591d1e4e7590 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.324882596731186, -1.0740243643522263, -0.7930504828691483, -0.7930501401424408
LBFGS Accumulation History: 3 points
Removed measurement 6baa2c67 to history. Total: 3
th(0)=-1.324882596731186;dx=-1.0046677805884319E-7
New Minimum: -1.324882596731186 > -1.5549842193722725
END: th(7818012.603187701)=-1.5549842193722725; dx=-3.061760120892851E-8 evalInputDelta=0.23010162264108658
Fitness changed from -1.324882596731186 to -1.5549842193722725
Iteration 4 complete. Error: -1.5549842193722725 Total: 13.8724; Orientation: 1.0142; Line Search: 8.7243
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/41126e29-e9d1-4466-afdb-a42d7b29ed10.jpg)
Adding measurement 294ded9d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.473e+03, gradient 2.670e-04, dot -0.457; [fb776f84-93b3-4f36-a794-591d1e4e7590 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.5549842193722725, -1.0740243643522263, -0.7930504828691483, -0.7930501401424408
LBFGS Accumulation History: 3 points
Removed measurement 294ded9d to history. Total: 3
th(0)=-1.5549842193722725;dx=-7.12942348322876E-8
New Minimum: -1.5549842193722725 > -1.703872725367546
WOLF (strong): th(1.6843397559414055E7)=-1.703872725367546; dx=4.129905918008854E-9 evalInputDelta=0.1488885059952736
END: th(8421698.779707028)=-1.69685760140419; dx=-1.0021773224228305E-8 evalInputDelta=0.14187338203191757
Fitness changed from -1.5549842193722725 to -1.703872725367546
Iteration 5 complete. Error: -1.703872725367546 Total: 18.1735; Orientation: 1.0704; Line Search: 12.7662
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/20956214-56c8-4eb2-b310-236d0e590afb.jpg)
Adding measurement 4f7f3956 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.028e+03, gradient 3.001e-04, dot -0.152; [fb776f84-93b3-4f36-a794-591d1e4e7590 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.703872725367546, -1.0740243643522263, -0.7930504828691483, -0.7930501401424408
LBFGS Accumulation History: 3 points
Removed measurement 4f7f3956 to history. Total: 3
th(0)=-1.703872725367546;dx=-9.008915663159924E-8
New Minimum: -1.703872725367546 > -1.7782531902194023
WOLF (strong): th(1.8144000000000004E7)=-1.7782531902194023; dx=2.76825665295815E-8 evalInputDelta=0.07438046485185623
New Minimum: -1.7782531902194023 > -1.8551680892705917
WOLF (strong): th(9072000.000000002)=-1.8551680892705917; dx=1.6276643289565586E-9 evalInputDelta=0.15129536390304565
END: th(3024000.0000000005)=-1.8035544753074646; dx=-4.294900660411546E-8 evalInputDelta=0.09968174993991852
Fitness changed from -1.703872725367546 to -1.8551680892705917
Iteration 6 complete. Error: -1.8551680892705917 Total: 22.8561; Orientation: 1.0135; Line Search: 17.8645
Adding measurement 5c28d8e8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.539e+03, gradient 2.117e-04, dot -0.264; [fb776f84-93b3-4f36-a794-591d1e4e7590 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.8551680892705917, -1.0740243643522263, -0.7930504828691483, -0.7930501401424408
LBFGS Accumulation History: 3 points
Removed measurement 5c28d8e8 to history. Total: 3
th(0)=-1.8551680892705917;dx=-4.483030397405136E-8
New Minimum: -1.8551680892705917 > -1.947057157754898
END: th(6515010.502656418)=-1.947057157754898; dx=-1.4285462580457516E-8 evalInputDelta=0.09188906848430634
Fitness changed from -1.8551680892705917 to -1.947057157754898
Iteration 7 complete. Error: -1.947057157754898 Total: 13.5396; Orientation: 1.0247; Line Search: 8.3953
Adding measurement 7892d80e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.163e+03, gradient 1.504e-04, dot -0.453; [fb776f84-93b3-4f36-a794-591d1e4e7590 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.947057157754898, -1.0740243643522263, -0.7930504828691483, -0.7930501401424408
LBFGS Accumulation History: 3 points
Removed measurement 7892d80e to history. Total: 3
th(0)=-1.947057157754898;dx=-2.2634337395909484E-8
New Minimum: -1.947057157754898 > -2.033663511276245
END: th(1.4036164632845048E7)=-2.033663511276245; dx=-4.545051035058103E-9 evalInputDelta=0.08660635352134705
Fitness changed from -1.947057157754898 to -2.033663511276245
Iteration 8 complete. Error: -2.033663511276245 Total: 13.6705; Orientation: 1.0152; Line Search: 8.5949
Adding measurement 551ec67d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.124e+03, gradient 1.724e-04, dot -0.327; [fb776f84-93b3-4f36-a794-591d1e4e7590 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.033663511276245, -1.0740243643522263, -0.7930504828691483, -0.7930501401424408
LBFGS Accumulation History: 3 points
Removed measurement 551ec67d to history. Total: 3
th(0)=-2.033663511276245;dx=-2.9718217912116168E-8
Armijo: th(3.024000000000001E7)=-1.9849266558885574; dx=1.4775713991179271E-8 evalInputDelta=-0.04873685538768768
New Minimum: -2.033663511276245 > -2.07319138944149
WOLF (strong): th(1.5120000000000006E7)=-2.07319138944149; dx=7.502937855318505E-9 evalInputDelta=0.039527878165245056
New Minimum: -2.07319138944149 > -2.0804957523941994
END: th(5040000.000000002)=-2.0804957523941994; dx=-8.571099650076991E-9 evalInputDelta=0.046832241117954254
Fitness changed from -2.033663511276245 to -2.0804957523941994
Iteration 9 complete. Error: -2.0804957523941994 Total: 22.9293; Orientation: 1.0286; Line Search: 17.3091
Adding measurement 11e5d069 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.513e+03, gradient 1.191e-04, dot -0.520; [fb776f84-93b3-4f36-a794-591d1e4e7590 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.0804957523941994, -1.0740243643522263, -0.7930504828691483, -0.7930501401424408
LBFGS Accumulation History: 3 points
Removed measurement 11e5d069 to history. Total: 3
th(0)=-2.0804957523941994;dx=-1.4196096514223668E-8
New Minimum: -2.0804957523941994 > -2.130333498120308
END: th(1.0858350837760698E7)=-2.130333498120308; dx=-5.366294011042772E-9 evalInputDelta=0.04983774572610855
Fitness changed from -2.0804957523941994 to -2.130333498120308
Iteration 10 complete. Error: -2.130333498120308 Total: 14.9531; Orientation: 1.0057; Line Search: 9.6162
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/f6942024-2f33-498b-ac1b-40d7ba86e057.jpg)
Final threshold in iteration 11: -2.130333498120308 (> -Infinity) after 201.858s (< 5400.000s)
Returns
-2.130333498120308