BasicOptimizer.scala:89 executed in 208.82 seconds (1.924 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: 14951008096897
Reset training subject: 14955576824077
Adding measurement 1cd4c611 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.9399405717849731;dx=-4.5224238295240463E-7
New Minimum: -0.9399405717849731 > -0.9399407207965851
END: th(2.154434690031884)=-0.9399407207965851; dx=-3.9988584677044167E-7 evalInputDelta=1.4901161193847656E-7
Fitness changed from -0.9399405717849731 to -0.9399407207965851
Iteration 1 complete. Error: -0.9399407207965851 Total: 22.1483; Orientation: 0.0440; Line Search: 8.5857
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/237a667c-2e37-45b9-9efe-b8033ee02ddb.jpg)
Adding measurement 43ef67ae to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.9399407207965851;dx=-3.9989651802178796E-7
New Minimum: -0.9399407207965851 > -0.939941868185997
WOLFE (weak): th(4.641588833612779)=-0.939941868185997; dx=-3.998810662655323E-7 evalInputDelta=1.1473894119262695E-6
New Minimum: -0.939941868185997 > -0.9399428367614746
WOLFE (weak): th(9.283177667225559)=-0.9399428367614746; dx=-3.9987986188261646E-7 evalInputDelta=2.115964889526367E-6
New Minimum: -0.9399428367614746 > -0.9399465620517731
WOLFE (weak): th(27.849533001676676)=-0.9399465620517731; dx=-3.998795692124601E-7 evalInputDelta=5.841255187988281E-6
New Minimum: -0.9399465620517731 > -0.9399632960557938
WOLFE (weak): th(111.3981320067067)=-0.9399632960557938; dx=-3.998833573277317E-7 evalInputDelta=2.25752592086792E-5
New Minimum: -0.9399632960557938 > -0.9400523155927658
WOLFE (weak): th(556.9906600335335)=-0.9400523155927658; dx=-3.998286724759135E-7 evalInputDelta=1.115947961807251E-4
New Minimum: -0.9400523155927658 > -0.9406089186668396
WOLFE (weak): th(3341.9439602012008)=-0.9406089186668396; dx=-3.9953148314564177E-7 evalInputDelta=6.681978702545166E-4
New Minimum: -0.9406089186668396 > -0.944603681564331
WOLFE (weak): th(23393.607721408407)=-0.944603681564331; dx=-3.972270068888982E-7 evalInputDelta=0.004662960767745972
New Minimum: -0.944603681564331 > -0.9763034507632256
WOLFE (weak): th(187148.86177126726)=-0.9763034507632256; dx=-3.7710493897040147E-7 evalInputDelta=0.03636272996664047
New Minimum: -0.9763034507632256 > -1.1895438432693481
END: th(1684339.7559414054)=-1.1895438432693481; dx=-2.0397498256962512E-7 evalInputDelta=0.24960312247276306
Fitness changed from -0.9399407207965851 to -1.1895438432693481
Iteration 2 complete. Error: -1.1895438432693481 Total: 49.1325; Orientation: 0.0472; Line Search: 44.2620
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/0fbe8942-795d-47c3-b373-9c14bbb76a51.jpg)
Adding measurement 49b7c7ce to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-1.1895438432693481;dx=-1.860818925491125E-7
New Minimum: -1.1895438432693481 > -1.4217417240142822
END: th(3628800.0000000005)=-1.4217417240142822; dx=-8.564060932165942E-8 evalInputDelta=0.23219788074493408
Fitness changed from -1.1895438432693481 to -1.4217417240142822
Iteration 3 complete. Error: -1.4217417240142822 Total: 12.7693; Orientation: 0.0456; Line Search: 8.6083
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/34eda45a-34c5-43b7-b43e-57ed6f9a5c75.jpg)
Adding measurement 7a5f014c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.534e+03, gradient 3.097e-04, dot -0.652; [0eb43060-df05-4bbc-9345-2e6077b2caa4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.4217417240142822, -1.1895438432693481, -0.9399407207965851, -0.9399405717849731
LBFGS Accumulation History: 3 points
Removed measurement 7a5f014c to history. Total: 3
th(0)=-1.4217417240142822;dx=-9.589367866670561E-8
New Minimum: -1.4217417240142822 > -1.6439629793167114
END: th(7818012.603187701)=-1.6439629793167114; dx=-3.193679301755013E-8 evalInputDelta=0.2222212553024292
Fitness changed from -1.4217417240142822 to -1.6439629793167114
Iteration 4 complete. Error: -1.6439629793167114 Total: 14.1490; Orientation: 1.0155; Line Search: 8.3550
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/e593a9f6-c149-4566-a820-7514caf89cdc.jpg)
Adding measurement 79069f1c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.555e+03, gradient 2.589e-04, dot -0.491; [0eb43060-df05-4bbc-9345-2e6077b2caa4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.6439629793167114, -1.1895438432693481, -0.9399407207965851, -0.9399405717849731
LBFGS Accumulation History: 3 points
Removed measurement 79069f1c to history. Total: 3
th(0)=-1.6439629793167114;dx=-6.704683540732469E-8
New Minimum: -1.6439629793167114 > -1.8133046627044678
END: th(1.6843397559414055E7)=-1.8133046627044678; dx=-3.0529475659246875E-10 evalInputDelta=0.16934168338775635
Fitness changed from -1.6439629793167114 to -1.8133046627044678
Iteration 5 complete. Error: -1.8133046627044678 Total: 13.9492; Orientation: 1.0196; Line Search: 8.5167
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/d77799d7-3655-4969-8517-b4827c694542.jpg)
Adding measurement 3a6a39b6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.198e+03, gradient 2.704e-04, dot -0.185; [0eb43060-df05-4bbc-9345-2e6077b2caa4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.8133046627044678, -1.1895438432693481, -0.9399407207965851, -0.9399405717849731
LBFGS Accumulation History: 3 points
Removed measurement 3a6a39b6 to history. Total: 3
th(0)=-1.8133046627044678;dx=-7.312320560433854E-8
Armijo: th(3.628800000000001E7)=-1.6844129264354706; dx=2.9755622127993028E-8 evalInputDelta=-0.1288917362689972
New Minimum: -1.8133046627044678 > -1.9170022830367088
WOLF (strong): th(1.8144000000000004E7)=-1.9170022830367088; dx=1.8533611304119918E-8 evalInputDelta=0.10369762033224106
New Minimum: -1.9170022830367088 > -1.9409192278981209
END: th(6048000.000000001)=-1.9409192278981209; dx=-1.7973761855077907E-8 evalInputDelta=0.1276145651936531
Fitness changed from -1.8133046627044678 to -1.9409192278981209
Iteration 6 complete. Error: -1.9409192278981209 Total: 22.4723; Orientation: 1.0460; Line Search: 17.3173
Adding measurement 41cf895a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.849e+03, gradient 1.777e-04, dot -0.381; [0eb43060-df05-4bbc-9345-2e6077b2caa4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.9409192278981209, -1.1895438432693481, -0.9399407207965851, -0.9399405717849731
LBFGS Accumulation History: 3 points
Removed measurement 41cf895a to history. Total: 3
th(0)=-1.9409192278981209;dx=-3.1562668977831473E-8
New Minimum: -1.9409192278981209 > -2.0477250516414642
END: th(1.3030021005312836E7)=-2.0477250516414642; dx=-3.477238185518387E-9 evalInputDelta=0.10680582374334335
Fitness changed from -1.9409192278981209 to -2.0477250516414642
Iteration 7 complete. Error: -2.0477250516414642 Total: 14.1884; Orientation: 1.0162; Line Search: 8.8081
Adding measurement d53a069 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.093e+03, gradient 1.972e-04, dot -0.306; [0eb43060-df05-4bbc-9345-2e6077b2caa4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.0477250516414642, -1.1895438432693481, -0.9399407207965851, -0.9399405717849731
LBFGS Accumulation History: 3 points
Removed measurement d53a069 to history. Total: 3
th(0)=-2.0477250516414642;dx=-3.888181768042202E-8
Armijo: th(2.8072329265690096E7)=-2.028235174715519; dx=1.3188084695950356E-8 evalInputDelta=-0.019489876925945282
New Minimum: -2.0477250516414642 > -2.1012889072299004
WOLF (strong): th(1.4036164632845048E7)=-2.1012889072299004; dx=6.7799648741466426E-9 evalInputDelta=0.05356385558843613
New Minimum: -2.1012889072299004 > -2.103186920285225
END: th(4678721.544281683)=-2.103186920285225; dx=-1.093582979074032E-8 evalInputDelta=0.05546186864376068
Fitness changed from -2.0477250516414642 to -2.103186920285225
Iteration 8 complete. Error: -2.103186920285225 Total: 22.7369; Orientation: 1.1140; Line Search: 16.8756
Adding measurement 6a8cdb4c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.437e+03, gradient 1.339e-04, dot -0.496; [0eb43060-df05-4bbc-9345-2e6077b2caa4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.103186920285225, -1.1895438432693481, -0.9399407207965851, -0.9399405717849731
LBFGS Accumulation History: 3 points
Removed measurement 6a8cdb4c to history. Total: 3
th(0)=-2.103186920285225;dx=-1.791844573295796E-8
New Minimum: -2.103186920285225 > -2.1613799482584
END: th(1.0080000000000004E7)=-2.1613799482584; dx=-6.1462792622470324E-9 evalInputDelta=0.05819302797317505
Fitness changed from -2.103186920285225 to -2.1613799482584
Iteration 9 complete. Error: -2.1613799482584 Total: 14.4002; Orientation: 1.0412; Line Search: 8.9662
Adding measurement 7b65cc9b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.516e+03, gradient 1.465e-04, dot -0.411; [0eb43060-df05-4bbc-9345-2e6077b2caa4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.1613799482584, -1.1895438432693481, -0.9399407207965851, -0.9399405717849731
LBFGS Accumulation History: 3 points
Removed measurement 7b65cc9b to history. Total: 3
th(0)=-2.1613799482584;dx=-2.1471428761514157E-8
New Minimum: -2.1613799482584 > -2.1904671862721443
WOLF (strong): th(2.1716701675521396E7)=-2.1904671862721443; dx=3.265576308003058E-9 evalInputDelta=0.029087238013744354
New Minimum: -2.1904671862721443 > -2.2017542123794556
WOLF (strong): th(1.0858350837760698E7)=-2.2017542123794556; dx=4.114862972239266E-10 evalInputDelta=0.0403742641210556
END: th(3619450.279253566)=-2.1895545050501823; dx=-9.932762302460143E-9 evalInputDelta=0.02817455679178238
Fitness changed from -2.1613799482584 to -2.2017542123794556
Iteration 10 complete. Error: -2.2017542123794556 Total: 22.8036; Orientation: 1.1215; Line Search: 17.2522
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/f0745995-3399-4548-a5b5-2a59e8dfe29b.jpg)
Final threshold in iteration 11: -2.2017542123794556 (> -Infinity) after 208.822s (< 5400.000s)
Returns
-2.2017542123794556