BasicOptimizer.scala:88 executed in 4875.06 seconds (16.550 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: 9569838377118
Reset training subject: 9675110843222
Adding measurement 526bf235 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=7.903462514281273;dx=-6.770725625525323E-7
New Minimum: 7.903462514281273 > 7.903459578752518
WOLFE (weak): th(2.154434690031884)=7.903459578752518; dx=-7.134960001314672E-7 evalInputDelta=2.9355287551879883E-6
New Minimum: 7.903459578752518 > 7.903455391526222
WOLFE (weak): th(4.308869380063768)=7.903455391526222; dx=-6.723011476173288E-7 evalInputDelta=7.12275505065918E-6
New Minimum: 7.903455391526222 > 7.903440594673157
WOLFE (weak): th(12.926608140191302)=7.903440594673157; dx=-6.894175468489626E-7 evalInputDelta=2.1919608116149902E-5
New Minimum: 7.903440594673157 > 7.903374597430229
WOLFE (weak): th(51.70643256076521)=7.903374597430229; dx=-6.758880760641626E-7 evalInputDelta=8.791685104370117E-5
New Minimum: 7.903374597430229 > 7.903021156787872
WOLFE (weak): th(258.53216280382605)=7.903021156787872; dx=-6.88452125777629E-7 evalInputDelta=4.4135749340057373E-4
New Minimum: 7.903021156787872 > 7.900814235210419
WOLFE (weak): th(1551.1929768229563)=7.900814235210419; dx=-6.909577772643442E-7 evalInputDelta=0.002648279070854187
New Minimum: 7.900814235210419 > 7.884941041469574
WOLFE (weak): th(10858.350837760694)=7.884941041469574; dx=-6.780150202185155E-7 evalInputDelta=0.018521472811698914
New Minimum: 7.884941041469574 > 7.756104126572609
WOLFE (weak): th(86866.80670208555)=7.756104126572609; dx=-6.939867075636119E-7 evalInputDelta=0.14735838770866394
New Minimum: 7.756104126572609 > 6.678950399160385
END: th(781801.26031877)=6.678950399160385; dx=-5.326351306652791E-7 evalInputDelta=1.2245121151208878
Fitness changed from 7.903462514281273 to 6.678950399160385
Iteration 1 complete. Error: 6.678950399160385 Total: 1374.7614; Orientation: 0.0947; Line Search: 1054.2867
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/0d3f928e-6799-4500-a6ac-adc4f1ab87d6.jpg)
Adding measurement 6c81d8ec to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=6.678950399160385;dx=-5.811171543031682E-7
New Minimum: 6.678950399160385 > 4.683335244655609
END: th(1684339.7559414052)=4.683335244655609; dx=-4.3171252064326935E-7 evalInputDelta=1.995615154504776
Fitness changed from 6.678950399160385 to 4.683335244655609
Iteration 2 complete. Error: 4.683335244655609 Total: 315.9188; Orientation: 0.0983; Line Search: 209.7405
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/a76c3d64-0fe0-4892-866d-148470b69eb4.jpg)
Adding measurement 145147b3 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=4.683335244655609;dx=-5.0558318735404E-7
New Minimum: 4.683335244655609 > 1.8409147411584854
END: th(3628800.0)=1.8409147411584854; dx=-2.8946618553421684E-7 evalInputDelta=2.8424205034971237
Fitness changed from 4.683335244655609 to 1.8409147411584854
Iteration 3 complete. Error: 1.8409147411584854 Total: 316.5143; Orientation: 0.1050; Line Search: 209.9368
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/5a8c3a2b-f0a1-4a51-9ce5-258d67400c23.jpg)
Adding measurement 1b3adff4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.949e+04, gradient 6.237e-04, dot -0.644; [c2bc5f36-bf52-4a1f-b94a-7f6a95a61845 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.8409147411584854, 4.683335244655609, 6.678950399160385, 7.903462514281273
LBFGS Accumulation History: 3 points
Removed measurement 1b3adff4 to history. Total: 3
th(0)=1.8409147411584854;dx=-3.81237939586897E-7
New Minimum: 1.8409147411584854 > -1.5335567891597748
END: th(7818012.6031877)=-1.5335567891597748; dx=-1.574425626370178E-7 evalInputDelta=3.37447153031826
Fitness changed from 1.8409147411584854 to -1.5335567891597748
Iteration 4 complete. Error: -1.5335567891597748 Total: 319.8379; Orientation: 2.4816; Line Search: 212.4029
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/ad057e67-2383-4617-891a-87e7ba10312f.jpg)
Adding measurement 26157a7d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.671e+04, gradient 4.874e-04, dot -0.536; [c2bc5f36-bf52-4a1f-b94a-7f6a95a61845 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.5335567891597748, 4.683335244655609, 6.678950399160385, 7.903462514281273
LBFGS Accumulation History: 3 points
Removed measurement 26157a7d to history. Total: 3
th(0)=-1.5335567891597748;dx=-2.3708208391034394E-7
New Minimum: -1.5335567891597748 > -4.564088553190231
END: th(1.684339755941405E7)=-4.564088553190231; dx=-5.751813779830583E-8 evalInputDelta=3.0305317640304565
Fitness changed from -1.5335567891597748 to -4.564088553190231
Iteration 5 complete. Error: -4.564088553190231 Total: 318.7766; Orientation: 2.4794; Line Search: 210.2604
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/3edcc155-7988-4716-ba8b-30a1c5fa5862.jpg)
Adding measurement 6d0a1480 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.329e+04, gradient 4.048e-04, dot -0.382; [c2bc5f36-bf52-4a1f-b94a-7f6a95a61845 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -4.564088553190231, 4.683335244655609, 6.678950399160385, 7.903462514281273
LBFGS Accumulation History: 3 points
Removed measurement 6d0a1480 to history. Total: 3
th(0)=-4.564088553190231;dx=-1.6235352828145116E-7
New Minimum: -4.564088553190231 > -6.38543339073658
END: th(3.6288E7)=-6.38543339073658; dx=-3.3551624142916248E-9 evalInputDelta=1.8213448375463486
Fitness changed from -4.564088553190231 to -6.38543339073658
Iteration 6 complete. Error: -6.38543339073658 Total: 320.9332; Orientation: 2.6450; Line Search: 208.4445
Adding measurement 63da6e2c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.946e+03, gradient 3.827e-04, dot -0.208; [c2bc5f36-bf52-4a1f-b94a-7f6a95a61845 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.38543339073658, 4.683335244655609, 6.678950399160385, 7.903462514281273
LBFGS Accumulation History: 3 points
Removed measurement 63da6e2c to history. Total: 3
th(0)=-6.38543339073658;dx=-1.447688779503539E-7
Armijo: th(7.8180126031877E7)=-5.225337728857994; dx=2.0874658422978012E-8 evalInputDelta=-1.1600956618785858
New Minimum: -6.38543339073658 > -7.710232779383659
WOLF (strong): th(3.90900630159385E7)=-7.710232779383659; dx=7.084352039349669E-9 evalInputDelta=1.3247993886470795
New Minimum: -7.710232779383659 > -7.990180246531963
END: th(1.3030021005312832E7)=-7.990180246531963; dx=-2.183187941521961E-8 evalInputDelta=1.6047468557953835
Fitness changed from -6.38543339073658 to -7.990180246531963
Iteration 7 complete. Error: -7.990180246531963 Total: 537.1193; Orientation: 2.4456; Line Search: 430.1573
Adding measurement 173ecf74 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.341e+03, gradient 2.603e-04, dot -0.258; [c2bc5f36-bf52-4a1f-b94a-7f6a95a61845 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.990180246531963, 4.683335244655609, 6.678950399160385, 7.903462514281273
LBFGS Accumulation History: 3 points
Removed measurement 173ecf74 to history. Total: 3
th(0)=-7.990180246531963;dx=-6.889377930086004E-8
New Minimum: -7.990180246531963 > -8.293884046375751
WOLF (strong): th(2.807232926569009E7)=-8.293884046375751; dx=1.823202376774421E-9 evalInputDelta=0.30370379984378815
New Minimum: -8.293884046375751 > -8.720809675753117
END: th(1.4036164632845044E7)=-8.720809675753117; dx=-1.2083278259865684E-8 evalInputDelta=0.7306294292211533
Fitness changed from -7.990180246531963 to -8.720809675753117
Iteration 8 complete. Error: -8.720809675753117 Total: 418.2572; Orientation: 2.6850; Line Search: 310.9891
Adding measurement 306ffca6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.062e+03, gradient 2.407e-04, dot -0.287; [c2bc5f36-bf52-4a1f-b94a-7f6a95a61845 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -8.720809675753117, 4.683335244655609, 6.678950399160385, 7.903462514281273
LBFGS Accumulation History: 3 points
Removed measurement 306ffca6 to history. Total: 3
th(0)=-8.720809675753117;dx=-5.139603148646671E-8
New Minimum: -8.720809675753117 > -8.829957388341427
WOLF (strong): th(3.0240000000000004E7)=-8.829957388341427; dx=2.3248390944054517E-9 evalInputDelta=0.10914771258831024
New Minimum: -8.829957388341427 > -9.20392931997776
END: th(1.5120000000000002E7)=-9.20392931997776; dx=-1.6050170365768017E-9 evalInputDelta=0.4831196442246437
Fitness changed from -8.720809675753117 to -9.20392931997776
Iteration 9 complete. Error: -9.20392931997776 Total: 424.3071; Orientation: 2.4173; Line Search: 316.4427
Adding measurement 5e87100a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.599e+03, gradient 2.388e-04, dot -0.243; [c2bc5f36-bf52-4a1f-b94a-7f6a95a61845 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -9.20392931997776, 4.683335244655609, 6.678950399160385, 7.903462514281273
LBFGS Accumulation History: 3 points
Removed measurement 5e87100a to history. Total: 3
th(0)=-9.20392931997776;dx=-5.40065933025168E-8
Armijo: th(3.2575052513282087E7)=-7.606087282299995; dx=1.8812106261498527E-8 evalInputDelta=-1.597842037677765
New Minimum: -9.20392931997776 > -9.224443800747395
WOLF (strong): th(1.6287526256641043E7)=-9.224443800747395; dx=1.0902341579439698E-8 evalInputDelta=0.020514480769634247
New Minimum: -9.224443800747395 > -9.606352880597115
END: th(5429175.418880348)=-9.606352880597115; dx=-2.316578565334917E-8 evalInputDelta=0.40242356061935425
Fitness changed from -9.20392931997776 to -9.606352880597115
Iteration 10 complete. Error: -9.606352880597115 Total: 527.0602; Orientation: 2.4940; Line Search: 419.3021
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/65343657-7617-4cbc-9b9d-7d6d8a2ca228.jpg)
Final threshold in iteration 11: -9.606352880597115 (> -Infinity) after 4875.060s (< 5400.000s)
Returns
-9.606352880597115