BasicOptimizer.scala:89 executed in 98.97 seconds (1.538 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: 286167436292500
Reset training subject: 286169344791300
Adding measurement 173421c8 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-56.86265214682447;dx=-5.33294618045207E-6
New Minimum: -56.86265214682447 > -56.86265544283627
END: th(2.154434690031884)=-56.86265544283627; dx=-4.184889591911583E-6 evalInputDelta=3.296011797715437E-6
Fitness changed from -56.86265214682447 to -56.86265544283627
Iteration 1 complete. Error: -56.86265544283627 Total: 9.3813; Orientation: 0.0610; Line Search: 3.8253
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/c8449cd7-edaf-4001-ab04-24526e3bfede.jpg)
Adding measurement 63869069 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-56.86265544283627;dx=-4.1848833714411495E-6
New Minimum: -56.86265544283627 > -56.8626785149135
WOLFE (weak): th(4.641588833612779)=-56.8626785149135; dx=-4.184879095876236E-6 evalInputDelta=2.307207722651583E-5
New Minimum: -56.8626785149135 > -56.862694994962936
WOLFE (weak): th(9.283177667225559)=-56.862694994962936; dx=-4.184874587809287E-6 evalInputDelta=3.9552126665398646E-5
New Minimum: -56.862694994962936 > -56.86277409913372
WOLFE (weak): th(27.849533001676676)=-56.86277409913372; dx=-4.184872797760112E-6 evalInputDelta=1.1865629745244632E-4
New Minimum: -56.86277409913372 > -56.8631267705562
WOLFE (weak): th(111.3981320067067)=-56.8631267705562; dx=-4.1848353076943404E-6 evalInputDelta=4.713277199286381E-4
New Minimum: -56.8631267705562 > -56.86498897123933
WOLFE (weak): th(556.9906600335335)=-56.86498897123933; dx=-4.184629589650328E-6 evalInputDelta=0.0023335284030565617
New Minimum: -56.86498897123933 > -56.87664199635573
WOLFE (weak): th(3341.9439602012008)=-56.87664199635573; dx=-4.1822569962810185E-6 evalInputDelta=0.013986553519458766
New Minimum: -56.87664199635573 > -56.96039706575315
WOLFE (weak): th(23393.607721408407)=-56.96039706575315; dx=-4.171576555586816E-6 evalInputDelta=0.09774162291687816
New Minimum: -56.96039706575315 > -57.63627992472555
WOLFE (weak): th(187148.86177126726)=-57.63627992472555; dx=-4.0796004409995495E-6 evalInputDelta=0.7736244818892786
New Minimum: -57.63627992472555 > -63.03287016591444
END: th(1684339.7559414054)=-63.03287016591444; dx=-3.1051177349037006E-6 evalInputDelta=6.170214723078168
Fitness changed from -56.86265544283627 to -63.03287016591444
Iteration 2 complete. Error: -63.03287016591444 Total: 21.3558; Orientation: 0.0595; Line Search: 19.1125
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/778b7e50-57fe-4f9d-a878-7c224e65c1b5.jpg)
Adding measurement 35240b68 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-63.03287016591444;dx=-2.7119835864163023E-6
New Minimum: -63.03287016591444 > -70.72936383155492
END: th(3628800.0000000005)=-70.72936383155492; dx=-1.5312765524032441E-6 evalInputDelta=7.696493665640482
Fitness changed from -63.03287016591444 to -70.72936383155492
Iteration 3 complete. Error: -70.72936383155492 Total: 6.0364; Orientation: 0.0623; Line Search: 3.5858
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/a81e0b13-08c9-4464-bf01-d2d08cba3abe.jpg)
Adding measurement 5d9d803a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.542e+03, gradient 1.246e-03, dot -0.712; [80f13cd7-b22a-4bb2-b8b2-db0d0047d04f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -70.72936383155492, -63.03287016591444, -56.86265544283627, -56.86265214682447
LBFGS Accumulation History: 3 points
Removed measurement 5d9d803a to history. Total: 3
th(0)=-70.72936383155492;dx=-1.5531195163876515E-6
New Minimum: -70.72936383155492 > -78.92426607929167
END: th(7818012.603187701)=-78.92426607929167; dx=-6.303551026136439E-7 evalInputDelta=8.19490224773675
Fitness changed from -70.72936383155492 to -78.92426607929167
Iteration 4 complete. Error: -78.92426607929167 Total: 7.1046; Orientation: 1.0223; Line Search: 3.7119
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/f22dfb9e-d997-406a-b0e2-e8074cb1aae0.jpg)
Adding measurement 7df7b7ab to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.519e+03, gradient 1.163e-03, dot -0.488; [80f13cd7-b22a-4bb2-b8b2-db0d0047d04f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -78.92426607929167, -63.03287016591444, -56.86265544283627, -56.86265214682447
LBFGS Accumulation History: 3 points
Removed measurement 7df7b7ab to history. Total: 3
th(0)=-78.92426607929167;dx=-1.3535745255527295E-6
New Minimum: -78.92426607929167 > -83.47890948034805
WOLF (strong): th(1.6843397559414055E7)=-83.47890948034805; dx=1.6061724305163205E-7 evalInputDelta=4.554643401056381
New Minimum: -83.47890948034805 > -84.0260789570315
END: th(8421698.779707028)=-84.0260789570315; dx=-9.706770849905938E-8 evalInputDelta=5.101812877739832
Fitness changed from -78.92426607929167 to -84.0260789570315
Iteration 5 complete. Error: -84.0260789570315 Total: 8.9074; Orientation: 0.9925; Line Search: 5.5786
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/434ce27e-0043-4d64-a4f0-27c560cff6b2.jpg)
Adding measurement 7a5cf329 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.583e+03, gradient 1.302e-03, dot -0.372; [80f13cd7-b22a-4bb2-b8b2-db0d0047d04f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -84.0260789570315, -63.03287016591444, -56.86265544283627, -56.86265214682447
LBFGS Accumulation History: 3 points
Removed measurement 7a5cf329 to history. Total: 3
th(0)=-84.0260789570315;dx=-1.6943074796273543E-6
Armijo: th(1.8144000000000004E7)=-83.5722003660047; dx=5.003328182787661E-7 evalInputDelta=-0.4538785910268075
New Minimum: -84.0260789570315 > -88.23798305903246
WOLF (strong): th(9072000.000000002)=-88.23798305903246; dx=4.1662724925855577E-7 evalInputDelta=4.2119041020009576
END: th(3024000.0000000005)=-87.91064937207587; dx=-8.257421755212281E-7 evalInputDelta=3.884570415044365
Fitness changed from -84.0260789570315 to -88.23798305903246
Iteration 6 complete. Error: -88.23798305903246 Total: 11.0025; Orientation: 1.1114; Line Search: 7.7249
Adding measurement 76e51685 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.231e+04, gradient 1.408e-03, dot -0.286; [80f13cd7-b22a-4bb2-b8b2-db0d0047d04f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -88.23798305903246, -63.03287016591444, -56.86265544283627, -56.86265214682447
LBFGS Accumulation History: 3 points
Removed measurement 76e51685 to history. Total: 3
th(0)=-88.23798305903246;dx=-1.981538164347351E-6
New Minimum: -88.23798305903246 > -94.37588850150667
WOLF (strong): th(6515010.502656418)=-94.37588850150667; dx=1.694796859727713E-7 evalInputDelta=6.1379054424742066
END: th(3257505.251328209)=-93.16756054178083; dx=-9.746435966914863E-7 evalInputDelta=4.929577482748371
Fitness changed from -88.23798305903246 to -94.37588850150667
Iteration 7 complete. Error: -94.37588850150667 Total: 8.7555; Orientation: 1.0153; Line Search: 5.9233
Adding measurement 54e563d3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.853e+04, gradient 1.054e-03, dot -0.469; [80f13cd7-b22a-4bb2-b8b2-db0d0047d04f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -94.37588850150667, -63.03287016591444, -56.86265544283627, -56.86265214682447
LBFGS Accumulation History: 3 points
Removed measurement 54e563d3 to history. Total: 3
th(0)=-94.37588850150667;dx=-1.1118116477338E-6
New Minimum: -94.37588850150667 > -98.05425722685004
WOLF (strong): th(7018082.316422524)=-98.05425722685004; dx=9.051852421717137E-9 evalInputDelta=3.6783687253433754
END: th(3509041.158211262)=-97.24236247869194; dx=-5.085232232074673E-7 evalInputDelta=2.8664739771852794
Fitness changed from -94.37588850150667 to -98.05425722685004
Iteration 8 complete. Error: -98.05425722685004 Total: 8.4478; Orientation: 0.9724; Line Search: 5.6612
Adding measurement 64259412 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.294e+04, gradient 1.034e-03, dot -0.463; [80f13cd7-b22a-4bb2-b8b2-db0d0047d04f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -98.05425722685004, -63.03287016591444, -56.86265544283627, -56.86265214682447
LBFGS Accumulation History: 3 points
Removed measurement 64259412 to history. Total: 3
th(0)=-98.05425722685004;dx=-1.0691980427961722E-6
New Minimum: -98.05425722685004 > -101.28425692798125
WOLF (strong): th(7560000.000000003)=-101.28425692798125; dx=1.2266799429478565E-7 evalInputDelta=3.229999701131206
END: th(3780000.0000000014)=-100.86945773652666; dx=-3.997532738353697E-7 evalInputDelta=2.8152005096766146
Fitness changed from -98.05425722685004 to -101.28425692798125
Iteration 9 complete. Error: -101.28425692798125 Total: 8.6025; Orientation: 0.9992; Line Search: 5.7736
Adding measurement 1d3e705a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.396e+04, gradient 1.071e-03, dot -0.422; [80f13cd7-b22a-4bb2-b8b2-db0d0047d04f = 1.000/1.000e+00]
Orientation rejected. Popping history element from -101.28425692798125, -63.03287016591444, -56.86265544283627, -56.86265214682447
LBFGS Accumulation History: 3 points
Removed measurement 1d3e705a to history. Total: 3
th(0)=-101.28425692798125;dx=-1.147951760397424E-6
New Minimum: -101.28425692798125 > -104.35861255412266
WOLF (strong): th(8143763.128320524)=-104.35861255412266; dx=2.755707075680123E-7 evalInputDelta=3.0743556261414113
New Minimum: -104.35861255412266 > -104.3896845708927
END: th(4071881.564160262)=-104.3896845708927; dx=-3.408134706141177E-7 evalInputDelta=3.105427642911451
Fitness changed from -101.28425692798125 to -104.3896845708927
Iteration 10 complete. Error: -104.3896845708927 Total: 9.0257; Orientation: 1.0010; Line Search: 6.1612
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/db2b9cca-a7d0-428a-9db2-e7ac56ef556d.jpg)
Final threshold in iteration 11: -104.3896845708927 (> -Infinity) after 98.974s (< 5400.000s)
Returns
-104.3896845708927