BasicOptimizer.scala:89 executed in 134.39 seconds (2.359 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: 113995646538900
Reset training subject: 113998467809200
Adding measurement 1c8def30 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-30.13845364202688;dx=-1.2078210680313232E-6
New Minimum: -30.13845364202688 > -30.138456447897862
WOLFE (weak): th(2.154434690031884)=-30.138456447897862; dx=-1.1110103497218739E-6 evalInputDelta=2.8058709808931326E-6
New Minimum: -30.138456447897862 > -30.13845785083325
WOLFE (weak): th(4.308869380063768)=-30.13845785083325; dx=-1.110617935578389E-6 evalInputDelta=4.208806370087359E-6
New Minimum: -30.13845785083325 > -30.138469074314038
WOLFE (weak): th(12.926608140191302)=-30.138469074314038; dx=-1.1109287275280017E-6 evalInputDelta=1.543228715661371E-5
New Minimum: -30.138469074314038 > -30.13851817699334
WOLFE (weak): th(51.70643256076521)=-30.13851817699334; dx=-1.1106399334650591E-6 evalInputDelta=6.453496645875134E-5
New Minimum: -30.13851817699334 > -30.138772106715415
WOLFE (weak): th(258.53216280382605)=-30.138772106715415; dx=-1.1111510989603625E-6 evalInputDelta=3.184646885330267E-4
New Minimum: -30.138772106715415 > -30.140364379684364
WOLFE (weak): th(1551.1929768229563)=-30.140364379684364; dx=-1.1108074533816784E-6 evalInputDelta=0.0019107376574822865
New Minimum: -30.140364379684364 > -30.15183327442104
WOLFE (weak): th(10858.350837760694)=-30.15183327442104; dx=-1.110445559686589E-6 evalInputDelta=0.013379632394158847
New Minimum: -30.15183327442104 > -30.24522292400323
WOLFE (weak): th(86866.80670208555)=-30.24522292400323; dx=-1.102573600221053E-6 evalInputDelta=0.10676928197634794
New Minimum: -30.24522292400323 > -31.06384594659817
END: th(781801.26031877)=-31.06384594659817; dx=-1.0235894575401972E-6 evalInputDelta=0.9253923045712895
Fitness changed from -30.13845364202688 to -31.06384594659817
Iteration 1 complete. Error: -31.06384594659817 Total: 34.8227; Orientation: 0.0613; Line Search: 26.6509
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding measurement 4942d224 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-31.06384594659817;dx=-1.0037116267203234E-6
New Minimum: -31.06384594659817 > -32.80198277733864
END: th(1684339.7559414052)=-32.80198277733864; dx=-8.632588020287514E-7 evalInputDelta=1.7381368307404657
Fitness changed from -31.06384594659817 to -32.80198277733864
Iteration 2 complete. Error: -32.80198277733864 Total: 8.9153; Orientation: 0.0650; Line Search: 5.5576
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>
Adding measurement 499cc517 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-32.80198277733864;dx=-8.311570721700598E-7
New Minimum: -32.80198277733864 > -35.71130182109772
END: th(3628800.0)=-35.71130182109772; dx=-6.21047033262175E-7 evalInputDelta=2.9093190437590835
Fitness changed from -32.80198277733864 to -35.71130182109772
Iteration 3 complete. Error: -35.71130182109772 Total: 8.9662; Orientation: 0.0635; Line Search: 5.6022
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>
Adding measurement 3c924b3c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.091e+04, gradient 7.848e-04, dot -0.876; [ef2ded52-fa75-4641-b37e-a2b714247c2a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -35.71130182109772, -32.80198277733864, -31.06384594659817, -30.13845364202688
LBFGS Accumulation History: 3 points
Removed measurement 3c924b3c to history. Total: 3
th(0)=-35.71130182109772;dx=-6.153894260018844E-7
New Minimum: -35.71130182109772 > -39.88384363160289
END: th(7818012.6031877)=-39.88384363160289; dx=-3.6349146704172173E-7 evalInputDelta=4.172541810505173
Fitness changed from -35.71130182109772 to -39.88384363160289
Iteration 4 complete. Error: -39.88384363160289 Total: 9.8009; Orientation: 1.1482; Line Search: 5.5657
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>
Adding measurement 1e87875a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.768e+04, gradient 6.851e-04, dot -0.680; [ef2ded52-fa75-4641-b37e-a2b714247c2a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -39.88384363160289, -32.80198277733864, -31.06384594659817, -30.13845364202688
LBFGS Accumulation History: 3 points
Removed measurement 1e87875a to history. Total: 3
th(0)=-39.88384363160289;dx=-4.6885010066944297E-7
New Minimum: -39.88384363160289 > -44.776417978183154
END: th(1.684339755941405E7)=-44.776417978183154; dx=-1.492403614607809E-7 evalInputDelta=4.892574346580261
Fitness changed from -39.88384363160289 to -44.776417978183154
Iteration 5 complete. Error: -44.776417978183154 Total: 9.5545; Orientation: 1.1018; Line Search: 5.4004
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>
Adding measurement 4c9612d2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.828e+04, gradient 7.427e-04, dot -0.451; [ef2ded52-fa75-4641-b37e-a2b714247c2a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -44.776417978183154, -32.80198277733864, -31.06384594659817, -30.13845364202688
LBFGS Accumulation History: 3 points
Removed measurement 4c9612d2 to history. Total: 3
th(0)=-44.776417978183154;dx=-5.515330423862649E-7
New Minimum: -44.776417978183154 > -46.96283936292475
WOLF (strong): th(3.6288E7)=-46.96283936292475; dx=4.238716153810137E-8 evalInputDelta=2.1864213847415925
New Minimum: -46.96283936292475 > -47.91786872036396
WOLF (strong): th(1.8144E7)=-47.91786872036396; dx=2.5958049875034347E-8 evalInputDelta=3.141450742180808
END: th(6048000.0)=-47.34056144448357; dx=-2.199559064606122E-7 evalInputDelta=2.564143466300415
Fitness changed from -44.776417978183154 to -47.91786872036396
Iteration 6 complete. Error: -47.91786872036396 Total: 16.0771; Orientation: 1.0580; Line Search: 11.6263
Adding measurement 5720de9a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.733e+04, gradient 7.969e-04, dot -0.332; [ef2ded52-fa75-4641-b37e-a2b714247c2a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -47.91786872036396, -32.80198277733864, -31.06384594659817, -30.13845364202688
LBFGS Accumulation History: 3 points
Removed measurement 5720de9a to history. Total: 3
th(0)=-47.91786872036396;dx=-6.348075078738655E-7
New Minimum: -47.91786872036396 > -52.340267094163075
WOLF (strong): th(1.3030021005312834E7)=-52.340267094163075; dx=7.0055391535994925E-9 evalInputDelta=4.422398373799112
END: th(6515010.502656417)=-51.39641459440544; dx=-3.1230712937553903E-7 evalInputDelta=3.4785458740414796
Fitness changed from -47.91786872036396 to -52.340267094163075
Iteration 7 complete. Error: -52.340267094163075 Total: 12.9670; Orientation: 1.3249; Line Search: 8.3945
Adding measurement 5d28bb93 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.617e+04, gradient 6.696e-04, dot -0.424; [ef2ded52-fa75-4641-b37e-a2b714247c2a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -52.340267094163075, -32.80198277733864, -31.06384594659817, -30.13845364202688
LBFGS Accumulation History: 3 points
Removed measurement 5d28bb93 to history. Total: 3
th(0)=-52.340267094163075;dx=-4.472809496819059E-7
New Minimum: -52.340267094163075 > -55.051162054404244
WOLF (strong): th(1.4036164632845046E7)=-55.051162054404244; dx=3.536139070866962E-8 evalInputDelta=2.71089496024117
END: th(7018082.316422523)=-54.71716949918759; dx=-1.660705436968283E-7 evalInputDelta=2.3769024050245164
Fitness changed from -52.340267094163075 to -55.051162054404244
Iteration 8 complete. Error: -55.051162054404244 Total: 11.5755; Orientation: 1.0093; Line Search: 7.9680
Adding measurement 62c33bb4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.986e+04, gradient 6.863e-04, dot -0.398; [ef2ded52-fa75-4641-b37e-a2b714247c2a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -55.051162054404244, -32.80198277733864, -31.06384594659817, -30.13845364202688
LBFGS Accumulation History: 3 points
Removed measurement 62c33bb4 to history. Total: 3
th(0)=-55.051162054404244;dx=-4.7092901850146503E-7
New Minimum: -55.051162054404244 > -57.35336361096349
WOLF (strong): th(1.5120000000000004E7)=-57.35336361096349; dx=9.972111143415158E-8 evalInputDelta=2.302201556559247
New Minimum: -57.35336361096349 > -57.553333657232805
END: th(7560000.000000002)=-57.553333657232805; dx=-1.188132483419636E-7 evalInputDelta=2.502171602828561
Fitness changed from -55.051162054404244 to -57.553333657232805
Iteration 9 complete. Error: -57.553333657232805 Total: 11.7108; Orientation: 1.0397; Line Search: 8.0565
Adding measurement 62079577 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.826e+04, gradient 4.889e-04, dot -0.592; [ef2ded52-fa75-4641-b37e-a2b714247c2a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -57.553333657232805, -32.80198277733864, -31.06384594659817, -30.13845364202688
LBFGS Accumulation History: 3 points
Removed measurement 62079577 to history. Total: 3
th(0)=-57.553333657232805;dx=-2.3866742724098875E-7
New Minimum: -57.553333657232805 > -59.87674405520218
END: th(1.6287526256641045E7)=-59.87674405520218; dx=-6.463464338543384E-8 evalInputDelta=2.3234103979693757
Fitness changed from -57.553333657232805 to -59.87674405520218
Iteration 10 complete. Error: -59.87674405520218 Total: 9.4354; Orientation: 1.1488; Line Search: 5.6897
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>
Final threshold in iteration 11: -59.87674405520218 (> -Infinity) after 134.386s (< 5400.000s)
Returns
-59.87674405520218