BasicOptimizer.scala:89 executed in 135.13 seconds (1.713 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: 69617095223200
Reset training subject: 69619817892800
Adding measurement 2fe66584 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-18.200924112838813;dx=-8.75261689281432E-7
New Minimum: -18.200924112838813 > -18.20092482197087
END: th(2.154434690031884)=-18.20092482197087; dx=-7.299621574318577E-7 evalInputDelta=7.091320561869452E-7
Fitness changed from -18.200924112838813 to -18.20092482197087
Iteration 1 complete. Error: -18.20092482197087 Total: 13.4590; Orientation: 0.0656; Line Search: 5.3068
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding measurement 3a76e48 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-18.20092482197087;dx=-7.277571726540944E-7
New Minimum: -18.20092482197087 > -18.20092836763074
WOLFE (weak): th(4.641588833612779)=-18.20092836763074; dx=-7.271529907552258E-7 evalInputDelta=3.545659872372653E-6
New Minimum: -18.20092836763074 > -18.20093262242167
WOLFE (weak): th(9.283177667225559)=-18.20093262242167; dx=-7.272080356661586E-7 evalInputDelta=7.800450802619707E-6
New Minimum: -18.20093262242167 > -18.20094822331325
WOLFE (weak): th(27.849533001676676)=-18.20094822331325; dx=-7.270673921369897E-7 evalInputDelta=2.340134238210112E-5
New Minimum: -18.20094822331325 > -18.201017008903023
WOLFE (weak): th(111.3981320067067)=-18.201017008903023; dx=-7.267813254226031E-7 evalInputDelta=9.218693215373719E-5
New Minimum: -18.201017008903023 > -18.20137936993463
WOLFE (weak): th(556.9906600335335)=-18.20137936993463; dx=-7.269799607869247E-7 evalInputDelta=4.5454796376276363E-4
New Minimum: -18.20137936993463 > -18.203651230475653
WOLFE (weak): th(3341.9439602012008)=-18.203651230475653; dx=-7.263109217456567E-7 evalInputDelta=0.002726408504784672
New Minimum: -18.203651230475653 > -18.219967111301482
WOLFE (weak): th(23393.607721408407)=-18.219967111301482; dx=-7.23131739864345E-7 evalInputDelta=0.01904228933061347
New Minimum: -18.219967111301482 > -18.34973627249865
WOLFE (weak): th(187148.86177126726)=-18.34973627249865; dx=-6.874404103854051E-7 evalInputDelta=0.14881145052778066
New Minimum: -18.34973627249865 > -19.105995548500218
END: th(1684339.7559414054)=-19.105995548500218; dx=-2.664121268375039E-7 evalInputDelta=0.905070726529349
Fitness changed from -18.20092482197087 to -19.105995548500218
Iteration 2 complete. Error: -19.105995548500218 Total: 28.6987; Orientation: 0.0624; Line Search: 25.7010
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>
Adding measurement 12d3e366 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-19.105995548500218;dx=-7.204327184754618E-7
New Minimum: -19.105995548500218 > -20.031164597635094
END: th(3628800.0000000005)=-20.031164597635094; dx=-1.0921303954835602E-7 evalInputDelta=0.9251690491348761
Fitness changed from -19.105995548500218 to -20.031164597635094
Iteration 3 complete. Error: -20.031164597635094 Total: 8.3552; Orientation: 0.0627; Line Search: 5.1287
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>
Adding measurement 76cc288f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.265e+03, gradient 8.401e-04, dot -0.521; [4dc3bbbc-84a8-4220-a679-cfb1119a8408 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -20.031164597635094, -19.105995548500218, -18.20092482197087, -18.200924112838813
LBFGS Accumulation History: 3 points
Removed measurement 76cc288f to history. Total: 3
th(0)=-20.031164597635094;dx=-7.058022805984704E-7
New Minimum: -20.031164597635094 > -21.279499919148368
END: th(7818012.603187701)=-21.279499919148368; dx=-8.791625867674392E-9 evalInputDelta=1.2483353215132738
Fitness changed from -20.031164597635094 to -21.279499919148368
Iteration 4 complete. Error: -21.279499919148368 Total: 9.3598; Orientation: 1.1025; Line Search: 5.3214
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>
Adding measurement 3221b85d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.882e+03, gradient 7.648e-04, dot -0.212; [4dc3bbbc-84a8-4220-a679-cfb1119a8408 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -21.279499919148368, -19.105995548500218, -18.20092482197087, -18.200924112838813
LBFGS Accumulation History: 3 points
Removed measurement 3221b85d to history. Total: 3
th(0)=-21.279499919148368;dx=-5.849988459643407E-7
New Minimum: -21.279499919148368 > -23.315271775502705
WOLF (strong): th(1.6843397559414055E7)=-23.315271775502705; dx=2.4760369777070964E-8 evalInputDelta=2.035771856354337
New Minimum: -23.315271775502705 > -23.636442083416593
WOLF (strong): th(8421698.779707028)=-23.636442083416593; dx=8.057693225819187E-9 evalInputDelta=2.356942164268226
END: th(2807232.926569009)=-22.867077202908003; dx=-3.6782533352102753E-7 evalInputDelta=1.5875772837596358
Fitness changed from -21.279499919148368 to -23.636442083416593
Iteration 5 complete. Error: -23.636442083416593 Total: 14.5933; Orientation: 1.1363; Line Search: 10.4246
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>
Adding measurement 3158c2d5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.374e+03, gradient 7.655e-04, dot -0.295; [4dc3bbbc-84a8-4220-a679-cfb1119a8408 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -23.636442083416593, -19.105995548500218, -18.20092482197087, -18.200924112838813
LBFGS Accumulation History: 3 points
Removed measurement 3158c2d5 to history. Total: 3
th(0)=-23.636442083416593;dx=-5.860333109442881E-7
New Minimum: -23.636442083416593 > -25.537720539281644
WOLF (strong): th(6048000.000000001)=-25.537720539281644; dx=4.745693526475414E-8 evalInputDelta=1.9012784558650502
END: th(3024000.0000000005)=-25.249118526633694; dx=-2.8557383150567333E-7 evalInputDelta=1.6126764432171008
Fitness changed from -23.636442083416593 to -25.537720539281644
Iteration 6 complete. Error: -25.537720539281644 Total: 12.1123; Orientation: 1.1463; Line Search: 7.9692
Adding measurement 1c690f9e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.204e+04, gradient 7.512e-04, dot -0.354; [4dc3bbbc-84a8-4220-a679-cfb1119a8408 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -25.537720539281644, -19.105995548500218, -18.20092482197087, -18.200924112838813
LBFGS Accumulation History: 3 points
Removed measurement 1c690f9e to history. Total: 3
th(0)=-25.537720539281644;dx=-5.640842955748256E-7
New Minimum: -25.537720539281644 > -26.402211848893096
WOLF (strong): th(6515010.502656418)=-26.402211848893096; dx=1.6093449497971414E-7 evalInputDelta=0.8644913096114522
New Minimum: -26.402211848893096 > -26.81331025378574
END: th(3257505.251328209)=-26.81331025378574; dx=-4.3661649268792176E-8 evalInputDelta=1.2755897145040969
Fitness changed from -25.537720539281644 to -26.81331025378574
Iteration 7 complete. Error: -26.81331025378574 Total: 11.1883; Orientation: 1.0717; Line Search: 7.6473
Adding measurement 68d2c11e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.783e+04, gradient 6.508e-04, dot -0.474; [4dc3bbbc-84a8-4220-a679-cfb1119a8408 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -26.81331025378574, -19.105995548500218, -18.20092482197087, -18.200924112838813
LBFGS Accumulation History: 3 points
Removed measurement 68d2c11e to history. Total: 3
th(0)=-26.81331025378574;dx=-4.232577959920046E-7
New Minimum: -26.81331025378574 > -27.041681765625608
WOLF (strong): th(7018082.316422524)=-27.041681765625608; dx=5.169985559049006E-8 evalInputDelta=0.22837151183986748
New Minimum: -27.041681765625608 > -27.329242739138234
WOLF (strong): th(3509041.158211262)=-27.329242739138234; dx=6.355043471062898E-8 evalInputDelta=0.5159324853524936
END: th(1169680.3860704207)=-27.25980598503257; dx=-2.2471447066565828E-7 evalInputDelta=0.44649573124683073
Fitness changed from -26.81331025378574 to -27.329242739138234
Iteration 8 complete. Error: -27.329242739138234 Total: 13.9445; Orientation: 1.0384; Line Search: 10.3720
Adding measurement 5410754b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.825e+04, gradient 6.956e-04, dot -0.425; [4dc3bbbc-84a8-4220-a679-cfb1119a8408 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -27.329242739138234, -19.105995548500218, -18.20092482197087, -18.200924112838813
LBFGS Accumulation History: 3 points
Removed measurement 5410754b to history. Total: 3
th(0)=-27.329242739138234;dx=-4.834473179841367E-7
New Minimum: -27.329242739138234 > -28.085569767470908
WOLF (strong): th(2520000.000000001)=-28.085569767470908; dx=3.3045982287444764E-8 evalInputDelta=0.7563270283326737
END: th(1260000.0000000005)=-27.916294571719583; dx=-3.0346558459825447E-7 evalInputDelta=0.5870518325813485
Fitness changed from -27.329242739138234 to -28.085569767470908
Iteration 9 complete. Error: -28.085569767470908 Total: 11.4537; Orientation: 1.0296; Line Search: 7.7025
Adding measurement 39d5514 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.174e+04, gradient 6.319e-04, dot -0.490; [4dc3bbbc-84a8-4220-a679-cfb1119a8408 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -28.085569767470908, -19.105995548500218, -18.20092482197087, -18.200924112838813
LBFGS Accumulation History: 3 points
Removed measurement 39d5514 to history. Total: 3
th(0)=-28.085569767470908;dx=-3.9915160999521123E-7
New Minimum: -28.085569767470908 > -28.41392320721509
WOLF (strong): th(2714587.7094401745)=-28.41392320721509; dx=8.949545493258322E-8 evalInputDelta=0.3283534397441805
New Minimum: -28.41392320721509 > -28.47169158275504
END: th(1357293.8547200873)=-28.47169158275504; dx=-7.226056090865484E-8 evalInputDelta=0.38612181528413103
Fitness changed from -28.085569767470908 to -28.47169158275504
Iteration 10 complete. Error: -28.47169158275504 Total: 11.4773; Orientation: 1.1014; Line Search: 7.7825
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>
Final threshold in iteration 11: -28.47169158275504 (> -Infinity) after 135.131s (< 5400.000s)
Returns
-28.47169158275504