BasicOptimizer.scala:89 executed in 57.01 seconds (1.360 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: 212255383326200
Reset training subject: 212256244843000
Adding measurement 7bbf28de to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=112.57023329277166;dx=-1.619329477563076E-4
New Minimum: 112.57023329277166 > 112.56989640938754
WOLFE (weak): th(2.154434690031884)=112.56989640938754; dx=-1.6191663581453935E-4 evalInputDelta=3.3688338412218855E-4
New Minimum: 112.56989640938754 > 112.56955956435554
WOLFE (weak): th(4.308869380063768)=112.56955956435554; dx=-1.6194683757668924E-4 evalInputDelta=6.737284161175694E-4
New Minimum: 112.56955956435554 > 112.56823579974291
WOLFE (weak): th(12.926608140191302)=112.56823579974291; dx=-1.6193928005189286E-4 evalInputDelta=0.0019974930287531834
New Minimum: 112.56823579974291 > 112.56227886760918
WOLFE (weak): th(51.70643256076521)=112.56227886760918; dx=-1.6188554766553685E-4 evalInputDelta=0.007954425162481016
New Minimum: 112.56227886760918 > 112.53051706811917
WOLFE (weak): th(258.53216280382605)=112.53051706811917; dx=-1.6184684311330502E-4 evalInputDelta=0.03971622465249425
New Minimum: 112.53051706811917 > 112.33232945059007
WOLFE (weak): th(1551.1929768229563)=112.33232945059007; dx=-1.6145654092019585E-4 evalInputDelta=0.23790384218159488
New Minimum: 112.33232945059007 > 110.92362187326823
WOLFE (weak): th(10858.350837760694)=110.92362187326823; dx=-1.585244236935994E-4 evalInputDelta=1.6466114195034294
New Minimum: 110.92362187326823 > 100.99092087663273
END: th(86866.80670208555)=100.99092087663273; dx=-1.2804083540986802E-4 evalInputDelta=11.579312416138933
Fitness changed from 112.57023329277166 to 100.99092087663273
Iteration 1 complete. Error: 100.99092087663273 Total: 9.8435; Orientation: 0.0159; Line Search: 7.4539
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/79301b0b-1f12-4011-aaad-9fe8f399810f.jpg)
Adding measurement 6bc94e4 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=100.99092087663273;dx=-1.3068846735738126E-4
New Minimum: 100.99092087663273 > 84.88088580195829
END: th(187148.86177126726)=84.88088580195829; dx=-7.058557149775403E-5 evalInputDelta=16.110035074674443
Fitness changed from 100.99092087663273 to 84.88088580195829
Iteration 2 complete. Error: 84.88088580195829 Total: 2.3955; Orientation: 0.0165; Line Search: 1.6885
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/ba7ac61c-a402-422f-97fe-d2c3848cba65.jpg)
Adding measurement 3cee89dc to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=84.88088580195829;dx=-1.057243963296947E-4
New Minimum: 84.88088580195829 > 78.29105086870794
END: th(403200.00000000006)=78.29105086870794; dx=-5.586324377525785E-6 evalInputDelta=6.589834933250344
Fitness changed from 84.88088580195829 to 78.29105086870794
Iteration 3 complete. Error: 78.29105086870794 Total: 2.6231; Orientation: 0.0157; Line Search: 1.6028
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/7da35220-4ae7-479d-91f7-f9c30114854d.jpg)
Adding measurement 33ea3906 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.761e+03, gradient 1.083e-02, dot -0.368; [cc76739b-3e68-4c66-910f-b534fb65366e = 1.000/1.000e+00]
Orientation rejected. Popping history element from 78.29105086870794, 84.88088580195829, 100.99092087663273, 112.57023329277166
LBFGS Accumulation History: 3 points
Removed measurement 33ea3906 to history. Total: 3
th(0)=78.29105086870794;dx=-1.1719464579102426E-4
Armijo: th(868668.0670208557)=135.0509814374728; dx=7.43233176091309E-5 evalInputDelta=-56.75993056876487
Armijo: th(434334.03351042786)=81.1038691736214; dx=2.32329505020816E-5 evalInputDelta=-2.8128183049134634
New Minimum: 78.29105086870794 > 69.27072999944926
END: th(144778.01117014262)=69.27072999944926; dx=-5.376894155759248E-5 evalInputDelta=9.020320869258683
Fitness changed from 78.29105086870794 to 69.27072999944926
Iteration 4 complete. Error: 69.27072999944926 Total: 4.2203; Orientation: 0.3325; Line Search: 3.1791
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/076e41ce-2059-42a6-8746-44ed01ade449.jpg)
Adding measurement e8a824e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.492e+03, gradient 8.839e-03, dot -0.326; [cc76739b-3e68-4c66-910f-b534fb65366e = 1.000/1.000e+00]
Orientation rejected. Popping history element from 69.27072999944926, 84.88088580195829, 100.99092087663273, 112.57023329277166
LBFGS Accumulation History: 3 points
Removed measurement e8a824e to history. Total: 3
th(0)=69.27072999944926;dx=-7.806126693440818E-5
New Minimum: 69.27072999944926 > 66.55912023555359
END: th(311914.76961877884)=66.55912023555359; dx=-8.532855218852439E-6 evalInputDelta=2.711609763895666
Fitness changed from 69.27072999944926 to 66.55912023555359
Iteration 5 complete. Error: 66.55912023555359 Total: 2.8050; Orientation: 0.3121; Line Search: 1.6747
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/91e0e219-dc3e-4919-b553-100f1bfeec16.jpg)
Adding measurement 5c7e3a3d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.477e+03, gradient 9.575e-03, dot -0.289; [cc76739b-3e68-4c66-910f-b534fb65366e = 1.000/1.000e+00]
Orientation rejected. Popping history element from 66.55912023555359, 84.88088580195829, 100.99092087663273, 112.57023329277166
LBFGS Accumulation History: 3 points
Removed measurement 5c7e3a3d to history. Total: 3
th(0)=66.55912023555359;dx=-9.159670963993787E-5
Armijo: th(672000.0000000002)=95.73837416540862; dx=4.645444781107349E-5 evalInputDelta=-29.179253929855022
Armijo: th(336000.0000000001)=67.74539952234267; dx=1.087060275338473E-5 evalInputDelta=-1.1862792867890732
New Minimum: 66.55912023555359 > 61.42273114221355
END: th(112000.00000000004)=61.42273114221355; dx=-4.337160500815568E-5 evalInputDelta=5.136389093340043
Fitness changed from 66.55912023555359 to 61.42273114221355
Iteration 6 complete. Error: 61.42273114221355 Total: 4.3760; Orientation: 0.3149; Line Search: 3.3699
Adding measurement 7742f9a5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.101e+03, gradient 7.695e-03, dot -0.320; [cc76739b-3e68-4c66-910f-b534fb65366e = 1.000/1.000e+00]
Orientation rejected. Popping history element from 61.42273114221355, 84.88088580195829, 100.99092087663273, 112.57023329277166
LBFGS Accumulation History: 3 points
Removed measurement 7742f9a5 to history. Total: 3
th(0)=61.42273114221355;dx=-5.914345920307899E-5
New Minimum: 61.42273114221355 > 59.395748881682344
END: th(241296.68528357107)=59.395748881682344; dx=-1.2947138365235427E-5 evalInputDelta=2.026982260531206
Fitness changed from 61.42273114221355 to 59.395748881682344
Iteration 7 complete. Error: 59.395748881682344 Total: 2.7241; Orientation: 0.3116; Line Search: 1.7249
Adding measurement 284cee30 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.784e+03, gradient 8.229e-03, dot -0.294; [cc76739b-3e68-4c66-910f-b534fb65366e = 1.000/1.000e+00]
Orientation rejected. Popping history element from 59.395748881682344, 84.88088580195829, 100.99092087663273, 112.57023329277166
LBFGS Accumulation History: 3 points
Removed measurement 284cee30 to history. Total: 3
th(0)=59.395748881682344;dx=-6.765064979875895E-5
Armijo: th(519857.9493646315)=73.97347241377153; dx=2.4579055300154663E-5 evalInputDelta=-14.577723532089188
Armijo: th(259928.97468231575)=59.75523552980708; dx=1.2043473292889806E-6 evalInputDelta=-0.3594866481247365
New Minimum: 59.395748881682344 > 56.691631828358055
END: th(86642.99156077192)=56.691631828358055; dx=-3.562614889311284E-5 evalInputDelta=2.704117053324289
Fitness changed from 59.395748881682344 to 56.691631828358055
Iteration 8 complete. Error: 56.691631828358055 Total: 4.2079; Orientation: 0.2951; Line Search: 3.1178
Adding measurement 74f79db9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.255e+03, gradient 6.725e-03, dot -0.326; [cc76739b-3e68-4c66-910f-b534fb65366e = 1.000/1.000e+00]
Orientation rejected. Popping history element from 56.691631828358055, 84.88088580195829, 100.99092087663273, 112.57023329277166
LBFGS Accumulation History: 3 points
Removed measurement 74f79db9 to history. Total: 3
th(0)=56.691631828358055;dx=-4.514373675746882E-5
New Minimum: 56.691631828358055 > 55.272512046032006
END: th(186666.66666666677)=55.272512046032006; dx=-1.5070497415603794E-5 evalInputDelta=1.4191197823260495
Fitness changed from 56.691631828358055 to 55.272512046032006
Iteration 9 complete. Error: 55.272512046032006 Total: 2.8051; Orientation: 0.3100; Line Search: 1.8018
Adding measurement 62bd4eaf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.411e+03, gradient 7.226e-03, dot -0.304; [cc76739b-3e68-4c66-910f-b534fb65366e = 1.000/1.000e+00]
Orientation rejected. Popping history element from 55.272512046032006, 84.88088580195829, 100.99092087663273, 112.57023329277166
LBFGS Accumulation History: 3 points
Removed measurement 62bd4eaf to history. Total: 3
th(0)=55.272512046032006;dx=-5.205892410727548E-5
Armijo: th(402161.1421392852)=62.12621092762763; dx=1.0395446871813509E-5 evalInputDelta=-6.853698881595626
New Minimum: 55.272512046032006 > 54.994664063555874
END: th(201080.5710696426)=54.994664063555874; dx=-4.96069696206097E-6 evalInputDelta=0.27784798247613196
Fitness changed from 55.272512046032006 to 54.994664063555874
Iteration 10 complete. Error: 54.994664063555874 Total: 3.1247; Orientation: 0.3007; Line Search: 2.1381
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/f05ed2db-6db4-471e-b356-5fed8689828d.jpg)
Adding measurement 2d16cf46 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.206e+03, gradient 7.746e-03, dot -0.282; [cc76739b-3e68-4c66-910f-b534fb65366e = 1.000/1.000e+00]
Orientation rejected. Popping history element from 54.994664063555874, 84.88088580195829, 100.99092087663273, 112.57023329277166
LBFGS Accumulation History: 3 points
Removed measurement 2d16cf46 to history. Total: 3
th(0)=54.994664063555874;dx=-5.992902901106405E-5
Armijo: th(433214.95780385967)=65.77379395884016; dx=2.2151979883705062E-5 evalInputDelta=-10.779129895284285
Armijo: th(216607.47890192983)=55.19010328315831; dx=4.0623089156914934E-6 evalInputDelta=-0.19543921960243438
New Minimum: 54.994664063555874 > 52.870297814372904
END: th(72202.49296730994)=52.870297814372904; dx=-3.1339183785291435E-5 evalInputDelta=2.1243662491829696
Fitness changed from 54.994664063555874 to 52.870297814372904
Iteration 11 complete. Error: 52.870297814372904 Total: 4.5061; Orientation: 0.3067; Line Search: 3.3849
Adding measurement 220e59c4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.547e+03, gradient 6.131e-03, dot -0.320; [cc76739b-3e68-4c66-910f-b534fb65366e = 1.000/1.000e+00]
Orientation rejected. Popping history element from 52.870297814372904, 84.88088580195829, 100.99092087663273, 112.57023329277166
LBFGS Accumulation History: 3 points
Removed measurement 220e59c4 to history. Total: 3
th(0)=52.870297814372904;dx=-3.7555544460722704E-5
New Minimum: 52.870297814372904 > 51.75286383210562
END: th(155555.55555555565)=51.75286383210562; dx=-1.3378853911024719E-5 evalInputDelta=1.1174339822672863
Fitness changed from 52.870297814372904 to 51.75286383210562
Iteration 12 complete. Error: 51.75286383210562 Total: 2.8053; Orientation: 0.3221; Line Search: 1.7092
Adding measurement 1f78dbe0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.541e+03, gradient 6.397e-03, dot -0.305; [cc76739b-3e68-4c66-910f-b534fb65366e = 1.000/1.000e+00]
Orientation rejected. Popping history element from 51.75286383210562, 84.88088580195829, 100.99092087663273, 112.57023329277166
LBFGS Accumulation History: 3 points
Removed measurement 1f78dbe0 to history. Total: 3
th(0)=51.75286383210562;dx=-4.0869983603725566E-5
Armijo: th(335134.285116071)=55.964686754365545; dx=6.406256538621014E-6 evalInputDelta=-4.211822922259927
New Minimum: 51.75286383210562 > 51.459735331043866
END: th(167567.1425580355)=51.459735331043866; dx=-6.069784344723297E-6 evalInputDelta=0.2931285010617515
Fitness changed from 51.75286383210562 to 51.459735331043866
Iteration 13 complete. Error: 51.459735331043866 Total: 3.3828; Orientation: 0.3087; Line Search: 2.2912
Adding measurement 4791e6cf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.540e+03, gradient 7.006e-03, dot -0.283; [cc76739b-3e68-4c66-910f-b534fb65366e = 1.000/1.000e+00]
Orientation rejected. Popping history element from 51.459735331043866, 84.88088580195829, 100.99092087663273, 112.57023329277166
LBFGS Accumulation History: 3 points
Removed measurement 4791e6cf to history. Total: 3
th(0)=51.459735331043866;dx=-4.901682931515628E-5
Armijo: th(361012.4648365497)=58.53561440006379; dx=1.5073395876029707E-5 evalInputDelta=-7.075879069019926
Armijo: th(180506.23241827486)=51.697941541068815; dx=2.5163866630968732E-6 evalInputDelta=-0.23820621002494846
New Minimum: 51.459735331043866 > 50.143128378776645
END: th(60168.744139424954)=50.143128378776645; dx=-2.6347534607252785E-5 evalInputDelta=1.3166069522672217
Fitness changed from 51.459735331043866 to 50.143128378776645
Iteration 14 complete. Error: 50.143128378776645 Total: 4.3743; Orientation: 0.2947; Line Search: 3.0881
Adding measurement 2259d652 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.499e+03, gradient 5.620e-03, dot -0.318; [cc76739b-3e68-4c66-910f-b534fb65366e = 1.000/1.000e+00]
Orientation rejected. Popping history element from 50.143128378776645, 84.88088580195829, 100.99092087663273, 112.57023329277166
LBFGS Accumulation History: 3 points
Removed measurement 2259d652 to history. Total: 3
th(0)=50.143128378776645;dx=-3.154120207561597E-5
New Minimum: 50.143128378776645 > 49.49433877275236
END: th(129629.62962962972)=49.49433877275236; dx=-1.25467536639917E-5 evalInputDelta=0.6487896060242875
Fitness changed from 50.143128378776645 to 49.49433877275236
Iteration 15 complete. Error: 49.49433877275236 Total: 2.7952; Orientation: 0.3123; Line Search: 1.8022
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/d3beac22-5292-49d1-bf97-992189f31dd4.jpg)
Final threshold in iteration 16: 49.49433877275236 (> -Infinity) after 57.012s (< 5400.000s)
Returns
49.49433877275236