BasicOptimizer.scala:89 executed in 56.95 seconds (1.635 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: 207712011208300
Reset training subject: 207712802565800
Adding measurement 46e052e5 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=4.676975281871382;dx=-0.01218678401212946
New Minimum: 4.676975281871382 > 4.660282105043145
WOLFE (weak): th(2.154434690031884)=4.660282105043145; dx=-0.012208093177356124 evalInputDelta=0.016693176828236567
New Minimum: 4.660282105043145 > 4.64356495015216
WOLFE (weak): th(4.308869380063768)=4.64356495015216; dx=-0.012222304819854509 evalInputDelta=0.03341033171922181
New Minimum: 4.64356495015216 > 4.576155730038903
WOLFE (weak): th(12.926608140191302)=4.576155730038903; dx=-0.012319067894419444 evalInputDelta=0.10081955183247882
New Minimum: 4.576155730038903 > 4.266403268752705
WOLFE (weak): th(51.70643256076521)=4.266403268752705; dx=-0.01256071625084948 evalInputDelta=0.41057201311867697
New Minimum: 4.266403268752705 > 2.4850433468023763
WOLFE (weak): th(258.53216280382605)=2.4850433468023763; dx=-0.013496343760177602 evalInputDelta=2.1919319350690056
New Minimum: 2.4850433468023763 > -8.798096722820087
END: th(1551.1929768229563)=-8.798096722820087; dx=-0.01055061796356993 evalInputDelta=13.47507200469147
Fitness changed from 4.676975281871382 to -8.798096722820087
Iteration 1 complete. Error: -8.798096722820087 Total: 7.7877; Orientation: 0.0171; Line Search: 5.5429
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/84a0debd-7689-4dd0-be01-9101b4b8fcd7.jpg)
Adding measurement 7def94bb to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-8.798096722820087;dx=-0.018276786323184864
New Minimum: -8.798096722820087 > -37.06349434911308
END: th(3341.943960201201)=-37.06349434911308; dx=-0.0076527711314552695 evalInputDelta=28.26539762629299
Fitness changed from -8.798096722820087 to -37.06349434911308
Iteration 2 complete. Error: -37.06349434911308 Total: 2.2903; Orientation: 0.0167; Line Search: 1.4915
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/33a902aa-4f50-4fb1-b064-03eb3b44800a.jpg)
Adding measurement 3a4fccc7 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-37.06349434911308;dx=-0.01703214516492567
New Minimum: -37.06349434911308 > -82.06578372791122
END: th(7200.000000000001)=-82.06578372791122; dx=-0.005083440163457962 evalInputDelta=45.002289378798146
Fitness changed from -37.06349434911308 to -82.06578372791122
Iteration 3 complete. Error: -82.06578372791122 Total: 2.3256; Orientation: 0.0167; Line Search: 1.6057
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/3ba098f8-c8ac-4604-adab-fbb75de18e0d.jpg)
Adding measurement bc9bd00 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.172e+04, gradient 1.383e-01, dot -0.155; [6f580688-ab1a-47b9-a47d-3ada52f13820 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -82.06578372791122, -37.06349434911308, -8.798096722820087, 4.676975281871382
LBFGS Accumulation History: 3 points
Removed measurement bc9bd00 to history. Total: 3
th(0)=-82.06578372791122;dx=-0.019076680514493877
New Minimum: -82.06578372791122 > -139.97253702492003
END: th(15511.929768229566)=-139.97253702492003; dx=-0.002761279579096213 evalInputDelta=57.906753297008805
Fitness changed from -82.06578372791122 to -139.97253702492003
Iteration 4 complete. Error: -139.97253702492003 Total: 2.8861; Orientation: 0.3078; Line Search: 1.5593
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/93435633-3a2f-4509-adcd-7e4479471fa2.jpg)
Adding measurement d556143 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.075e+03, gradient 1.357e-01, dot -0.079; [6f580688-ab1a-47b9-a47d-3ada52f13820 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -139.97253702492003, -37.06349434911308, -8.798096722820087, 4.676975281871382
LBFGS Accumulation History: 3 points
Removed measurement d556143 to history. Total: 3
th(0)=-139.97253702492003;dx=-0.01838534671946515
New Minimum: -139.97253702492003 > -204.97574419326833
END: th(33419.43960201202)=-204.97574419326833; dx=-0.001351966329256344 evalInputDelta=65.0032071683483
Fitness changed from -139.97253702492003 to -204.97574419326833
Iteration 5 complete. Error: -204.97574419326833 Total: 2.6691; Orientation: 0.3156; Line Search: 1.5870
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/2ab7d686-ae9a-4cb6-96d7-b80a96c98a09.jpg)
Adding measurement 69020b9a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.285e+03, gradient 1.342e-01, dot -0.048; [6f580688-ab1a-47b9-a47d-3ada52f13820 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -204.97574419326833, -37.06349434911308, -8.798096722820087, 4.676975281871382
LBFGS Accumulation History: 3 points
Removed measurement 69020b9a to history. Total: 3
th(0)=-204.97574419326833;dx=-0.017971218393266743
New Minimum: -204.97574419326833 > -245.34039620734234
END: th(72000.00000000003)=-245.34039620734234; dx=-5.327639155655777E-4 evalInputDelta=40.36465201407401
Fitness changed from -204.97574419326833 to -245.34039620734234
Iteration 6 complete. Error: -245.34039620734234 Total: 2.6421; Orientation: 0.3109; Line Search: 1.5690
Adding measurement 59a62b0e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.648e+03, gradient 1.223e-01, dot -0.034; [6f580688-ab1a-47b9-a47d-3ada52f13820 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -245.34039620734234, -37.06349434911308, -8.798096722820087, 4.676975281871382
LBFGS Accumulation History: 3 points
Removed measurement 59a62b0e to history. Total: 3
th(0)=-245.34039620734234;dx=-0.014923614290988596
New Minimum: -245.34039620734234 > -261.59255048227345
END: th(155119.2976822957)=-261.59255048227345; dx=-2.0548009635620824E-4 evalInputDelta=16.252154274931115
Fitness changed from -245.34039620734234 to -261.59255048227345
Iteration 7 complete. Error: -261.59255048227345 Total: 2.7557; Orientation: 0.3070; Line Search: 1.5315
Adding measurement 287213ac to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.632e+03, gradient 9.507e-02, dot -0.033; [6f580688-ab1a-47b9-a47d-3ada52f13820 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -261.59255048227345, -37.06349434911308, -8.798096722820087, 4.676975281871382
LBFGS Accumulation History: 3 points
Removed measurement 287213ac to history. Total: 3
th(0)=-261.59255048227345;dx=-0.009027573787030261
Armijo: th(334194.39602012024)=-259.0214820883807; dx=-1.1833661112607352E-4 evalInputDelta=-2.5710683938927446
New Minimum: -261.59255048227345 > -403.6730469208092
END: th(167097.19801006012)=-403.6730469208092; dx=-8.956252103498316E-4 evalInputDelta=142.08049643853576
Fitness changed from -261.59255048227345 to -403.6730469208092
Iteration 8 complete. Error: -403.6730469208092 Total: 3.3373; Orientation: 0.3098; Line Search: 2.3005
Adding measurement 7818569d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.795e+04, gradient 9.360e-02, dot -0.062; [6f580688-ab1a-47b9-a47d-3ada52f13820 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -403.6730469208092, -37.06349434911308, -8.798096722820087, 4.676975281871382
LBFGS Accumulation History: 3 points
Removed measurement 7818569d to history. Total: 3
th(0)=-403.6730469208092;dx=-0.008750740538671531
Armijo: th(360000.0000000002)=-341.58303251248265; dx=-3.9395725853057996E-6 evalInputDelta=-62.09001440832657
New Minimum: -403.6730469208092 > -543.0590934126429
END: th(180000.0000000001)=-543.0590934126429; dx=-9.512597068875613E-4 evalInputDelta=139.38604649183372
Fitness changed from -403.6730469208092 to -543.0590934126429
Iteration 9 complete. Error: -543.0590934126429 Total: 3.6692; Orientation: 0.3048; Line Search: 2.6578
Adding measurement 3b88b5f8 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 1.210e+05, gradient 9.307e-02, dot 0.083; [6f580688-ab1a-47b9-a47d-3ada52f13820 = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-543.0590934126429;dx=-934.3010577415924
Armijo: th(387798.2442057393)=-136.17160453786937; dx=7.821020884324034E-4 evalInputDelta=-406.88748887477357
Armijo: th(193899.12210286965)=-136.1701379919051; dx=0.0015652685580501802 evalInputDelta=-406.88895542073783
Armijo: th(64633.040700956546)=-136.17790048380698; dx=0.004698271630497564 evalInputDelta=-406.88119292883596
Armijo: th(16158.260175239137)=-136.18686076685765; dx=0.018781588254078732 evalInputDelta=-406.8722326457853
Armijo: th(3231.652035047827)=-136.2929466428484; dx=0.0940334498190385 evalInputDelta=-406.76614676979455
Armijo: th(538.6086725079712)=-136.91581770451205; dx=0.5599933130294337 evalInputDelta=-406.1432757081309
Armijo: th(76.9440960725673)=-142.63332922725556; dx=3.8452479188627597 evalInputDelta=-400.4257641853874
Armijo: th(9.618012009070913)=-198.2638488843313; dx=25.428893137616665 evalInputDelta=-344.7952445283116
Armijo: th(1.0686680010078793)=-351.11437597559996; dx=110.17821402233035 evalInputDelta=-191.94471743704298
Armijo: th(0.10686680010078793)=-527.4483058169901; dx=10.719536243492051 evalInputDelta=-15.610787595652823
New Minimum: -543.0590934126429 > -543.7220323720976
END: th(0.009715163645526175)=-543.7220323720976; dx=-244.5657592911053 evalInputDelta=0.6629389594546637
Fitness changed from -543.0590934126429 to -543.7220323720976
Iteration 10 complete. Error: -543.7220323720976 Total: 10.7567; Orientation: 0.3024; Line Search: 9.7085
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/fc091dc2-2b09-4019-9ae3-bec7dd4e46c7.jpg)
Adding measurement a0b8fe6 to history. Total: 4
Rejected: LBFGS Orientation magnitude: 4.895e+06, gradient 9.219e-02, dot -0.082; [6f580688-ab1a-47b9-a47d-3ada52f13820 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -543.7220323720976, -543.0590934126429, -37.06349434911308, -8.798096722820087, 4.676975281871382
Rejected: LBFGS Orientation magnitude: 9.713e+06, gradient 9.219e-02, dot -0.094; [6f580688-ab1a-47b9-a47d-3ada52f13820 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -543.7220323720976, -543.0590934126429, -37.06349434911308, -8.798096722820087
LBFGS Accumulation History: 3 points
Removed measurement a0b8fe6 to history. Total: 4
Removed measurement 3b88b5f8 to history. Total: 3
th(0)=-543.7220323720976;dx=-0.008492590105143808
New Minimum: -543.7220323720976 > -543.7221410754413
END: th(0.02093068557725821)=-543.7221410754413; dx=-0.0069204313840263865 evalInputDelta=1.0870334369883494E-4
Fitness changed from -543.7220323720976 to -543.7221410754413
Iteration 11 complete. Error: -543.7221410754413 Total: 3.2365; Orientation: 0.6882; Line Search: 1.8499
Adding measurement 1caf8498 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 1.874e+05, gradient 9.218e-02, dot 0.083; [6f580688-ab1a-47b9-a47d-3ada52f13820 = 1.000/1.000e+00]
th(0)=-543.7221410754413;dx=-1432.3229291440666
Armijo: th(0.045093795093795117)=-536.470181424942; dx=-91.76080650892766 evalInputDelta=-7.251959650499316
Armijo: th(0.022546897546897558)=-542.397767472119; dx=-224.75767593037554 evalInputDelta=-1.3243736033223286
New Minimum: -543.7221410754413 > -544.0825960104339
END: th(0.00751563251563252)=-544.0825960104339; dx=-344.27773766842756 evalInputDelta=0.3604549349926174
Fitness changed from -543.7221410754413 to -544.0825960104339
Iteration 12 complete. Error: -544.0825960104339 Total: 4.0762; Orientation: 0.3065; Line Search: 3.0789
Adding measurement 2709109 to history. Total: 4
Rejected: LBFGS Orientation magnitude: 2.179e+07, gradient 9.105e-02, dot -0.081; [6f580688-ab1a-47b9-a47d-3ada52f13820 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -544.0825960104339, -543.7221410754413, -37.06349434911308, -8.798096722820087, 4.676975281871382
Rejected: LBFGS Orientation magnitude: 4.818e+07, gradient 9.105e-02, dot -0.094; [6f580688-ab1a-47b9-a47d-3ada52f13820 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -544.0825960104339, -543.7221410754413, -37.06349434911308, -8.798096722820087
LBFGS Accumulation History: 3 points
Removed measurement 2709109 to history. Total: 4
Removed measurement 1caf8498 to history. Total: 3
th(0)=-544.0825960104339;dx=-0.008287124831649749
New Minimum: -544.0825960104339 > -544.0826824911078
END: th(0.016191939409210293)=-544.0826824911078; dx=-0.00667601917021261 evalInputDelta=8.64806738718471E-5
Fitness changed from -544.0825960104339 to -544.0826824911078
Iteration 13 complete. Error: -544.0826824911078 Total: 3.1745; Orientation: 0.8443; Line Search: 1.5931
Adding measurement 5a208e17 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.405e+06, gradient 9.109e-02, dot -0.080; [6f580688-ab1a-47b9-a47d-3ada52f13820 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -544.0826824911078, -37.06349434911308, -8.798096722820087, 4.676975281871382
LBFGS Accumulation History: 3 points
Removed measurement 5a208e17 to history. Total: 3
th(0)=-544.0826824911078;dx=-0.008286227648163516
New Minimum: -544.0826824911078 > -544.0827905919327
END: th(0.03488447596209702)=-544.0827905919327; dx=-0.0066784710445224075 evalInputDelta=1.081008249457227E-4
Fitness changed from -544.0826824911078 to -544.0827905919327
Iteration 14 complete. Error: -544.0827905919327 Total: 2.5759; Orientation: 0.3019; Line Search: 1.5313
Adding measurement 4151251b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.857e+06, gradient 9.106e-02, dot -0.080; [6f580688-ab1a-47b9-a47d-3ada52f13820 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -544.0827905919327, -37.06349434911308, -8.798096722820087, 4.676975281871382
LBFGS Accumulation History: 3 points
Removed measurement 4151251b to history. Total: 3
th(0)=-544.0827905919327;dx=-0.008284523048800025
New Minimum: -544.0827905919327 > -544.0830284136799
END: th(0.07515632515632518)=-544.0830284136799; dx=-0.006674681806647923 evalInputDelta=2.3782174719144678E-4
Fitness changed from -544.0827905919327 to -544.0830284136799
Iteration 15 complete. Error: -544.0830284136799 Total: 2.7443; Orientation: 0.3186; Line Search: 1.7008
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/6fe3509c-ae50-4a29-9f9e-9e186adad5bd.jpg)
Final threshold in iteration 16: -544.0830284136799 (> -Infinity) after 56.950s (< 5400.000s)
Returns
-544.0830284136799