BasicOptimizer.scala:89 executed in 51.71 seconds (1.434 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: 219801697587300
Reset training subject: 219802365775500
Adding measurement 479b6ecc to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-118.50648139579751;dx=-0.06296470408305527
New Minimum: -118.50648139579751 > -118.5906495125398
WOLFE (weak): th(2.154434690031884)=-118.5906495125398; dx=-0.06320607238804513 evalInputDelta=0.08416811674229052
New Minimum: -118.5906495125398 > -118.67538302614909
WOLFE (weak): th(4.308869380063768)=-118.67538302614909; dx=-0.06293878799858109 evalInputDelta=0.16890163035158423
New Minimum: -118.67538302614909 > -119.02070158896316
WOLFE (weak): th(12.926608140191302)=-119.02070158896316; dx=-0.06418920333753189 evalInputDelta=0.5142201931656558
New Minimum: -119.02070158896316 > -120.68659386196562
WOLFE (weak): th(51.70643256076521)=-120.68659386196562; dx=-0.06550079401618494 evalInputDelta=2.1801124661681115
New Minimum: -120.68659386196562 > -130.3749036859167
WOLFE (weak): th(258.53216280382605)=-130.3749036859167; dx=-0.06234304047904474 evalInputDelta=11.868422290119199
New Minimum: -130.3749036859167 > -167.45997035724307
END: th(1551.1929768229563)=-167.45997035724307; dx=-0.03130803478523173 evalInputDelta=48.95348896144556
Fitness changed from -118.50648139579751 to -167.45997035724307
Iteration 1 complete. Error: -167.45997035724307 Total: 6.4990; Orientation: 0.0177; Line Search: 4.5325
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/6f49cc4b-031b-49ad-9969-97c27f14219d.jpg)
Adding measurement 13391386 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-167.45997035724307;dx=-0.07207847239387612
New Minimum: -167.45997035724307 > -249.67846149677683
END: th(3341.943960201201)=-249.67846149677683; dx=-0.025215527729125463 evalInputDelta=82.21849113953377
Fitness changed from -167.45997035724307 to -249.67846149677683
Iteration 2 complete. Error: -249.67846149677683 Total: 2.1015; Orientation: 0.0190; Line Search: 1.2770
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/1890c40c-e08f-4048-9458-effbfbb04068.jpg)
Adding measurement c18a8b5 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-249.67846149677683;dx=-0.09027156066516186
New Minimum: -249.67846149677683 > -351.4298831403243
END: th(7200.000000000001)=-351.4298831403243; dx=-0.011658212425956898 evalInputDelta=101.75142164354747
Fitness changed from -249.67846149677683 to -351.4298831403243
Iteration 3 complete. Error: -351.4298831403243 Total: 1.8589; Orientation: 0.0168; Line Search: 1.2484
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/8016a13d-a9ea-4b27-b7e5-52d471d8bab6.jpg)
Adding measurement 557eabdf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.724e+03, gradient 2.855e-01, dot -0.228; [7c8e20e0-923b-4616-87e7-8a235558408d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -351.4298831403243, -249.67846149677683, -167.45997035724307, -118.50648139579751
LBFGS Accumulation History: 3 points
Removed measurement 557eabdf to history. Total: 3
th(0)=-351.4298831403243;dx=-0.08135464545955237
New Minimum: -351.4298831403243 > -438.807289818745
END: th(15511.929768229566)=-438.807289818745; dx=-0.0033649857693688495 evalInputDelta=87.3774066784207
Fitness changed from -351.4298831403243 to -438.807289818745
Iteration 4 complete. Error: -438.807289818745 Total: 2.1078; Orientation: 0.3128; Line Search: 1.1995
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/eb512530-1277-4852-b222-a130dc8d018e.jpg)
Adding measurement 6a4d474c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.311e+03, gradient 2.692e-01, dot -0.163; [7c8e20e0-923b-4616-87e7-8a235558408d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -438.807289818745, -249.67846149677683, -167.45997035724307, -118.50648139579751
LBFGS Accumulation History: 3 points
Removed measurement 6a4d474c to history. Total: 3
th(0)=-438.807289818745;dx=-0.07244410820270976
New Minimum: -438.807289818745 > -524.7671059907008
END: th(33419.43960201202)=-524.7671059907008; dx=-0.002282632544399324 evalInputDelta=85.95981617195577
Fitness changed from -438.807289818745 to -524.7671059907008
Iteration 5 complete. Error: -524.7671059907008 Total: 2.0912; Orientation: 0.2890; Line Search: 1.2292
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/ca646a61-c16b-45f5-9343-4b3c3280370c.jpg)
Adding measurement 6920d731 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.269e+03, gradient 2.420e-01, dot -0.123; [7c8e20e0-923b-4616-87e7-8a235558408d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -524.7671059907008, -249.67846149677683, -167.45997035724307, -118.50648139579751
LBFGS Accumulation History: 3 points
Removed measurement 6920d731 to history. Total: 3
th(0)=-524.7671059907008;dx=-0.05852209662057269
Armijo: th(72000.00000000003)=-492.69036656047217; dx=7.11579619749771E-5 evalInputDelta=-32.0767394302286
New Minimum: -524.7671059907008 > -774.4305265200873
END: th(36000.000000000015)=-774.4305265200873; dx=-0.005133830216246589 evalInputDelta=249.66342052938649
Fitness changed from -524.7671059907008 to -774.4305265200873
Iteration 6 complete. Error: -774.4305265200873 Total: 2.7187; Orientation: 0.2926; Line Search: 1.8684
Adding measurement 73e9f4bf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.080e+03, gradient 2.281e-01, dot -0.123; [7c8e20e0-923b-4616-87e7-8a235558408d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -774.4305265200873, -249.67846149677683, -167.45997035724307, -118.50648139579751
LBFGS Accumulation History: 3 points
Removed measurement 73e9f4bf to history. Total: 3
th(0)=-774.4305265200873;dx=-0.051949858786198747
New Minimum: -774.4305265200873 > -786.8300470456144
END: th(77559.64884114785)=-786.8300470456144; dx=-1.0216378965026104E-4 evalInputDelta=12.399520525527123
Fitness changed from -774.4305265200873 to -786.8300470456144
Iteration 7 complete. Error: -786.8300470456144 Total: 2.5918; Orientation: 0.3610; Line Search: 1.3418
Adding measurement 1108012f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.744e+04, gradient 2.307e-01, dot -0.097; [7c8e20e0-923b-4616-87e7-8a235558408d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -786.8300470456144, -249.67846149677683, -167.45997035724307, -118.50648139579751
LBFGS Accumulation History: 3 points
Removed measurement 1108012f to history. Total: 3
th(0)=-786.8300470456144;dx=-0.0531827947379753
Armijo: th(167097.19801006012)=-443.9147439908388; dx=5.854204667086477E-4 evalInputDelta=-342.91530305477556
New Minimum: -786.8300470456144 > -1057.8932028485576
END: th(83548.59900503006)=-1057.8932028485576; dx=-0.0020142280850756365 evalInputDelta=271.06315580294324
Fitness changed from -786.8300470456144 to -1057.8932028485576
Iteration 8 complete. Error: -1057.8932028485576 Total: 2.9109; Orientation: 0.3274; Line Search: 1.9694
Adding measurement 29de9bc4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.327e+04, gradient 2.123e-01, dot -0.116; [7c8e20e0-923b-4616-87e7-8a235558408d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1057.8932028485576, -249.67846149677683, -167.45997035724307, -118.50648139579751
LBFGS Accumulation History: 3 points
Removed measurement 29de9bc4 to history. Total: 3
th(0)=-1057.8932028485576;dx=-0.04502724625851941
Armijo: th(180000.0000000001)=-696.6928639260847; dx=8.062393491626858E-4 evalInputDelta=-361.20033892247295
New Minimum: -1057.8932028485576 > -1427.1687273753
END: th(90000.00000000004)=-1427.1687273753; dx=-0.0030167574515003893 evalInputDelta=369.2755245267424
Fitness changed from -1057.8932028485576 to -1427.1687273753
Iteration 9 complete. Error: -1427.1687273753 Total: 3.6098; Orientation: 0.3147; Line Search: 2.7031
Adding measurement 243a0433 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.170e+05, gradient 2.128e-01, dot -0.131; [7c8e20e0-923b-4616-87e7-8a235558408d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1427.1687273753, -249.67846149677683, -167.45997035724307, -118.50648139579751
LBFGS Accumulation History: 3 points
Removed measurement 243a0433 to history. Total: 3
th(0)=-1427.1687273753;dx=-0.045237544120701856
Armijo: th(193899.12210286965)=-871.3458698654524; dx=0.0012051697851524867 evalInputDelta=-555.8228575098476
New Minimum: -1427.1687273753 > -1783.8692322086379
END: th(96949.56105143482)=-1783.8692322086379; dx=-0.0028072690675104797 evalInputDelta=356.70050483333785
Fitness changed from -1427.1687273753 to -1783.8692322086379
Iteration 10 complete. Error: -1783.8692322086379 Total: 2.7765; Orientation: 0.3233; Line Search: 1.8584
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/b41566d6-b1a7-4468-9d82-357520505f48.jpg)
Adding measurement 26f3e194 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 8.008e+04, gradient 2.193e-01, dot 0.153; [7c8e20e0-923b-4616-87e7-8a235558408d = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-1783.8692322086379;dx=-2681.568044449892
Armijo: th(208871.49751257518)=-607.2768412898561; dx=0.003736554746758128 evalInputDelta=-1176.5923909187818
Armijo: th(104435.74875628759)=-607.966109485639; dx=0.007464027701690461 evalInputDelta=-1175.903122722999
Armijo: th(34811.91625209586)=-609.5655772880059; dx=0.022333060514274965 evalInputDelta=-1174.303654920632
Armijo: th(8702.979063023966)=-614.0263487765499; dx=0.08869442547196277 evalInputDelta=-1169.842883432088
Armijo: th(1740.595812604793)=-622.3658518145648; dx=0.4377745003382064 evalInputDelta=-1161.503380394073
Armijo: th(290.09930210079887)=-639.7054007607207; dx=2.5734016907374846 evalInputDelta=-1144.1638314479171
Armijo: th(41.44275744297126)=-694.8331378238081; dx=16.711880388250698 evalInputDelta=-1089.0360943848298
Armijo: th(5.180344680371408)=-890.3797049418704; dx=95.63654600562998 evalInputDelta=-893.4895272667675
Armijo: th(0.5755938533746009)=-1469.0394749645113; dx=159.80472397823135 evalInputDelta=-314.82975724412654
Armijo: th(0.05755938533746009)=-1770.8568174549575; dx=-431.9792614204945 evalInputDelta=-13.012414753680332
Armijo: th(0.005232671394314554)=-1783.770010892256; dx=-676.544508412171 evalInputDelta=-0.09922131638177234
New Minimum: -1783.8692322086379 > -1783.8712465190515
END: th(4.360559495262128E-4)=-1783.8712465190515; dx=-711.79343506106 evalInputDelta=0.0020143104136423062
Fitness changed from -1783.8692322086379 to -1783.8712465190515
Iteration 11 complete. Error: -1783.8712465190515 Total: 8.9078; Orientation: 0.2883; Line Search: 8.0315
Adding measurement 2f13066 to history. Total: 4
Rejected: LBFGS Orientation magnitude: 1.125e+07, gradient 2.193e-01, dot -0.110; [7c8e20e0-923b-4616-87e7-8a235558408d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1783.8712465190515, -1783.8692322086379, -249.67846149677683, -167.45997035724307, -118.50648139579751
Rejected: LBFGS Orientation magnitude: 2.308e+07, gradient 2.193e-01, dot -0.110; [7c8e20e0-923b-4616-87e7-8a235558408d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1783.8712465190515, -1783.8692322086379, -249.67846149677683, -167.45997035724307
LBFGS Accumulation History: 3 points
Removed measurement 2f13066 to history. Total: 4
Removed measurement 26f3e194 to history. Total: 3
th(0)=-1783.8712465190515;dx=-0.04801522615513674
Armijo: th(9.39454064454065E-4)=-1783.8712465190515; dx=-0.036758010697666064 evalInputDelta=0.0
New Minimum: -1783.8712465190515 > -1783.8712926917774
END: th(4.697270322270325E-4)=-1783.8712926917774; dx=-0.03673229999180409 evalInputDelta=4.6172725888027344E-5
Fitness changed from -1783.8712465190515 to -1783.8712926917774
Iteration 12 complete. Error: -1783.8712926917774 Total: 2.9616; Orientation: 0.6289; Line Search: 1.7971
Adding measurement 3dbe52c5 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 8.014e+04, gradient 2.193e-01, dot 0.153; [7c8e20e0-923b-4616-87e7-8a235558408d = 1.000/1.000e+00]
th(0)=-1783.8712926917774;dx=-2681.582126498688
Armijo: th(0.0010119962130756433)=-1783.867943385998; dx=-705.6036955298905 evalInputDelta=-0.0033493057794657943
Armijo: th(5.059981065378217E-4)=-1783.8696493391374; dx=-709.0275970173682 evalInputDelta=-0.001643352640030571
Armijo: th(1.6866603551260722E-4)=-1783.8709019839496; dx=-709.5004171452456 evalInputDelta=-3.9070782781891467E-4
Armijo: th(4.2166508878151805E-5)=-1783.871102118862; dx=-713.6777965159158 evalInputDelta=-1.9057291547142086E-4
Armijo: th(8.43330177563036E-6)=-1783.8712567975206; dx=-713.8628960904134 evalInputDelta=-3.589425682548608E-5
Armijo: th(1.4055502959383934E-6)=-1783.871280603778; dx=-710.7145050763038 evalInputDelta=-1.2087999493815005E-5
Armijo: th(2.007928994197705E-7)=-1783.8712259345752; dx=-705.4422203940679 evalInputDelta=-6.67572021484375E-5
Armijo: th(2.509911242747131E-8)=-1783.871217908822; dx=-647.2772434300197 evalInputDelta=-7.478295538021484E-5
Armijo: th(2.7887902697190345E-9)=-1783.871162199351; dx=-223.6212721422266 evalInputDelta=-1.3049242647866777E-4
Armijo: th(2.788790269719034E-10)=-1783.8712465190515; dx=165.36598603311884 evalInputDelta=-4.6172725888027344E-5
MIN ALPHA (2.5352638815627584E-11): th(0.0)=-1783.8712926917774
Fitness changed from -1783.8712926917774 to -1783.8712926917774
Static Iteration Total: 8.2631; Orientation: 0.2860; Line Search: 7.4383
Iteration 13 failed. Error: -1783.8712926917774
Previous Error: 0.0 -> -1783.8712926917774
Retrying iteration 13
Reset training subject: 219851096340100
Adding measurement 279a2ead to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-1783.8712926917774;dx=-0.048050444023917324
END: th(2.1544346900318838E-10)=-1783.8712926917774; dx=-0.036853045779380394 evalInputDelta=0.0
Fitness changed from -1783.8712926917774 to -1783.8712926917774
Static Iteration Total: 2.3070; Orientation: 0.0153; Line Search: 1.1752
Iteration 14 failed. Error: -1783.8712926917774
Previous Error: 0.0 -> -1783.8712926917774
Optimization terminated 14
Final threshold in iteration 14: -1783.8712926917774 (> -Infinity) after 51.706s (< 5400.000s)
Returns
-1783.8712926917774