BasicOptimizer.scala:89 executed in 45.44 seconds (0.884 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: 214665602124600
Reset training subject: 214666238207100
Adding measurement 6a0310b1 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-10.623193664834183;dx=-1.6587353240628207E-4
New Minimum: -10.623193664834183 > -10.623461760458635
WOLFE (weak): th(2.154434690031884)=-10.623461760458635; dx=-1.6572107966995566E-4 evalInputDelta=2.6809562445251345E-4
New Minimum: -10.623461760458635 > -10.62373081792213
WOLFE (weak): th(4.308869380063768)=-10.62373081792213; dx=-1.657187282393714E-4 evalInputDelta=5.371530879472175E-4
New Minimum: -10.62373081792213 > -10.624807454724767
WOLFE (weak): th(12.926608140191302)=-10.624807454724767; dx=-1.6568414700060123E-4 evalInputDelta=0.0016137898905839165
New Minimum: -10.624807454724767 > -10.629650052862226
WOLFE (weak): th(51.70643256076521)=-10.629650052862226; dx=-1.6571802457876798E-4 evalInputDelta=0.0064563880280434915
New Minimum: -10.629650052862226 > -10.655608306928166
WOLFE (weak): th(258.53216280382605)=-10.655608306928166; dx=-1.6545810765299004E-4 evalInputDelta=0.03241464209398259
New Minimum: -10.655608306928166 > -10.817652042451835
WOLFE (weak): th(1551.1929768229563)=-10.817652042451835; dx=-1.6552282148964996E-4 evalInputDelta=0.19445837761765183
New Minimum: -10.817652042451835 > -11.921458423577617
WOLFE (weak): th(10858.350837760694)=-11.921458423577617; dx=-1.5107328296673261E-4 evalInputDelta=1.298264758743434
New Minimum: -11.921458423577617 > -15.52257396310538
END: th(86866.80670208555)=-15.52257396310538; dx=-6.137767261077135E-5 evalInputDelta=4.899380298271197
Fitness changed from -10.623193664834183 to -15.52257396310538
Iteration 1 complete. Error: -15.52257396310538 Total: 7.6341; Orientation: 0.0193; Line Search: 5.8431
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/90fb80cf-2f9d-474b-8627-b2e9f088bf4c.jpg)
Adding measurement 585e8125 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-15.52257396310538;dx=-2.1460467444437914E-4
New Minimum: -15.52257396310538 > -16.872845168128137
END: th(187148.86177126726)=-16.872845168128137; dx=-2.353902315142138E-5 evalInputDelta=1.3502712050227572
Fitness changed from -15.52257396310538 to -16.872845168128137
Iteration 2 complete. Error: -16.872845168128137 Total: 1.8459; Orientation: 0.0169; Line Search: 1.2519
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/412286aa-16ce-4560-bd97-6816dde8e136.jpg)
Adding measurement 49edf3bf to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-16.872845168128137;dx=-2.0939197886529512E-4
Armijo: th(403200.00000000006)=-12.12424694136212; dx=-9.957085759389597E-7 evalInputDelta=-4.748598226766017
New Minimum: -16.872845168128137 > -20.520902993222595
END: th(201600.00000000003)=-20.520902993222595; dx=-3.186530782086964E-5 evalInputDelta=3.648057825094458
Fitness changed from -16.872845168128137 to -20.520902993222595
Iteration 3 complete. Error: -20.520902993222595 Total: 2.7224; Orientation: 0.0165; Line Search: 1.8188
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/5d56f589-e288-4277-9805-3980f39138ce.jpg)
Adding measurement 44a6dd86 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.078e+03, gradient 1.405e-02, dot -0.248; [906e3085-b49b-4ef2-8d66-a28d3b381690 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -20.520902993222595, -16.872845168128137, -15.52257396310538, -10.623193664834183
LBFGS Accumulation History: 3 points
Removed measurement 44a6dd86 to history. Total: 3
th(0)=-20.520902993222595;dx=-1.9727515348263346E-4
Armijo: th(434334.03351042786)=-12.083169971281311; dx=-4.235376059198348E-8 evalInputDelta=-8.437733021941284
New Minimum: -20.520902993222595 > -23.92629441752109
END: th(217167.01675521393)=-23.92629441752109; dx=-3.511651586535665E-5 evalInputDelta=3.405391424298493
Fitness changed from -20.520902993222595 to -23.92629441752109
Iteration 4 complete. Error: -23.92629441752109 Total: 2.7181; Orientation: 0.2970; Line Search: 1.8408
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/d288147a-321f-4db2-808f-92d5f9cd2e89.jpg)
Adding measurement fadf0eb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.414e+03, gradient 1.377e-02, dot -0.234; [906e3085-b49b-4ef2-8d66-a28d3b381690 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -23.92629441752109, -16.872845168128137, -15.52257396310538, -10.623193664834183
LBFGS Accumulation History: 3 points
Removed measurement fadf0eb to history. Total: 3
th(0)=-23.92629441752109;dx=-1.889292946004571E-4
Armijo: th(467872.15442816826)=-12.642183128877168; dx=-3.441942592321308E-6 evalInputDelta=-11.28411128864392
New Minimum: -23.92629441752109 > -26.125811897850596
END: th(233936.07721408413)=-26.125811897850596; dx=-3.788869655174911E-5 evalInputDelta=2.199517480329508
Fitness changed from -23.92629441752109 to -26.125811897850596
Iteration 5 complete. Error: -26.125811897850596 Total: 2.7031; Orientation: 0.2953; Line Search: 1.8453
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/f18115dc-f6f4-4a38-8031-af88b8f8fbb7.jpg)
Adding measurement 7e48bf8b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.362e+03, gradient 1.391e-02, dot -0.219; [906e3085-b49b-4ef2-8d66-a28d3b381690 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -26.125811897850596, -16.872845168128137, -15.52257396310538, -10.623193664834183
LBFGS Accumulation History: 3 points
Removed measurement 7e48bf8b to history. Total: 3
th(0)=-26.125811897850596;dx=-1.9335211409755678E-4
Armijo: th(504000.0000000002)=-13.7695793584002; dx=-3.535224817853298E-6 evalInputDelta=-12.356232539450396
New Minimum: -26.125811897850596 > -29.01923856169558
END: th(252000.0000000001)=-29.01923856169558; dx=-3.985270540232811E-5 evalInputDelta=2.893426663844984
Fitness changed from -26.125811897850596 to -29.01923856169558
Iteration 6 complete. Error: -29.01923856169558 Total: 2.8240; Orientation: 0.3277; Line Search: 1.9029
Adding measurement 72f2c1e1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.999e+03, gradient 1.384e-02, dot -0.203; [906e3085-b49b-4ef2-8d66-a28d3b381690 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -29.01923856169558, -16.872845168128137, -15.52257396310538, -10.623193664834183
LBFGS Accumulation History: 3 points
Removed measurement 72f2c1e1 to history. Total: 3
th(0)=-29.01923856169558;dx=-1.9113301527298374E-4
Armijo: th(542917.5418880349)=-14.1368841100007; dx=-2.0151113535036098E-6 evalInputDelta=-14.88235445169488
New Minimum: -29.01923856169558 > -31.32631620575284
END: th(271458.77094401745)=-31.32631620575284; dx=-4.0046020094414674E-5 evalInputDelta=2.3070776440572587
Fitness changed from -29.01923856169558 to -31.32631620575284
Iteration 7 complete. Error: -31.32631620575284 Total: 2.9729; Orientation: 0.5251; Line Search: 1.8693
Adding measurement b48e93b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.979e+03, gradient 1.346e-02, dot -0.194; [906e3085-b49b-4ef2-8d66-a28d3b381690 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -31.32631620575284, -16.872845168128137, -15.52257396310538, -10.623193664834183
LBFGS Accumulation History: 3 points
Removed measurement b48e93b to history. Total: 3
th(0)=-31.32631620575284;dx=-1.8093845548169382E-4
Armijo: th(584840.1930352104)=-15.61562238201423; dx=-3.972067525922969E-6 evalInputDelta=-15.710693823738609
New Minimum: -31.32631620575284 > -33.35437895363689
END: th(292420.0965176052)=-33.35437895363689; dx=-4.019262483855345E-5 evalInputDelta=2.02806274788405
Fitness changed from -31.32631620575284 to -33.35437895363689
Iteration 8 complete. Error: -33.35437895363689 Total: 2.7431; Orientation: 0.2933; Line Search: 1.8854
Adding measurement 3455511 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.169e+04, gradient 1.325e-02, dot -0.183; [906e3085-b49b-4ef2-8d66-a28d3b381690 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -33.35437895363689, -16.872845168128137, -15.52257396310538, -10.623193664834183
LBFGS Accumulation History: 3 points
Removed measurement 3455511 to history. Total: 3
th(0)=-33.35437895363689;dx=-1.7507387260518395E-4
Armijo: th(630000.0000000002)=-16.09899793504575; dx=-2.9581394008960074E-6 evalInputDelta=-17.255381018591137
New Minimum: -33.35437895363689 > -35.83659310798115
END: th(315000.0000000001)=-35.83659310798115; dx=-3.93053900035676E-5 evalInputDelta=2.4822141543442626
Fitness changed from -33.35437895363689 to -35.83659310798115
Iteration 9 complete. Error: -35.83659310798115 Total: 2.7048; Orientation: 0.2938; Line Search: 1.8492
Adding measurement 22ac5f0e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.481e+04, gradient 1.325e-02, dot -0.175; [906e3085-b49b-4ef2-8d66-a28d3b381690 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -35.83659310798115, -16.872845168128137, -15.52257396310538, -10.623193664834183
LBFGS Accumulation History: 3 points
Removed measurement 22ac5f0e to history. Total: 3
th(0)=-35.83659310798115;dx=-1.7532377824732521E-4
Armijo: th(678646.9273600436)=-15.177697949039334; dx=-1.8704481881345971E-6 evalInputDelta=-20.658895158941817
New Minimum: -35.83659310798115 > -37.25150508648397
END: th(339323.4636800218)=-37.25150508648397; dx=-3.893055365870131E-5 evalInputDelta=1.4149119785028148
Fitness changed from -35.83659310798115 to -37.25150508648397
Iteration 10 complete. Error: -37.25150508648397 Total: 2.6935; Orientation: 0.2915; Line Search: 1.8234
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/1f8af4c5-8e78-452f-9745-acf97366f44d.jpg)
Adding measurement 4e3a626f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.055e+04, gradient 1.354e-02, dot -0.170; [906e3085-b49b-4ef2-8d66-a28d3b381690 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -37.25150508648397, -16.872845168128137, -15.52257396310538, -10.623193664834183
LBFGS Accumulation History: 3 points
Removed measurement 4e3a626f to history. Total: 3
th(0)=-37.25150508648397;dx=-1.831462729561236E-4
Armijo: th(731050.241294013)=-11.699013402117878; dx=2.78995726828926E-6 evalInputDelta=-25.55249168436609
New Minimum: -37.25150508648397 > -37.38433073885424
END: th(365525.1206470065)=-37.38433073885424; dx=-3.197124750841445E-5 evalInputDelta=0.132825652370272
Fitness changed from -37.25150508648397 to -37.38433073885424
Iteration 11 complete. Error: -37.38433073885424 Total: 2.9415; Orientation: 0.2780; Line Search: 1.8021
Adding measurement 10ea7f65 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.297e+04, gradient 1.321e-02, dot -0.160; [906e3085-b49b-4ef2-8d66-a28d3b381690 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -37.38433073885424, -16.872845168128137, -15.52257396310538, -10.623193664834183
LBFGS Accumulation History: 3 points
Removed measurement 10ea7f65 to history. Total: 3
th(0)=-37.38433073885424;dx=-1.7384426650392652E-4
Armijo: th(787500.0000000003)=-10.576999183812639; dx=2.7956073242946606E-6 evalInputDelta=-26.8073315550416
New Minimum: -37.38433073885424 > -37.74308672896932
END: th(393750.0000000002)=-37.74308672896932; dx=-3.1849572226171245E-5 evalInputDelta=0.3587559901150783
Fitness changed from -37.38433073885424 to -37.74308672896932
Iteration 12 complete. Error: -37.74308672896932 Total: 2.7045; Orientation: 0.2980; Line Search: 1.8156
Adding measurement 50d1481b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.882e+04, gradient 1.320e-02, dot -0.152; [906e3085-b49b-4ef2-8d66-a28d3b381690 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -37.74308672896932, -16.872845168128137, -15.52257396310538, -10.623193664834183
LBFGS Accumulation History: 3 points
Removed measurement 50d1481b to history. Total: 3
th(0)=-37.74308672896932;dx=-1.7413243751154486E-4
Armijo: th(848308.6592000546)=-7.6257742491658504; dx=5.688094658148033E-6 evalInputDelta=-30.117312479803466
New Minimum: -37.74308672896932 > -38.30682429639869
END: th(424154.3296000273)=-38.30682429639869; dx=-2.9077994604659957E-5 evalInputDelta=0.5637375674293708
Fitness changed from -37.74308672896932 to -38.30682429639869
Iteration 13 complete. Error: -38.30682429639869 Total: 2.6661; Orientation: 0.2928; Line Search: 1.7928
Adding measurement 4710c2ac to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.654e+04, gradient 1.309e-02, dot -0.143; [906e3085-b49b-4ef2-8d66-a28d3b381690 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -38.30682429639869, -16.872845168128137, -15.52257396310538, -10.623193664834183
LBFGS Accumulation History: 3 points
Removed measurement 4710c2ac to history. Total: 3
th(0)=-38.30682429639869;dx=-1.7106424356287363E-4
Armijo: th(913812.8016175163)=-1.760823732469511; dx=5.7594832938112025E-6 evalInputDelta=-36.54600056392918
Armijo: th(456906.40080875816)=-37.128190322499876; dx=-2.6597353612845507E-5 evalInputDelta=-1.1786339738988119
New Minimum: -38.30682429639869 > -46.10860364295293
END: th(152302.13360291938)=-46.10860364295293; dx=-9.361355088457503E-5 evalInputDelta=7.801779346554241
Fitness changed from -38.30682429639869 to -46.10860364295293
Iteration 14 complete. Error: -46.10860364295293 Total: 3.5450; Orientation: 0.2924; Line Search: 2.7108
Adding measurement 4bf11d7d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.231e+04, gradient 1.161e-02, dot -0.171; [906e3085-b49b-4ef2-8d66-a28d3b381690 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -46.10860364295293, -16.872845168128137, -15.52257396310538, -10.623193664834183
LBFGS Accumulation History: 3 points
Removed measurement 4bf11d7d to history. Total: 3
th(0)=-46.10860364295293;dx=-1.345365198227575E-4
New Minimum: -46.10860364295293 > -49.93613621410229
END: th(328125.0000000002)=-49.93613621410229; dx=-5.2774901447717836E-5 evalInputDelta=3.827532571149362
Fitness changed from -46.10860364295293 to -49.93613621410229
Iteration 15 complete. Error: -49.93613621410229 Total: 2.0013; Orientation: 0.2792; Line Search: 1.1876
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/1d3c0541-edea-4ec0-9117-8b3c0ff29222.jpg)
Final threshold in iteration 16: -49.93613621410229 (> -Infinity) after 45.442s (< 5400.000s)
Returns
-49.93613621410229