BasicOptimizer.scala:89 executed in 197.77 seconds (2.022 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: 4250117379820
Reset training subject: 4254413774664
Adding measurement 74e34f06 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.12239310145378113;dx=-6.29830597028466E-7
New Minimum: -0.12239310145378113 > -0.12239329516887665
WOLFE (weak): th(2.154434690031884)=-0.12239329516887665; dx=-6.079426470366928E-7 evalInputDelta=1.9371509552001953E-7
New Minimum: -0.12239329516887665 > -0.12239396572113037
WOLFE (weak): th(4.308869380063768)=-0.12239396572113037; dx=-6.079449504685276E-7 evalInputDelta=8.642673492431641E-7
New Minimum: -0.12239396572113037 > -0.12239693105220795
WOLFE (weak): th(12.926608140191302)=-0.12239693105220795; dx=-6.079442468387581E-7 evalInputDelta=3.829598426818848E-6
New Minimum: -0.12239693105220795 > -0.12240894138813019
WOLFE (weak): th(51.70643256076521)=-0.12240894138813019; dx=-6.079330028462876E-7 evalInputDelta=1.583993434906006E-5
New Minimum: -0.12240894138813019 > -0.12247167527675629
WOLFE (weak): th(258.53216280382605)=-0.12247167527675629; dx=-6.078839479339919E-7 evalInputDelta=7.857382297515869E-5
New Minimum: -0.12247167527675629 > -0.1228644847869873
WOLFE (weak): th(1551.1929768229563)=-0.1228644847869873; dx=-6.07626572452713E-7 evalInputDelta=4.7138333320617676E-4
New Minimum: -0.1228644847869873 > -0.12568771839141846
WOLFE (weak): th(10858.350837760694)=-0.12568771839141846; dx=-6.05774083895526E-7 evalInputDelta=0.003294616937637329
New Minimum: -0.12568771839141846 > -0.14843223989009857
WOLFE (weak): th(86866.80670208555)=-0.14843223989009857; dx=-5.909332904279608E-7 evalInputDelta=0.026039138436317444
New Minimum: -0.14843223989009857 > -0.32946985960006714
END: th(781801.26031877)=-0.32946985960006714; dx=-4.501798216197635E-7 evalInputDelta=0.207076758146286
Fitness changed from -0.12239310145378113 to -0.32946985960006714
Iteration 1 complete. Error: -0.32946985960006714 Total: 55.3399; Orientation: 0.0429; Line Search: 42.4785
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/c76f4c0d-2304-4938-a9ab-29bb2d75170e.jpg)
Adding measurement 17ae2e1d to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.32946985960006714;dx=-3.995694843837285E-7
New Minimum: -0.32946985960006714 > -0.6029535531997681
END: th(1684339.7559414052)=-0.6029535531997681; dx=-2.5613836303589303E-7 evalInputDelta=0.2734836935997009
Fitness changed from -0.32946985960006714 to -0.6029535531997681
Iteration 2 complete. Error: -0.6029535531997681 Total: 12.9842; Orientation: 0.0434; Line Search: 8.6505
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/1a1397e2-69ac-4976-938b-5d50886666c6.jpg)
Adding measurement 51519de8 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.6029535531997681;dx=-2.41419998865834E-7
New Minimum: -0.6029535531997681 > -0.9213769137859344
END: th(3628800.0)=-0.9213769137859344; dx=-1.2551723612799132E-7 evalInputDelta=0.3184233605861664
Fitness changed from -0.6029535531997681 to -0.9213769137859344
Iteration 3 complete. Error: -0.9213769137859344 Total: 12.4821; Orientation: 0.0435; Line Search: 8.2465
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/e7a2fb12-9776-4132-9e8e-dbd72bd80e55.jpg)
Adding measurement 5f270c02 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.306e+03, gradient 3.994e-04, dot -0.787; [332e19d2-35bc-4aac-85b8-cdcfe1c909af = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.9213769137859344, -0.6029535531997681, -0.32946985960006714, -0.12239310145378113
LBFGS Accumulation History: 3 points
Removed measurement 5f270c02 to history. Total: 3
th(0)=-0.9213769137859344;dx=-1.595513805895425E-7
New Minimum: -0.9213769137859344 > -1.2397378385066986
END: th(7818012.6031877)=-1.2397378385066986; dx=-3.9584890456557315E-8 evalInputDelta=0.31836092472076416
Fitness changed from -0.9213769137859344 to -1.2397378385066986
Iteration 4 complete. Error: -1.2397378385066986 Total: 14.0489; Orientation: 0.9812; Line Search: 8.8222
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/68fc85cd-f536-4a06-87ac-f3aa261536ac.jpg)
Adding measurement fb077c3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.826e+03, gradient 3.726e-04, dot -0.557; [332e19d2-35bc-4aac-85b8-cdcfe1c909af = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.2397378385066986, -0.6029535531997681, -0.32946985960006714, -0.12239310145378113
LBFGS Accumulation History: 3 points
Removed measurement fb077c3 to history. Total: 3
th(0)=-1.2397378385066986;dx=-1.388621731539293E-7
New Minimum: -1.2397378385066986 > -1.3759973496198654
WOLF (strong): th(1.684339755941405E7)=-1.3759973496198654; dx=2.2388740464616603E-8 evalInputDelta=0.1362595111131668
New Minimum: -1.3759973496198654 > -1.4415227323770523
WOLF (strong): th(8421698.779707026)=-1.4415227323770523; dx=3.544034041914846E-9 evalInputDelta=0.2017848938703537
END: th(2807232.9265690087)=-1.3786767572164536; dx=-6.264748155735172E-8 evalInputDelta=0.13893891870975494
Fitness changed from -1.2397378385066986 to -1.4415227323770523
Iteration 5 complete. Error: -1.4415227323770523 Total: 22.2373; Orientation: 0.9820; Line Search: 16.6684
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/4eaf6839-c10c-412f-851d-6bb734bd2d6c.jpg)
Adding measurement 28789556 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.794e+03, gradient 3.475e-04, dot -0.468; [332e19d2-35bc-4aac-85b8-cdcfe1c909af = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.4415227323770523, -0.6029535531997681, -0.32946985960006714, -0.12239310145378113
LBFGS Accumulation History: 3 points
Removed measurement 28789556 to history. Total: 3
th(0)=-1.4415227323770523;dx=-1.2074716941535763E-7
New Minimum: -1.4415227323770523 > -1.6192740499973297
END: th(6048000.0)=-1.6192740499973297; dx=-1.4157474057122348E-8 evalInputDelta=0.1777513176202774
Fitness changed from -1.4415227323770523 to -1.6192740499973297
Iteration 6 complete. Error: -1.6192740499973297 Total: 13.3684; Orientation: 0.9911; Line Search: 8.3719
Adding measurement 5210feef to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.044e+03, gradient 2.350e-04, dot -0.569; [332e19d2-35bc-4aac-85b8-cdcfe1c909af = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.6192740499973297, -0.6029535531997681, -0.32946985960006714, -0.12239310145378113
LBFGS Accumulation History: 3 points
Removed measurement 5210feef to history. Total: 3
th(0)=-1.6192740499973297;dx=-5.521359356058667E-8
New Minimum: -1.6192740499973297 > -1.745936542749405
WOLF (strong): th(1.3030021005312834E7)=-1.745936542749405; dx=7.79138642142426E-9 evalInputDelta=0.1266624927520752
END: th(6515010.502656417)=-1.733029544353485; dx=-1.7640930792708228E-8 evalInputDelta=0.1137554943561554
Fitness changed from -1.6192740499973297 to -1.745936542749405
Iteration 7 complete. Error: -1.745936542749405 Total: 18.8384; Orientation: 1.1058; Line Search: 12.6946
Adding measurement 43a276ae to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.620e+03, gradient 2.935e-04, dot -0.387; [332e19d2-35bc-4aac-85b8-cdcfe1c909af = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.745936542749405, -0.6029535531997681, -0.32946985960006714, -0.12239310145378113
LBFGS Accumulation History: 3 points
Removed measurement 43a276ae to history. Total: 3
th(0)=-1.745936542749405;dx=-8.616505400811726E-8
New Minimum: -1.745936542749405 > -1.7640389204025269
WOLF (strong): th(1.4036164632845046E7)=-1.7640389204025269; dx=3.842851400180768E-8 evalInputDelta=0.018102377653121948
New Minimum: -1.7640389204025269 > -1.8575624078512192
WOLF (strong): th(7018082.316422523)=-1.8575624078512192; dx=5.902032603815466E-9 evalInputDelta=0.11162586510181427
END: th(2339360.772140841)=-1.8207187429070473; dx=-4.308582732667849E-8 evalInputDelta=0.07478220015764236
Fitness changed from -1.745936542749405 to -1.8575624078512192
Iteration 8 complete. Error: -1.8575624078512192 Total: 21.7620; Orientation: 1.0207; Line Search: 16.9886
Adding measurement 58af76c1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.813e+03, gradient 1.949e-04, dot -0.479; [332e19d2-35bc-4aac-85b8-cdcfe1c909af = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.8575624078512192, -0.6029535531997681, -0.32946985960006714, -0.12239310145378113
LBFGS Accumulation History: 3 points
Removed measurement 58af76c1 to history. Total: 3
th(0)=-1.8575624078512192;dx=-3.799814483049099E-8
New Minimum: -1.8575624078512192 > -1.9233234375715256
END: th(5040000.000000001)=-1.9233234375715256; dx=-1.5389931724671473E-8 evalInputDelta=0.0657610297203064
Fitness changed from -1.8575624078512192 to -1.9233234375715256
Iteration 9 complete. Error: -1.9233234375715256 Total: 13.6652; Orientation: 1.0108; Line Search: 7.9468
Adding measurement 110d3cd4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.962e+03, gradient 1.441e-04, dot -0.596; [332e19d2-35bc-4aac-85b8-cdcfe1c909af = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.9233234375715256, -0.6029535531997681, -0.32946985960006714, -0.12239310145378113
LBFGS Accumulation History: 3 points
Removed measurement 110d3cd4 to history. Total: 3
th(0)=-1.9233234375715256;dx=-2.0759744528605396E-8
New Minimum: -1.9233234375715256 > -1.994527131319046
END: th(1.0858350837760696E7)=-1.994527131319046; dx=-6.701694445764976E-9 evalInputDelta=0.07120369374752045
Fitness changed from -1.9233234375715256 to -1.994527131319046
Iteration 10 complete. Error: -1.994527131319046 Total: 12.9694; Orientation: 0.9841; Line Search: 8.0969
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/a9827be1-365b-4ab3-a655-b329453acb00.jpg)
Final threshold in iteration 11: -1.994527131319046 (> -Infinity) after 197.766s (< 5400.000s)
Returns
-1.994527131319046