BasicOptimizer.scala:89 executed in 292.46 seconds (3.419 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: 656602904696700
Reset training subject: 656609111468900
Adding measurement 71bb5c2 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-37.32122721437122;dx=-1.8672907885772895E-6
New Minimum: -37.32122721437122 > -37.32122923807874
END: th(2.154434690031884)=-37.32122923807874; dx=-1.6311484479711258E-6 evalInputDelta=2.0237075233353607E-6
Fitness changed from -37.32122721437122 to -37.32122923807874
Iteration 1 complete. Error: -37.32122923807874 Total: 30.4125; Orientation: 0.1438; Line Search: 12.1222
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/8685dfb7-bc89-4bc6-a0df-6e93eed30ca9.jpg)
Adding measurement 31607bfe to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-37.32122923807874;dx=-1.6287166125911012E-6
New Minimum: -37.32122923807874 > -37.32123935661469
WOLFE (weak): th(4.641588833612779)=-37.32123935661469; dx=-1.6281412268101637E-6 evalInputDelta=1.0118535946901375E-5
New Minimum: -37.32123935661469 > -37.32124745144147
WOLFE (weak): th(9.283177667225559)=-37.32124745144147; dx=-1.6273023470169413E-6 evalInputDelta=1.821336272911367E-5
New Minimum: -37.32124745144147 > -37.32128185443571
WOLFE (weak): th(27.849533001676676)=-37.32128185443571; dx=-1.627045856889035E-6 evalInputDelta=5.261635696740541E-5
New Minimum: -37.32128185443571 > -37.321433631972894
WOLFE (weak): th(111.3981320067067)=-37.321433631972894; dx=-1.6265364304152414E-6 evalInputDelta=2.0439389415116693E-4
New Minimum: -37.321433631972894 > -37.32223500713605
WOLFE (weak): th(556.9906600335335)=-37.32223500713605; dx=-1.6266048521845372E-6 evalInputDelta=0.0010057690573077593
New Minimum: -37.32223500713605 > -37.32726142254121
WOLFE (weak): th(3341.9439602012008)=-37.32726142254121; dx=-1.6261836728242489E-6 evalInputDelta=0.006032184462469559
New Minimum: -37.32726142254121 > -37.36341184233966
WOLFE (weak): th(23393.607721408407)=-37.36341184233966; dx=-1.6236834950161802E-6 evalInputDelta=0.04218260426091547
New Minimum: -37.36341184233966 > -37.6564444424003
WOLFE (weak): th(187148.86177126726)=-37.6564444424003; dx=-1.6012934538970673E-6 evalInputDelta=0.3352152043215568
New Minimum: -37.6564444424003 > -40.125199215370294
END: th(1684339.7559414054)=-40.125199215370294; dx=-1.360905837874317E-6 evalInputDelta=2.803969977291551
Fitness changed from -37.32122923807874 to -40.125199215370294
Iteration 2 complete. Error: -40.125199215370294 Total: 67.7001; Orientation: 0.1332; Line Search: 60.5524
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/4290fb20-db4b-44e9-930f-389d1384f093.jpg)
Adding measurement 7178f655 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-40.125199215370294;dx=-1.2795135880877343E-6
New Minimum: -40.125199215370294 > -44.28068204498581
END: th(3628800.0000000005)=-44.28068204498581; dx=-8.177942854689825E-7 evalInputDelta=4.155482829615515
Fitness changed from -40.125199215370294 to -44.28068204498581
Iteration 3 complete. Error: -44.28068204498581 Total: 19.9438; Orientation: 0.1515; Line Search: 12.5498
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/cb26593e-e646-4365-91eb-adc944189ffe.jpg)
Adding measurement 2f96d29d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.023e+03, gradient 8.835e-04, dot -0.785; [0a1511d8-cb75-4b6a-bab5-3cd5f94b272e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -44.28068204498581, -40.125199215370294, -37.32122923807874, -37.32122721437122
LBFGS Accumulation History: 3 points
Removed measurement 2f96d29d to history. Total: 3
th(0)=-44.28068204498581;dx=-7.798747570132688E-7
New Minimum: -44.28068204498581 > -49.42236184340488
END: th(7818012.603187701)=-49.42236184340488; dx=-4.314739550160301E-7 evalInputDelta=5.141679798419069
Fitness changed from -44.28068204498581 to -49.42236184340488
Iteration 4 complete. Error: -49.42236184340488 Total: 22.2333; Orientation: 2.8308; Line Search: 12.1771
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/9010ab8d-253a-4763-b7be-59a41a2efd20.jpg)
Adding measurement 487f1024 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.201e+03, gradient 7.867e-04, dot -0.596; [0a1511d8-cb75-4b6a-bab5-3cd5f94b272e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -49.42236184340488, -40.125199215370294, -37.32122923807874, -37.32122721437122
LBFGS Accumulation History: 3 points
Removed measurement 487f1024 to history. Total: 3
th(0)=-49.42236184340488;dx=-6.180325230229947E-7
New Minimum: -49.42236184340488 > -54.87835083924212
END: th(1.6843397559414055E7)=-54.87835083924212; dx=-1.2468069605199299E-7 evalInputDelta=5.455988995837238
Fitness changed from -49.42236184340488 to -54.87835083924212
Iteration 5 complete. Error: -54.87835083924212 Total: 21.7681; Orientation: 2.6623; Line Search: 11.8088
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/b76c7ae9-f14b-4a51-ac1f-0dc835d30e15.jpg)
Adding measurement 2652a089 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.124e+04, gradient 9.946e-04, dot -0.325; [0a1511d8-cb75-4b6a-bab5-3cd5f94b272e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -54.87835083924212, -40.125199215370294, -37.32122923807874, -37.32122721437122
LBFGS Accumulation History: 3 points
Removed measurement 2652a089 to history. Total: 3
th(0)=-54.87835083924212;dx=-9.890251096967059E-7
Armijo: th(3.628800000000001E7)=-51.572844371674336; dx=2.0262798123942894E-7 evalInputDelta=-3.305506467567781
New Minimum: -54.87835083924212 > -57.19182763184184
WOLF (strong): th(1.8144000000000004E7)=-57.19182763184184; dx=3.0110847667721354E-7 evalInputDelta=2.3134767925997224
New Minimum: -57.19182763184184 > -59.235963468048354
END: th(6048000.000000001)=-59.235963468048354; dx=-2.751850827355897E-7 evalInputDelta=4.357612628806237
Fitness changed from -54.87835083924212 to -59.235963468048354
Iteration 6 complete. Error: -59.235963468048354 Total: 35.0994; Orientation: 2.4681; Line Search: 25.7694
Adding measurement 1ee6224d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.111e+04, gradient 7.045e-04, dot -0.612; [0a1511d8-cb75-4b6a-bab5-3cd5f94b272e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -59.235963468048354, -40.125199215370294, -37.32122923807874, -37.32122721437122
LBFGS Accumulation History: 3 points
Removed measurement 1ee6224d to history. Total: 3
th(0)=-59.235963468048354;dx=-4.95953063562907E-7
New Minimum: -59.235963468048354 > -63.08162601815772
END: th(1.3030021005312836E7)=-63.08162601815772; dx=-1.1599325351626845E-7 evalInputDelta=3.845662550109367
Fitness changed from -59.235963468048354 to -63.08162601815772
Iteration 7 complete. Error: -63.08162601815772 Total: 20.6835; Orientation: 2.5241; Line Search: 12.0373
Adding measurement 1270cbe2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.717e+04, gradient 8.625e-04, dot -0.455; [0a1511d8-cb75-4b6a-bab5-3cd5f94b272e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -63.08162601815772, -40.125199215370294, -37.32122923807874, -37.32122721437122
LBFGS Accumulation History: 3 points
Removed measurement 1270cbe2 to history. Total: 3
th(0)=-63.08162601815772;dx=-7.427603147232259E-7
Armijo: th(2.8072329265690096E7)=-62.258516107504356; dx=1.9981111042899846E-7 evalInputDelta=-0.8231099106533648
New Minimum: -63.08162601815772 > -65.7314188642925
WOLF (strong): th(1.4036164632845048E7)=-65.7314188642925; dx=1.7444951907689924E-7 evalInputDelta=2.6497928461347726
New Minimum: -65.7314188642925 > -65.8699238678772
END: th(4678721.544281683)=-65.8699238678772; dx=-3.172703267387557E-7 evalInputDelta=2.788297849719484
Fitness changed from -63.08162601815772 to -65.8699238678772
Iteration 8 complete. Error: -65.8699238678772 Total: 32.4081; Orientation: 2.5092; Line Search: 24.0563
Adding measurement 229d90f3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.686e+04, gradient 6.003e-04, dot -0.726; [0a1511d8-cb75-4b6a-bab5-3cd5f94b272e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -65.8699238678772, -40.125199215370294, -37.32122923807874, -37.32122721437122
LBFGS Accumulation History: 3 points
Removed measurement 229d90f3 to history. Total: 3
th(0)=-65.8699238678772;dx=-3.602617962764215E-7
New Minimum: -65.8699238678772 > -69.0497715846688
END: th(1.0080000000000004E7)=-69.0497715846688; dx=-2.377864615017821E-7 evalInputDelta=3.179847716791599
Fitness changed from -65.8699238678772 to -69.0497715846688
Iteration 9 complete. Error: -69.0497715846688 Total: 20.6221; Orientation: 2.5042; Line Search: 12.0442
Adding measurement 3f299e12 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.429e+04, gradient 6.339e-04, dot -0.664; [0a1511d8-cb75-4b6a-bab5-3cd5f94b272e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -69.0497715846688, -40.125199215370294, -37.32122923807874, -37.32122721437122
LBFGS Accumulation History: 3 points
Removed measurement 3f299e12 to history. Total: 3
th(0)=-69.0497715846688;dx=-4.0168696554120857E-7
New Minimum: -69.0497715846688 > -72.98992870460862
END: th(2.1716701675521396E7)=-72.98992870460862; dx=-6.076435101760037E-8 evalInputDelta=3.940157119939812
Fitness changed from -69.0497715846688 to -72.98992870460862
Iteration 10 complete. Error: -72.98992870460862 Total: 20.5009; Orientation: 2.4862; Line Search: 12.0609
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/c6381ab9-e4e8-4c27-a4c0-659e9299b65b.jpg)
Final threshold in iteration 11: -72.98992870460862 (> -Infinity) after 292.464s (< 5400.000s)
Returns
-72.98992870460862