BasicOptimizer.scala:89 executed in 133.16 seconds (2.050 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: 69090390614599
Reset training subject: 69093063261699
Adding measurement e519afd to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-15.953090159297657;dx=-7.122204357002526E-7
New Minimum: -15.953090159297657 > -15.953090968348352
WOLFE (weak): th(2.154434690031884)=-15.953090968348352; dx=-7.00829659622481E-7 evalInputDelta=8.090506948832399E-7
New Minimum: -15.953090968348352 > -15.953093395500192
WOLFE (weak): th(4.308869380063768)=-15.953093395500192; dx=-7.007370945910057E-7 evalInputDelta=3.2362025343957157E-6
New Minimum: -15.953093395500192 > -15.953099867903289
WOLFE (weak): th(12.926608140191302)=-15.953099867903289; dx=-7.005126522817868E-7 evalInputDelta=9.708605631431055E-6
New Minimum: -15.953099867903289 > -15.953130611782141
WOLFE (weak): th(51.70643256076521)=-15.953130611782141; dx=-7.005423497809237E-7 evalInputDelta=4.045248448392158E-5
New Minimum: -15.953130611782141 > -15.95329808397653
WOLFE (weak): th(258.53216280382605)=-15.95329808397653; dx=-7.007792066280057E-7 evalInputDelta=2.0792467887353894E-4
New Minimum: -15.95329808397653 > -15.954334430774125
WOLFE (weak): th(1551.1929768229563)=-15.954334430774125; dx=-7.007322172258246E-7 evalInputDelta=0.0012442714764677731
New Minimum: -15.954334430774125 > -15.961791553866078
WOLFE (weak): th(10858.350837760694)=-15.961791553866078; dx=-6.99940602209993E-7 evalInputDelta=0.008701394568420895
New Minimum: -15.961791553866078 > -16.022334588500623
WOLFE (weak): th(86866.80670208555)=-16.022334588500623; dx=-6.924408721105554E-7 evalInputDelta=0.06924442920296592
New Minimum: -16.022334588500623 > -16.531378551924377
END: th(781801.26031877)=-16.531378551924377; dx=-5.770089563815373E-7 evalInputDelta=0.5782883926267193
Fitness changed from -15.953090159297657 to -16.531378551924377
Iteration 1 complete. Error: -16.531378551924377 Total: 34.1769; Orientation: 0.0628; Line Search: 26.4864
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding measurement 5fd66298 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-16.531378551924377;dx=-5.639683265803003E-7
New Minimum: -16.531378551924377 > -17.429301692691762
END: th(1684339.7559414052)=-17.429301692691762; dx=-3.6450973215657304E-7 evalInputDelta=0.8979231407673858
Fitness changed from -16.531378551924377 to -17.429301692691762
Iteration 2 complete. Error: -17.429301692691762 Total: 8.2059; Orientation: 0.0630; Line Search: 5.2656
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>
Adding measurement 231918f7 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-17.429301692691762;dx=-4.842988377241584E-7
New Minimum: -17.429301692691762 > -18.569643200800318
END: th(3628800.0)=-18.569643200800318; dx=-1.813999636666417E-7 evalInputDelta=1.1403415081085555
Fitness changed from -17.429301692691762 to -18.569643200800318
Iteration 3 complete. Error: -18.569643200800318 Total: 8.7941; Orientation: 0.0613; Line Search: 5.4074
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>
Adding measurement 6cb537ea to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.103e+04, gradient 7.395e-04, dot -0.644; [20940155-139f-45ba-bbdc-bad7fd47f649 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -18.569643200800318, -17.429301692691762, -16.531378551924377, -15.953090159297657
LBFGS Accumulation History: 3 points
Removed measurement 6cb537ea to history. Total: 3
th(0)=-18.569643200800318;dx=-5.467690700100668E-7
New Minimum: -18.569643200800318 > -19.67985548557473
END: th(7818012.6031877)=-19.67985548557473; dx=-6.40149682407373E-8 evalInputDelta=1.1102122847744127
Fitness changed from -18.569643200800318 to -19.67985548557473
Iteration 4 complete. Error: -19.67985548557473 Total: 10.0389; Orientation: 1.1668; Line Search: 5.4162
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>
Adding measurement 4047789d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.012e+03, gradient 6.649e-04, dot -0.491; [20940155-139f-45ba-bbdc-bad7fd47f649 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -19.67985548557473, -17.429301692691762, -16.531378551924377, -15.953090159297657
LBFGS Accumulation History: 3 points
Removed measurement 4047789d to history. Total: 3
th(0)=-19.67985548557473;dx=-4.4188041266296543E-7
New Minimum: -19.67985548557473 > -21.84718322518865
END: th(1.684339755941405E7)=-21.84718322518865; dx=-1.279020940599486E-8 evalInputDelta=2.1673277396139206
Fitness changed from -19.67985548557473 to -21.84718322518865
Iteration 5 complete. Error: -21.84718322518865 Total: 9.6851; Orientation: 1.2076; Line Search: 5.3543
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>
Adding measurement 4d8f3fd3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.186e+04, gradient 6.231e-04, dot -0.343; [20940155-139f-45ba-bbdc-bad7fd47f649 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -21.84718322518865, -17.429301692691762, -16.531378551924377, -15.953090159297657
LBFGS Accumulation History: 3 points
Removed measurement 4d8f3fd3 to history. Total: 3
th(0)=-21.84718322518865;dx=-3.8769715496176235E-7
New Minimum: -21.84718322518865 > -24.430510997158564
WOLF (strong): th(3.6288E7)=-24.430510997158564; dx=1.5039321284123295E-8 evalInputDelta=2.5833277719699126
New Minimum: -24.430510997158564 > -24.87567735030981
WOLF (strong): th(1.8144E7)=-24.87567735030981; dx=1.1559100827056152E-8 evalInputDelta=3.02849412512116
END: th(6048000.0)=-24.06998271747067; dx=-2.1204948435156677E-7 evalInputDelta=2.222799492282018
Fitness changed from -21.84718322518865 to -24.87567735030981
Iteration 6 complete. Error: -24.87567735030981 Total: 14.8177; Orientation: 1.1130; Line Search: 10.6253
Adding measurement 53c110e4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.512e+04, gradient 6.109e-04, dot -0.331; [20940155-139f-45ba-bbdc-bad7fd47f649 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -24.87567735030981, -17.429301692691762, -16.531378551924377, -15.953090159297657
LBFGS Accumulation History: 3 points
Removed measurement 53c110e4 to history. Total: 3
th(0)=-24.87567735030981;dx=-3.7300659619761974E-7
New Minimum: -24.87567735030981 > -27.607694029329156
WOLF (strong): th(1.3030021005312834E7)=-27.607694029329156; dx=7.611977008623919E-9 evalInputDelta=2.7320166790193454
END: th(6515010.502656417)=-27.113714643692578; dx=-1.808505672307711E-7 evalInputDelta=2.2380372933827672
Fitness changed from -24.87567735030981 to -27.607694029329156
Iteration 7 complete. Error: -27.607694029329156 Total: 11.6188; Orientation: 1.0767; Line Search: 8.1598
Adding measurement 7c184191 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.349e+04, gradient 6.130e-04, dot -0.362; [20940155-139f-45ba-bbdc-bad7fd47f649 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -27.607694029329156, -17.429301692691762, -16.531378551924377, -15.953090159297657
LBFGS Accumulation History: 3 points
Removed measurement 7c184191 to history. Total: 3
th(0)=-27.607694029329156;dx=-3.755185143426784E-7
New Minimum: -27.607694029329156 > -28.99266064515678
WOLF (strong): th(1.4036164632845046E7)=-28.99266064515678; dx=7.73956776788097E-8 evalInputDelta=1.3849666158276221
New Minimum: -28.99266064515678 > -29.455632268713654
END: th(7018082.316422523)=-29.455632268713654; dx=-2.6793554349683723E-8 evalInputDelta=1.8479382393844972
Fitness changed from -27.607694029329156 to -29.455632268713654
Iteration 8 complete. Error: -29.455632268713654 Total: 11.7411; Orientation: 1.1223; Line Search: 7.9491
Adding measurement 508fd8b1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.254e+04, gradient 6.059e-04, dot -0.403; [20940155-139f-45ba-bbdc-bad7fd47f649 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -29.455632268713654, -17.429301692691762, -16.531378551924377, -15.953090159297657
LBFGS Accumulation History: 3 points
Removed measurement 508fd8b1 to history. Total: 3
th(0)=-29.455632268713654;dx=-3.667341043632674E-7
New Minimum: -29.455632268713654 > -29.597717251634617
WOLF (strong): th(1.5120000000000004E7)=-29.597717251634617; dx=3.7782818787745316E-8 evalInputDelta=0.14208498292096294
New Minimum: -29.597717251634617 > -30.125872557847224
WOLF (strong): th(7560000.000000002)=-30.125872557847224; dx=7.42003922760003E-8 evalInputDelta=0.6702402891335701
New Minimum: -30.125872557847224 > -30.257884538565072
END: th(2520000.0000000005)=-30.257884538565072; dx=-1.494148035825584E-7 evalInputDelta=0.8022522698514187
Fitness changed from -29.455632268713654 to -30.257884538565072
Iteration 9 complete. Error: -30.257884538565072 Total: 14.3836; Orientation: 1.1067; Line Search: 10.6576
Adding measurement 4f0dec7a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.760e+04, gradient 5.087e-04, dot -0.497; [20940155-139f-45ba-bbdc-bad7fd47f649 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -30.257884538565072, -17.429301692691762, -16.531378551924377, -15.953090159297657
LBFGS Accumulation History: 3 points
Removed measurement 4f0dec7a to history. Total: 3
th(0)=-30.257884538565072;dx=-2.58585712136202E-7
New Minimum: -30.257884538565072 > -30.815574663869825
END: th(5429175.418880348)=-30.815574663869825; dx=-1.0584686635613118E-8 evalInputDelta=0.5576901253047524
Fitness changed from -30.257884538565072 to -30.815574663869825
Iteration 10 complete. Error: -30.815574663869825 Total: 9.1978; Orientation: 1.1257; Line Search: 5.2161
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>
Final threshold in iteration 11: -30.815574663869825 (> -Infinity) after 133.155s (< 5400.000s)
Returns
-30.815574663869825