BasicOptimizer.scala:89 executed in 212.16 seconds (1.790 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: 8778372289588
Reset training subject: 8783015870780
Adding measurement 4ff26ce4 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=0.038772404193878174;dx=-6.357274565199001E-7
New Minimum: 0.038772404193878174 > 0.03877207636833191
WOLFE (weak): th(2.154434690031884)=0.03877207636833191; dx=-6.084973825773787E-7 evalInputDelta=3.2782554626464844E-7
New Minimum: 0.03877207636833191 > 0.03877130150794983
WOLFE (weak): th(4.308869380063768)=0.03877130150794983; dx=-6.084963387103142E-7 evalInputDelta=1.1026859283447266E-6
New Minimum: 0.03877130150794983 > 0.03876855969429016
WOLFE (weak): th(12.926608140191302)=0.03876855969429016; dx=-6.084954591131652E-7 evalInputDelta=3.844499588012695E-6
New Minimum: 0.03876855969429016 > 0.03875654935836792
WOLFE (weak): th(51.70643256076521)=0.03875654935836792; dx=-6.084865969335333E-7 evalInputDelta=1.5854835510253906E-5
New Minimum: 0.03875654935836792 > 0.038693785667419434
WOLFE (weak): th(258.53216280382605)=0.038693785667419434; dx=-6.084416322666363E-7 evalInputDelta=7.861852645874023E-5
New Minimum: 0.038693785667419434 > 0.03830057382583618
WOLFE (weak): th(1551.1929768229563)=0.03830057382583618; dx=-6.082413694023325E-7 evalInputDelta=4.718303680419922E-4
New Minimum: 0.03830057382583618 > 0.035473257303237915
WOLFE (weak): th(10858.350837760694)=0.035473257303237915; dx=-6.068731923824972E-7 evalInputDelta=0.003299146890640259
New Minimum: 0.035473257303237915 > 0.012653976678848267
WOLFE (weak): th(86866.80670208555)=0.012653976678848267; dx=-5.941918184792037E-7 evalInputDelta=0.026118427515029907
New Minimum: 0.012653976678848267 > -0.17075610160827637
END: th(781801.26031877)=-0.17075610160827637; dx=-4.607022998023591E-7 evalInputDelta=0.20952850580215454
Fitness changed from 0.038772404193878174 to -0.17075610160827637
Iteration 1 complete. Error: -0.17075610160827637 Total: 57.7808; Orientation: 0.0452; Line Search: 44.5195
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/cea3c0b9-1411-4590-b1bf-46a510073db5.jpg)
Adding measurement 4d342f33 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.17075610160827637;dx=-4.074421026115769E-7
New Minimum: -0.17075610160827637 > -0.4507945626974106
END: th(1684339.7559414052)=-0.4507945626974106; dx=-2.6348124005043427E-7 evalInputDelta=0.2800384610891342
Fitness changed from -0.17075610160827637 to -0.4507945626974106
Iteration 2 complete. Error: -0.4507945626974106 Total: 13.0650; Orientation: 0.0457; Line Search: 8.5451
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/58f3e384-8799-49c4-8618-a720a68628f3.jpg)
Adding measurement 55e1a708 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.4507945626974106;dx=-2.432680745480497E-7
New Minimum: -0.4507945626974106 > -0.7745611816644669
END: th(3628800.0)=-0.7745611816644669; dx=-1.2805898458899978E-7 evalInputDelta=0.3237666189670563
Fitness changed from -0.4507945626974106 to -0.7745611816644669
Iteration 3 complete. Error: -0.7745611816644669 Total: 13.4092; Orientation: 0.0448; Line Search: 9.0558
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/3e9cae0f-f086-47d4-86a5-628998dac2a1.jpg)
Adding measurement 69202e05 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.265e+03, gradient 3.883e-04, dot -0.804; [03a5dfbb-b2a1-4b3a-a8f3-3f6d9f29fe38 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.7745611816644669, -0.4507945626974106, -0.17075610160827637, 0.038772404193878174
LBFGS Accumulation History: 3 points
Removed measurement 69202e05 to history. Total: 3
th(0)=-0.7745611816644669;dx=-1.5074171519833617E-7
New Minimum: -0.7745611816644669 > -1.0893081724643707
END: th(7818012.6031877)=-1.0893081724643707; dx=-4.142856699621355E-8 evalInputDelta=0.31474699079990387
Fitness changed from -0.7745611816644669 to -1.0893081724643707
Iteration 4 complete. Error: -1.0893081724643707 Total: 13.8251; Orientation: 1.0265; Line Search: 8.3994
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/b9a5aa51-2bc4-44ea-98ab-c0aef2945079.jpg)
Adding measurement 5990f570 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.704e+03, gradient 3.585e-04, dot -0.583; [03a5dfbb-b2a1-4b3a-a8f3-3f6d9f29fe38 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.0893081724643707, -0.4507945626974106, -0.17075610160827637, 0.038772404193878174
LBFGS Accumulation History: 3 points
Removed measurement 5990f570 to history. Total: 3
th(0)=-1.0893081724643707;dx=-1.2851239033490197E-7
New Minimum: -1.0893081724643707 > -1.250840276479721
WOLF (strong): th(1.684339755941405E7)=-1.250840276479721; dx=1.4351787246004725E-8 evalInputDelta=0.16153210401535034
New Minimum: -1.250840276479721 > -1.2904649823904037
WOLF (strong): th(8421698.779707026)=-1.2904649823904037; dx=5.470658368632769E-12 evalInputDelta=0.20115680992603302
END: th(2807232.9265690087)=-1.2219620048999786; dx=-6.255951658447405E-8 evalInputDelta=0.1326538324356079
Fitness changed from -1.0893081724643707 to -1.2904649823904037
Iteration 5 complete. Error: -1.2904649823904037 Total: 22.9780; Orientation: 1.0116; Line Search: 17.8559
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/d6a8d2e8-038a-48bc-9cf6-d69d222bbcd8.jpg)
Adding measurement 79458266 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.784e+03, gradient 3.274e-04, dot -0.498; [03a5dfbb-b2a1-4b3a-a8f3-3f6d9f29fe38 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.2904649823904037, -0.4507945626974106, -0.17075610160827637, 0.038772404193878174
LBFGS Accumulation History: 3 points
Removed measurement 79458266 to history. Total: 3
th(0)=-1.2904649823904037;dx=-1.072201494707367E-7
New Minimum: -1.2904649823904037 > -1.4609444886446
END: th(6048000.0)=-1.4609444886446; dx=-1.6991275311835644E-8 evalInputDelta=0.17047950625419617
Fitness changed from -1.2904649823904037 to -1.4609444886446
Iteration 6 complete. Error: -1.4609444886446 Total: 13.6182; Orientation: 1.0229; Line Search: 8.4242
Adding measurement 262cd661 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.031e+03, gradient 2.218e-04, dot -0.619; [03a5dfbb-b2a1-4b3a-a8f3-3f6d9f29fe38 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.4609444886446, -0.4507945626974106, -0.17075610160827637, 0.038772404193878174
LBFGS Accumulation History: 3 points
Removed measurement 262cd661 to history. Total: 3
th(0)=-1.4609444886446;dx=-4.920202514523E-8
New Minimum: -1.4609444886446 > -1.5991957187652588
WOLF (strong): th(1.3030021005312834E7)=-1.5991957187652588; dx=1.2250476166487298E-9 evalInputDelta=0.13825123012065887
END: th(6515010.502656417)=-1.570356324315071; dx=-1.998397586482515E-8 evalInputDelta=0.10941183567047119
Fitness changed from -1.4609444886446 to -1.5991957187652588
Iteration 7 complete. Error: -1.5991957187652588 Total: 18.5748; Orientation: 1.0167; Line Search: 13.2298
Adding measurement 3d118d50 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.746e+03, gradient 2.622e-04, dot -0.431; [03a5dfbb-b2a1-4b3a-a8f3-3f6d9f29fe38 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.5991957187652588, -0.4507945626974106, -0.17075610160827637, 0.038772404193878174
LBFGS Accumulation History: 3 points
Removed measurement 3d118d50 to history. Total: 3
th(0)=-1.5991957187652588;dx=-6.876511956893529E-8
New Minimum: -1.5991957187652588 > -1.654820278286934
WOLF (strong): th(1.4036164632845046E7)=-1.654820278286934; dx=2.4837337157203933E-8 evalInputDelta=0.05562455952167511
New Minimum: -1.654820278286934 > -1.7061041444540024
END: th(7018082.316422523)=-1.7061041444540024; dx=-2.168827650383943E-9 evalInputDelta=0.10690842568874359
Fitness changed from -1.5991957187652588 to -1.7061041444540024
Iteration 8 complete. Error: -1.7061041444540024 Total: 18.0017; Orientation: 1.0964; Line Search: 12.7102
Adding measurement 55d04872 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.980e+03, gradient 1.764e-04, dot -0.557; [03a5dfbb-b2a1-4b3a-a8f3-3f6d9f29fe38 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.7061041444540024, -0.4507945626974106, -0.17075610160827637, 0.038772404193878174
LBFGS Accumulation History: 3 points
Removed measurement 55d04872 to history. Total: 3
th(0)=-1.7061041444540024;dx=-3.110382056979197E-8
New Minimum: -1.7061041444540024 > -1.7863895297050476
WOLF (strong): th(1.5120000000000004E7)=-1.7863895297050476; dx=6.0720055493203676E-9 evalInputDelta=0.08028538525104523
END: th(7560000.000000002)=-1.7812687009572983; dx=-9.76945217771556E-9 evalInputDelta=0.0751645565032959
Fitness changed from -1.7061041444540024 to -1.7863895297050476
Iteration 9 complete. Error: -1.7863895297050476 Total: 17.8799; Orientation: 1.0054; Line Search: 12.6483
Adding measurement 35899b03 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.642e+03, gradient 2.397e-04, dot -0.369; [03a5dfbb-b2a1-4b3a-a8f3-3f6d9f29fe38 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.7863895297050476, -0.4507945626974106, -0.17075610160827637, 0.038772404193878174
LBFGS Accumulation History: 3 points
Removed measurement 35899b03 to history. Total: 3
th(0)=-1.7863895297050476;dx=-5.743630750624372E-8
New Minimum: -1.7863895297050476 > -1.7906897962093353
WOLF (strong): th(1.6287526256641045E7)=-1.7906897962093353; dx=2.6668492526464033E-8 evalInputDelta=0.00430026650428772
New Minimum: -1.7906897962093353 > -1.86959807574749
WOLF (strong): th(8143763.128320523)=-1.86959807574749; dx=6.152025792045827E-9 evalInputDelta=0.08320854604244232
END: th(2714587.709440174)=-1.8446564227342606; dx=-2.8771527288058908E-8 evalInputDelta=0.05826689302921295
Fitness changed from -1.7863895297050476 to -1.86959807574749
Iteration 10 complete. Error: -1.86959807574749 Total: 22.9575; Orientation: 1.0102; Line Search: 17.2650
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/e458fe3e-10e7-4bbd-8437-32e6c16b9470.jpg)
Final threshold in iteration 11: -1.86959807574749 (> -Infinity) after 212.160s (< 5400.000s)
Returns
-1.86959807574749