BasicOptimizer.scala:89 executed in 133.53 seconds (1.641 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: 335117627011900
Reset training subject: 335120200218200
Adding measurement 8efd7ae to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-123.13450763504171;dx=-2.9982681907357385E-5
New Minimum: -123.13450763504171 > -123.13456246487425
END: th(2.154434690031884)=-123.13456246487425; dx=-2.1934403826412736E-5 evalInputDelta=5.4829832535574496E-5
Fitness changed from -123.13450763504171 to -123.13456246487425
Iteration 1 complete. Error: -123.13456246487425 Total: 12.7144; Orientation: 0.0607; Line Search: 4.9531
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/6bc57409-93bf-4f41-a7b8-a04172fcfecf.jpg)
Adding measurement 661ffa41 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-123.13456246487425;dx=-2.178105388940254E-5
New Minimum: -123.13456246487425 > -123.13467995729032
WOLFE (weak): th(4.641588833612779)=-123.13467995729032; dx=-2.1768927077836742E-5 evalInputDelta=1.174924160665114E-4
New Minimum: -123.13467995729032 > -123.13478961677751
WOLFE (weak): th(9.283177667225559)=-123.13478961677751; dx=-2.1754013535570084E-5 evalInputDelta=2.2715190326039192E-4
New Minimum: -123.13478961677751 > -123.1352517521148
WOLFE (weak): th(27.849533001676676)=-123.1352517521148; dx=-2.1748625256649457E-5 evalInputDelta=6.892872405472872E-4
New Minimum: -123.1352517521148 > -123.13730392537268
WOLFE (weak): th(111.3981320067067)=-123.13730392537268; dx=-2.173371636010457E-5 evalInputDelta=0.002741460498427273
New Minimum: -123.13730392537268 > -123.14826915707722
WOLFE (weak): th(556.9906600335335)=-123.14826915707722; dx=-2.1728701759216742E-5 evalInputDelta=0.013706692202973159
New Minimum: -123.14826915707722 > -123.21676017799746
WOLFE (weak): th(3341.9439602012008)=-123.21676017799746; dx=-2.171412079973701E-5 evalInputDelta=0.08219771312320745
New Minimum: -123.21676017799746 > -123.70794191375929
WOLFE (weak): th(23393.607721408407)=-123.70794191375929; dx=-2.1551292180483832E-5 evalInputDelta=0.573379448885035
New Minimum: -123.70794191375929 > -127.55645441157158
WOLFE (weak): th(187148.86177126726)=-127.55645441157158; dx=-1.9915091551701084E-5 evalInputDelta=4.421891946697329
New Minimum: -127.55645441157158 > -147.75380276133248
END: th(1684339.7559414054)=-147.75380276133248; dx=-5.544528903821549E-6 evalInputDelta=24.61924029645823
Fitness changed from -123.13456246487425 to -147.75380276133248
Iteration 2 complete. Error: -147.75380276133248 Total: 28.6857; Orientation: 0.0640; Line Search: 25.4744
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/9a1f2b90-8953-45a2-b42f-f33ccfbbdb5b.jpg)
Adding measurement 9ae832a to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-147.75380276133248;dx=-1.0262946617532723E-5
New Minimum: -147.75380276133248 > -165.22955113985233
END: th(3628800.0000000005)=-165.22955113985233; dx=-7.123579916856024E-7 evalInputDelta=17.475748378519853
Fitness changed from -147.75380276133248 to -165.22955113985233
Iteration 3 complete. Error: -165.22955113985233 Total: 8.0926; Orientation: 0.0608; Line Search: 5.1928
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/1b96f8c7-53ba-41b1-9065-0e85a3275673.jpg)
Adding measurement 3e2d2c2a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.451e+03, gradient 3.167e-03, dot -0.309; [f9b29bad-4f7f-4d20-8549-a336492b5a34 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -165.22955113985233, -147.75380276133248, -123.13456246487425, -123.13450763504171
LBFGS Accumulation History: 3 points
Removed measurement 3e2d2c2a to history. Total: 3
th(0)=-165.22955113985233;dx=-1.0028812413025461E-5
Armijo: th(7818012.603187701)=-160.88557411715396; dx=3.376570867996089E-6 evalInputDelta=-4.343977022698368
New Minimum: -165.22955113985233 > -175.40723227600336
WOLF (strong): th(3909006.3015938504)=-175.40723227600336; dx=2.0438726037850046E-6 evalInputDelta=10.177681136151023
END: th(1303002.1005312835)=-175.06438460729498; dx=-3.830389719504193E-6 evalInputDelta=9.83483346744265
Fitness changed from -165.22955113985233 to -175.40723227600336
Iteration 4 complete. Error: -175.40723227600336 Total: 14.5046; Orientation: 1.0432; Line Search: 10.3198
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/3291bfef-5cf7-440f-a2ad-15398d3343bc.jpg)
Adding measurement 4c7ad444 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.118e+03, gradient 3.305e-03, dot -0.195; [f9b29bad-4f7f-4d20-8549-a336492b5a34 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -175.40723227600336, -147.75380276133248, -123.13456246487425, -123.13450763504171
LBFGS Accumulation History: 3 points
Removed measurement 4c7ad444 to history. Total: 3
th(0)=-175.40723227600336;dx=-1.091436349037365E-5
New Minimum: -175.40723227600336 > -189.65866093725305
WOLF (strong): th(2807232.926569009)=-189.65866093725305; dx=9.16710171935064E-7 evalInputDelta=14.25142866124969
END: th(1403616.4632845046)=-187.4624937867116; dx=-4.374899407190659E-6 evalInputDelta=12.055261510708249
Fitness changed from -175.40723227600336 to -189.65866093725305
Iteration 5 complete. Error: -189.65866093725305 Total: 11.7131; Orientation: 1.0531; Line Search: 7.6536
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/23ca5a18-ade6-4bd9-87ed-72a85c86fd19.jpg)
Adding measurement b2fe791 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.116e+04, gradient 2.552e-03, dot -0.338; [f9b29bad-4f7f-4d20-8549-a336492b5a34 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -189.65866093725305, -147.75380276133248, -123.13456246487425, -123.13450763504171
LBFGS Accumulation History: 3 points
Removed measurement b2fe791 to history. Total: 3
th(0)=-189.65866093725305;dx=-6.504191402228435E-6
New Minimum: -189.65866093725305 > -198.35969964916708
WOLF (strong): th(3024000.0000000005)=-198.35969964916708; dx=5.874977600560518E-7 evalInputDelta=8.701038711914038
END: th(1512000.0000000002)=-197.14154119040094; dx=-2.5512891213289498E-6 evalInputDelta=7.482880253147897
Fitness changed from -189.65866093725305 to -198.35969964916708
Iteration 6 complete. Error: -198.35969964916708 Total: 12.2142; Orientation: 1.3509; Line Search: 7.8570
Adding measurement 38de76ea to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.646e+04, gradient 2.435e-03, dot -0.390; [f9b29bad-4f7f-4d20-8549-a336492b5a34 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -198.35969964916708, -147.75380276133248, -123.13456246487425, -123.13450763504171
LBFGS Accumulation History: 3 points
Removed measurement 38de76ea to history. Total: 3
th(0)=-198.35969964916708;dx=-5.9280916112546226E-6
New Minimum: -198.35969964916708 > -204.66608954100113
WOLF (strong): th(3257505.251328209)=-204.66608954100113; dx=1.5038554484172225E-6 evalInputDelta=6.306389891834044
New Minimum: -204.66608954100113 > -205.10493866307291
END: th(1628752.6256641045)=-205.10493866307291; dx=-1.6717941965848923E-6 evalInputDelta=6.745239013905831
Fitness changed from -198.35969964916708 to -205.10493866307291
Iteration 7 complete. Error: -205.10493866307291 Total: 11.5406; Orientation: 1.0774; Line Search: 7.7261
Adding measurement 6bd31b9c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.123e+04, gradient 1.666e-03, dot -0.628; [f9b29bad-4f7f-4d20-8549-a336492b5a34 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -205.10493866307291, -147.75380276133248, -123.13456246487425, -123.13450763504171
LBFGS Accumulation History: 3 points
Removed measurement 6bd31b9c to history. Total: 3
th(0)=-205.10493866307291;dx=-2.7689695225533042E-6
New Minimum: -205.10493866307291 > -211.83491979403158
END: th(3509041.158211262)=-211.83491979403158; dx=-1.074442701358889E-6 evalInputDelta=6.729981130958663
Fitness changed from -205.10493866307291 to -211.83491979403158
Iteration 8 complete. Error: -211.83491979403158 Total: 8.5329; Orientation: 0.9927; Line Search: 5.0003
Adding measurement 8e3c8d8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.204e+04, gradient 1.917e-03, dot -0.490; [f9b29bad-4f7f-4d20-8549-a336492b5a34 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -211.83491979403158, -147.75380276133248, -123.13456246487425, -123.13450763504171
LBFGS Accumulation History: 3 points
Removed measurement 8e3c8d8 to history. Total: 3
th(0)=-211.83491979403158;dx=-3.6715465976040106E-6
Armijo: th(7560000.000000003)=-210.20798215242183; dx=1.5454882387220615E-6 evalInputDelta=-1.626937641609743
New Minimum: -211.83491979403158 > -215.91619402996758
WOLF (strong): th(3780000.0000000014)=-215.91619402996758; dx=5.722175634075356E-7 evalInputDelta=4.081274235936007
END: th(1260000.0000000005)=-215.3938731635597; dx=-1.6501831071541313E-6 evalInputDelta=3.558953369528126
Fitness changed from -211.83491979403158 to -215.91619402996758
Iteration 9 complete. Error: -215.91619402996758 Total: 13.9579; Orientation: 0.9761; Line Search: 10.1965
Adding measurement 695919fb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.960e+04, gradient 2.396e-03, dot -0.323; [f9b29bad-4f7f-4d20-8549-a336492b5a34 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -215.91619402996758, -147.75380276133248, -123.13456246487425, -123.13450763504171
LBFGS Accumulation History: 3 points
Removed measurement 695919fb to history. Total: 3
th(0)=-215.91619402996758;dx=-5.726494047324513E-6
New Minimum: -215.91619402996758 > -222.05490104213294
WOLF (strong): th(2714587.7094401745)=-222.05490104213294; dx=1.1201830037352466E-6 evalInputDelta=6.138707012165355
END: th(1357293.8547200873)=-221.74314133874827; dx=-2.05504791957184E-6 evalInputDelta=5.826947308780689
Fitness changed from -215.91619402996758 to -222.05490104213294
Iteration 10 complete. Error: -222.05490104213294 Total: 11.1276; Orientation: 1.0485; Line Search: 7.6967
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/a76ae602-f9f5-44ff-926b-aeef8d0f84e8.jpg)
Final threshold in iteration 11: -222.05490104213294 (> -Infinity) after 133.534s (< 5400.000s)
Returns
-222.05490104213294