BasicOptimizer.scala:89 executed in 58.19 seconds (1.456 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: 211111210021900
Reset training subject: 211111991974200
Adding measurement 7f2be91d to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=9.452824916412375;dx=-0.0010908696757654997
New Minimum: 9.452824916412375 > 9.451346931326285
WOLFE (weak): th(2.154434690031884)=9.451346931326285; dx=-0.0010899924298838023 evalInputDelta=0.0014779850860904276
New Minimum: 9.451346931326285 > 9.449870437503412
WOLFE (weak): th(4.308869380063768)=9.449870437503412; dx=-0.0010905400236961677 evalInputDelta=0.002954478908963054
New Minimum: 9.449870437503412 > 9.44395132864593
WOLFE (weak): th(12.926608140191302)=9.44395132864593; dx=-0.0010903284863702767 evalInputDelta=0.008873587766444757
New Minimum: 9.44395132864593 > 9.417269995124393
WOLFE (weak): th(51.70643256076521)=9.417269995124393; dx=-0.001093836064803809 evalInputDelta=0.03555492128798221
New Minimum: 9.417269995124393 > 9.270575007706901
WOLFE (weak): th(258.53216280382605)=9.270575007706901; dx=-0.0011199906155324553 evalInputDelta=0.18224990870547408
New Minimum: 9.270575007706901 > 8.25055477793321
WOLFE (weak): th(1551.1929768229563)=8.25055477793321; dx=-0.0011829523663884705 evalInputDelta=1.2022701384791645
New Minimum: 8.25055477793321 > 1.0758657968492393
END: th(10858.350837760694)=1.0758657968492393; dx=-6.868258729377105E-4 evalInputDelta=8.376959119563136
Fitness changed from 9.452824916412375 to 1.0758657968492393
Iteration 1 complete. Error: 1.0758657968492393 Total: 8.4445; Orientation: 0.0158; Line Search: 6.2045
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/eb5db771-3b9c-4d51-be0e-7e192be36e47.jpg)
Adding measurement 7d943e4c to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=1.0758657968492393;dx=-0.0015058231554931998
New Minimum: 1.0758657968492393 > -15.226024734998202
END: th(23393.607721408407)=-15.226024734998202; dx=-5.07686146741153E-4 evalInputDelta=16.30189053184744
Fitness changed from 1.0758657968492393 to -15.226024734998202
Iteration 2 complete. Error: -15.226024734998202 Total: 2.2132; Orientation: 0.0158; Line Search: 1.4876
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/4aefeeed-f716-4b1f-9909-b67053a63107.jpg)
Adding measurement 1a99190 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-15.226024734998202;dx=-0.0018708779392446941
New Minimum: -15.226024734998202 > -32.953948669307294
END: th(50400.00000000001)=-32.953948669307294; dx=-3.092151873839686E-4 evalInputDelta=17.727923934309093
Fitness changed from -15.226024734998202 to -32.953948669307294
Iteration 3 complete. Error: -32.953948669307294 Total: 2.2675; Orientation: 0.0161; Line Search: 1.5566
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/b59d9266-f51e-4ea0-b5bb-122dc9ba92ce.jpg)
Adding measurement 16d01f6e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.854e+03, gradient 5.053e-02, dot -0.135; [9d31e89b-6a87-4666-aa39-3bdb6fc6f184 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -32.953948669307294, -15.226024734998202, 1.0758657968492393, 9.452824916412375
LBFGS Accumulation History: 3 points
Removed measurement 16d01f6e to history. Total: 3
th(0)=-32.953948669307294;dx=-0.002552154519109727
New Minimum: -32.953948669307294 > -37.11435225316053
END: th(108583.50837760697)=-37.11435225316053; dx=-1.0502556450130713E-4 evalInputDelta=4.160403583853238
Fitness changed from -32.953948669307294 to -37.11435225316053
Iteration 4 complete. Error: -37.11435225316053 Total: 2.7766; Orientation: 0.4771; Line Search: 1.5590
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/ad4c9b78-a7bb-4104-824a-ec6972cb5cc5.jpg)
Adding measurement 1c5e4e4b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.384e+03, gradient 4.802e-02, dot -0.099; [9d31e89b-6a87-4666-aa39-3bdb6fc6f184 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -37.11435225316053, -15.226024734998202, 1.0758657968492393, 9.452824916412375
LBFGS Accumulation History: 3 points
Removed measurement 1c5e4e4b to history. Total: 3
th(0)=-37.11435225316053;dx=-0.002303690959777317
Armijo: th(233936.07721408413)=-26.29722219598621; dx=-8.586569872589812E-6 evalInputDelta=-10.817130057174325
New Minimum: -37.11435225316053 > -50.43834901141979
END: th(116968.03860704206)=-50.43834901141979; dx=-1.501094613886825E-4 evalInputDelta=13.323996758259256
Fitness changed from -37.11435225316053 to -50.43834901141979
Iteration 5 complete. Error: -50.43834901141979 Total: 3.2817; Orientation: 0.2954; Line Search: 2.2233
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/b9974f66-76be-4eab-9e8c-2372b26f2c45.jpg)
Adding measurement 1921d6e0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.549e+03, gradient 4.184e-02, dot -0.091; [9d31e89b-6a87-4666-aa39-3bdb6fc6f184 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -50.43834901141979, -15.226024734998202, 1.0758657968492393, 9.452824916412375
LBFGS Accumulation History: 3 points
Removed measurement 1921d6e0 to history. Total: 3
th(0)=-50.43834901141979;dx=-0.0017489233908879584
Armijo: th(252000.0000000001)=-44.450013915796234; dx=-1.767126561447626E-5 evalInputDelta=-5.988335095623555
New Minimum: -50.43834901141979 > -77.14758719110128
END: th(126000.00000000004)=-77.14758719110128; dx=-2.833313688528118E-4 evalInputDelta=26.709238179681492
Fitness changed from -50.43834901141979 to -77.14758719110128
Iteration 6 complete. Error: -77.14758719110128 Total: 3.5732; Orientation: 0.3102; Line Search: 2.5111
Adding measurement 3470b215 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.142e+04, gradient 4.261e-02, dot -0.097; [9d31e89b-6a87-4666-aa39-3bdb6fc6f184 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -77.14758719110128, -15.226024734998202, 1.0758657968492393, 9.452824916412375
LBFGS Accumulation History: 3 points
Removed measurement 3470b215 to history. Total: 3
th(0)=-77.14758719110128;dx=-0.0018132947026211926
Armijo: th(271458.77094401745)=-57.982827123039684; dx=6.0412312136721066E-6 evalInputDelta=-19.164760068061597
New Minimum: -77.14758719110128 > -101.2205311773867
END: th(135729.38547200873)=-101.2205311773867; dx=-2.5801267311992466E-4 evalInputDelta=24.072943986285424
Fitness changed from -77.14758719110128 to -101.2205311773867
Iteration 7 complete. Error: -101.2205311773867 Total: 3.3067; Orientation: 0.3031; Line Search: 2.2933
Adding measurement 6ea8533e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.090e+04, gradient 4.165e-02, dot -0.104; [9d31e89b-6a87-4666-aa39-3bdb6fc6f184 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -101.2205311773867, -15.226024734998202, 1.0758657968492393, 9.452824916412375
LBFGS Accumulation History: 3 points
Removed measurement 6ea8533e to history. Total: 3
th(0)=-101.2205311773867;dx=-0.0017327223369160952
Armijo: th(292420.0965176052)=-71.79212198147744; dx=1.1608283209384953E-5 evalInputDelta=-29.428409195909268
New Minimum: -101.2205311773867 > -123.08481662811445
END: th(146210.0482588026)=-123.08481662811445; dx=-2.7278686954499575E-4 evalInputDelta=21.86428545072775
Fitness changed from -101.2205311773867 to -123.08481662811445
Iteration 8 complete. Error: -123.08481662811445 Total: 3.2685; Orientation: 0.3258; Line Search: 2.2516
Adding measurement 5c8a886e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.705e+04, gradient 4.176e-02, dot -0.108; [9d31e89b-6a87-4666-aa39-3bdb6fc6f184 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -123.08481662811445, -15.226024734998202, 1.0758657968492393, 9.452824916412375
LBFGS Accumulation History: 3 points
Removed measurement 5c8a886e to history. Total: 3
th(0)=-123.08481662811445;dx=-0.0017421060780051687
Armijo: th(315000.0000000001)=-85.30900216785356; dx=1.3842215512454239E-5 evalInputDelta=-37.77581446026089
New Minimum: -123.08481662811445 > -143.03854513699753
END: th(157500.00000000006)=-143.03854513699753; dx=-2.661371410915262E-4 evalInputDelta=19.953728508883074
Fitness changed from -123.08481662811445 to -143.03854513699753
Iteration 9 complete. Error: -143.03854513699753 Total: 3.4216; Orientation: 0.2761; Line Search: 2.1551
Adding measurement 6066f552 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.034e+05, gradient 4.153e-02, dot -0.116; [9d31e89b-6a87-4666-aa39-3bdb6fc6f184 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -143.03854513699753, -15.226024734998202, 1.0758657968492393, 9.452824916412375
LBFGS Accumulation History: 3 points
Removed measurement 6066f552 to history. Total: 3
th(0)=-143.03854513699753;dx=-0.001723624188545625
Armijo: th(339323.4636800218)=-93.2810209552624; dx=3.8494592773508353E-5 evalInputDelta=-49.75752418173512
New Minimum: -143.03854513699753 > -158.04517464118237
END: th(169661.7318400109)=-158.04517464118237; dx=-2.3624748331601013E-4 evalInputDelta=15.006629504184843
Fitness changed from -143.03854513699753 to -158.04517464118237
Iteration 10 complete. Error: -158.04517464118237 Total: 3.2647; Orientation: 0.2908; Line Search: 2.2850
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/fc7ebd52-4339-45df-821a-bd559c181d49.jpg)
Adding measurement 7ea5b703 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.206e+05, gradient 4.155e-02, dot -0.112; [9d31e89b-6a87-4666-aa39-3bdb6fc6f184 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -158.04517464118237, -15.226024734998202, 1.0758657968492393, 9.452824916412375
LBFGS Accumulation History: 3 points
Removed measurement 7ea5b703 to history. Total: 3
th(0)=-158.04517464118237;dx=-0.0017252816457882245
Armijo: th(365525.1206470065)=-96.69809151642559; dx=4.494895469130465E-5 evalInputDelta=-61.34708312475678
New Minimum: -158.04517464118237 > -169.6033516449312
END: th(182762.56032350325)=-169.6033516449312; dx=-2.1246899531977462E-4 evalInputDelta=11.558177003748824
Fitness changed from -158.04517464118237 to -169.6033516449312
Iteration 11 complete. Error: -169.6033516449312 Total: 3.5452; Orientation: 0.3061; Line Search: 2.5260
Adding measurement 126a9e44 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 3.771e+04, gradient 4.123e-02, dot 0.141; [9d31e89b-6a87-4666-aa39-3bdb6fc6f184 = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-169.6033516449312;dx=-219.3235153674069
Armijo: th(393750.0000000002)=282.21366065400497; dx=7.462009080220733E-4 evalInputDelta=-451.81701229893616
Armijo: th(196875.0000000001)=282.2147725165432; dx=0.0014918209920927099 evalInputDelta=-451.8181241614744
Armijo: th(65625.00000000003)=282.20742314041536; dx=0.004479396556059352 evalInputDelta=-451.81077478534655
Armijo: th(16406.250000000007)=282.1436246044984; dx=0.01790740705559562 evalInputDelta=-451.7469762494296
Armijo: th(3281.2500000000014)=281.9794865793963; dx=0.08954966914996934 evalInputDelta=-451.5828382243275
Armijo: th(546.8750000000002)=280.8180723103919; dx=0.5370705921090115 evalInputDelta=-450.4214239553231
Armijo: th(78.12500000000003)=273.59713699700956; dx=3.741826475013986 evalInputDelta=-443.20048864194075
Armijo: th(9.765625000000004)=191.1184484494599; dx=25.18932194478237 evalInputDelta=-360.7218000943911
Armijo: th(1.0850694444444449)=-45.265453739170084; dx=67.24979298620036 evalInputDelta=-124.33789790576111
Armijo: th(0.10850694444444449)=-161.70737616303404; dx=-19.2739069853273 evalInputDelta=-7.895975481897153
Armijo: th(0.009864267676767681)=-169.32587065830998; dx=-78.77715624582243 evalInputDelta=-0.2774809866212138
Armijo: th(8.220223063973068E-4)=-169.58413273811334; dx=-86.08900200807801 evalInputDelta=-0.019218906817854986
Armijo: th(6.323248510748514E-5)=-169.60189086413757; dx=-86.96993000913491 evalInputDelta=-0.0014607807936215522
Armijo: th(4.516606079106081E-6)=-169.60324712873683; dx=-87.2990723381317 evalInputDelta=-1.0451619436935289E-4
Armijo: th(3.011070719404054E-7)=-169.60334690081183; dx=-87.2437193314575 evalInputDelta=-4.744119365795996E-6
Armijo: th(1.8819191996275338E-8)=-169.6033516449312; dx=-86.97781482592868 evalInputDelta=0.0
Armijo: th(1.1070112938985492E-9)=-169.6033516449312; dx=-87.00927060148436 evalInputDelta=0.0
MIN ALPHA (6.150062743880829E-11): th(0.0)=-169.6033516449312
Fitness changed from -169.6033516449312 to -169.6033516449312
Static Iteration Total: 15.7334; Orientation: 0.2777; Line Search: 14.7754
Iteration 12 failed. Error: -169.6033516449312
Previous Error: 0.0 -> -169.6033516449312
Retrying iteration 12
Reset training subject: 211166307012300
Adding measurement 4bcf3188 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-169.6033516449312;dx=-0.0016992031244252726
END: th(2.1544346900318838E-10)=-169.6033516449312; dx=-0.0013182197949043995 evalInputDelta=0.0
Fitness changed from -169.6033516449312 to -169.6033516449312
Static Iteration Total: 3.0952; Orientation: 0.0152; Line Search: 1.7303
Iteration 13 failed. Error: -169.6033516449312
Previous Error: 0.0 -> -169.6033516449312
Optimization terminated 13
Final threshold in iteration 13: -169.6033516449312 (> -Infinity) after 58.193s (< 5400.000s)
Returns
-169.6033516449312