BasicOptimizer.scala:89 executed in 324.18 seconds (5.138 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: 654600436713500
Reset training subject: 654606602486600
Adding measurement 263fdac6 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-37.03149966500033;dx=-1.729375149485657E-6
New Minimum: -37.03149966500033 > -37.03150170454096
WOLFE (weak): th(2.154434690031884)=-37.03150170454096; dx=-1.563611159219691E-6 evalInputDelta=2.039540625276004E-6
New Minimum: -37.03150170454096 > -37.03150578362188
WOLFE (weak): th(4.308869380063768)=-37.03150578362188; dx=-1.5634878455585846E-6 evalInputDelta=6.1186215489783535E-6
New Minimum: -37.03150578362188 > -37.03152413948045
WOLFE (weak): th(12.926608140191302)=-37.03152413948045; dx=-1.5641680782089268E-6 evalInputDelta=2.4474480120773023E-5
New Minimum: -37.03152413948045 > -37.03158940468171
WOLFE (weak): th(51.70643256076521)=-37.03158940468171; dx=-1.5641055346817175E-6 evalInputDelta=8.973968137837574E-5
New Minimum: -37.03158940468171 > -37.031950400748464
WOLFE (weak): th(258.53216280382605)=-37.031950400748464; dx=-1.5641558585432678E-6 evalInputDelta=4.507357481315921E-4
New Minimum: -37.031950400748464 > -37.03420195781014
WOLFE (weak): th(1551.1929768229563)=-37.03420195781014; dx=-1.5638748079945278E-6 evalInputDelta=0.002702292809807716
New Minimum: -37.03420195781014 > -37.05041769120913
WOLFE (weak): th(10858.350837760694)=-37.05041769120913; dx=-1.5633656324865785E-6 evalInputDelta=0.01891802620879446
New Minimum: -37.05041769120913 > -37.18250124332745
END: th(86866.80670208555)=-37.18250124332745; dx=-1.556224292054668E-6 evalInputDelta=0.15100157832711858
Fitness changed from -37.03149966500033 to -37.18250124332745
Iteration 1 complete. Error: -37.18250124332745 Total: 74.2707; Orientation: 0.1477; Line Search: 56.1423
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/2d0e29a2-5cb4-423b-834f-f353617629d2.jpg)
Adding measurement 9e4bdf to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-37.18250124332745;dx=-1.5471130876175435E-6
New Minimum: -37.18250124332745 > -37.50288439427961
WOLFE (weak): th(187148.86177126726)=-37.50288439427961; dx=-1.5278532085509821E-6 evalInputDelta=0.32038315095216063
New Minimum: -37.50288439427961 > -37.81897398081532
WOLFE (weak): th(374297.7235425345)=-37.81897398081532; dx=-1.5062225206022326E-6 evalInputDelta=0.6364727374878711
New Minimum: -37.81897398081532 > -39.03792643569398
WOLFE (weak): th(1122893.1706276035)=-39.03792643569398; dx=-1.4161188663779702E-6 evalInputDelta=1.855425192366532
New Minimum: -39.03792643569398 > -43.46478550867473
END: th(4491572.682510414)=-43.46478550867473; dx=-9.28593558475976E-7 evalInputDelta=6.282284265347279
Fitness changed from -37.18250124332745 to -43.46478550867473
Iteration 2 complete. Error: -43.46478550867473 Total: 39.8107; Orientation: 0.1455; Line Search: 32.3853
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/492dbbfc-07ce-4998-8897-9cbf566825f7.jpg)
Adding measurement 440a8207 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-43.46478550867473;dx=-8.715926356296862E-7
New Minimum: -43.46478550867473 > -49.95000633699172
END: th(9676800.000000002)=-49.95000633699172; dx=-3.655477906043441E-7 evalInputDelta=6.48522082831699
Fitness changed from -43.46478550867473 to -49.95000633699172
Iteration 3 complete. Error: -49.95000633699172 Total: 20.6576; Orientation: 0.1766; Line Search: 13.0046
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/d5d0b305-3245-4856-bedf-dae9e0849460.jpg)
Adding measurement 7ae6145c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.435e+03, gradient 7.994e-04, dot -0.490; [d7376ee8-718c-4a30-a57e-0f700f572aa5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -49.95000633699172, -43.46478550867473, -37.18250124332745, -37.03149966500033
LBFGS Accumulation History: 3 points
Removed measurement 7ae6145c to history. Total: 3
th(0)=-49.95000633699172;dx=-6.385789825156505E-7
New Minimum: -49.95000633699172 > -55.372231367103495
END: th(2.0848033608500537E7)=-55.372231367103495; dx=-4.291115335677089E-8 evalInputDelta=5.422225030111775
Fitness changed from -49.95000633699172 to -55.372231367103495
Iteration 4 complete. Error: -55.372231367103495 Total: 22.4866; Orientation: 2.6482; Line Search: 12.3970
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/672abcbd-c860-446d-89ff-f740825f38ea.jpg)
Adding measurement 22869336 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.062e+04, gradient 1.014e-03, dot -0.295; [d7376ee8-718c-4a30-a57e-0f700f572aa5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -55.372231367103495, -43.46478550867473, -37.18250124332745, -37.03149966500033
LBFGS Accumulation History: 3 points
Removed measurement 22869336 to history. Total: 3
th(0)=-55.372231367103495;dx=-1.0275046405721653E-6
Armijo: th(4.491572682510415E7)=-49.35624130436593; dx=2.451544030293749E-7 evalInputDelta=-6.015990062737565
New Minimum: -55.372231367103495 > -57.80195268113031
WOLF (strong): th(2.2457863412552074E7)=-57.80195268113031; dx=3.730947980949567E-7 evalInputDelta=2.429721314026814
New Minimum: -57.80195268113031 > -61.09256189713188
END: th(7485954.470850691)=-61.09256189713188; dx=-2.950945902082775E-7 evalInputDelta=5.720330530028384
Fitness changed from -55.372231367103495 to -61.09256189713188
Iteration 5 complete. Error: -61.09256189713188 Total: 33.2575; Orientation: 2.5689; Line Search: 23.6341
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/3fa9dd98-ffbd-42b3-9744-3b011a3f78a4.jpg)
Adding measurement 711613e8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.471e+04, gradient 6.989e-04, dot -0.579; [d7376ee8-718c-4a30-a57e-0f700f572aa5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -61.09256189713188, -43.46478550867473, -37.18250124332745, -37.03149966500033
LBFGS Accumulation History: 3 points
Removed measurement 711613e8 to history. Total: 3
th(0)=-61.09256189713188;dx=-4.876261435545627E-7
New Minimum: -61.09256189713188 > -65.52511803936984
END: th(1.6128000000000004E7)=-65.52511803936984; dx=-8.027784326381126E-8 evalInputDelta=4.432556142237964
Fitness changed from -61.09256189713188 to -65.52511803936984
Iteration 6 complete. Error: -65.52511803936984 Total: 22.0226; Orientation: 2.6129; Line Search: 12.1977
Adding measurement 40174908 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.153e+04, gradient 8.508e-04, dot -0.427; [d7376ee8-718c-4a30-a57e-0f700f572aa5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -65.52511803936984, -43.46478550867473, -37.18250124332745, -37.03149966500033
LBFGS Accumulation History: 3 points
Removed measurement 40174908 to history. Total: 3
th(0)=-65.52511803936984;dx=-7.227109022135631E-7
Armijo: th(3.4746722680834234E7)=-63.49915345635105; dx=2.114830472448648E-7 evalInputDelta=-2.0259645830187907
New Minimum: -65.52511803936984 > -68.25137213765107
WOLF (strong): th(1.7373361340417117E7)=-68.25137213765107; dx=2.057743826641602E-7 evalInputDelta=2.726254098281231
New Minimum: -68.25137213765107 > -68.84888137696805
END: th(5791120.446805705)=-68.84888137696805; dx=-2.881189719345505E-7 evalInputDelta=3.3237633375982085
Fitness changed from -65.52511803936984 to -68.84888137696805
Iteration 7 complete. Error: -68.84888137696805 Total: 33.1278; Orientation: 2.5326; Line Search: 24.4431
Adding measurement 360c02c8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.631e+04, gradient 5.860e-04, dot -0.712; [d7376ee8-718c-4a30-a57e-0f700f572aa5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -68.84888137696805, -43.46478550867473, -37.18250124332745, -37.03149966500033
LBFGS Accumulation History: 3 points
Removed measurement 360c02c8 to history. Total: 3
th(0)=-68.84888137696805;dx=-3.4291691260082066E-7
New Minimum: -68.84888137696805 > -72.45549988304239
END: th(1.2476590784751154E7)=-72.45549988304239; dx=-2.0632009427338474E-7 evalInputDelta=3.6066185060743408
Fitness changed from -68.84888137696805 to -72.45549988304239
Iteration 8 complete. Error: -72.45549988304239 Total: 20.9827; Orientation: 2.5510; Line Search: 12.3976
Adding measurement 6ed67ef1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.596e+04, gradient 6.323e-04, dot -0.636; [d7376ee8-718c-4a30-a57e-0f700f572aa5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -72.45549988304239, -43.46478550867473, -37.18250124332745, -37.03149966500033
LBFGS Accumulation History: 3 points
Removed measurement 6ed67ef1 to history. Total: 3
th(0)=-72.45549988304239;dx=-3.98368501758535E-7
New Minimum: -72.45549988304239 > -76.15139417613507
END: th(2.688000000000001E7)=-76.15139417613507; dx=-1.2125311355794766E-8 evalInputDelta=3.695894293092678
Fitness changed from -72.45549988304239 to -76.15139417613507
Iteration 9 complete. Error: -76.15139417613507 Total: 21.4464; Orientation: 2.5363; Line Search: 13.0571
Adding measurement 5268c901 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.861e+04, gradient 9.107e-04, dot -0.331; [d7376ee8-718c-4a30-a57e-0f700f572aa5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -76.15139417613507, -43.46478550867473, -37.18250124332745, -37.03149966500033
LBFGS Accumulation History: 3 points
Removed measurement 5268c901 to history. Total: 3
th(0)=-76.15139417613507;dx=-8.28504392587309E-7
Armijo: th(5.791120446805706E7)=-65.71361800801125; dx=2.403752567922802E-7 evalInputDelta=-10.437776168123818
New Minimum: -76.15139417613507 > -76.55925837820506
WOLF (strong): th(2.895560223402853E7)=-76.55925837820506; dx=3.787460807983691E-7 evalInputDelta=0.4078642020699874
New Minimum: -76.55925837820506 > -81.86401647865301
END: th(9651867.411342843)=-81.86401647865301; dx=-1.853646662104007E-7 evalInputDelta=5.712622302517943
Fitness changed from -76.15139417613507 to -81.86401647865301
Iteration 10 complete. Error: -81.86401647865301 Total: 35.0897; Orientation: 2.9061; Line Search: 25.4325
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/42106296-7f0c-493b-a47c-871b83b8d7a6.jpg)
Final threshold in iteration 11: -81.86401647865301 (> -Infinity) after 324.176s (< 5400.000s)
Returns
-81.86401647865301