BasicOptimizer.scala:89 executed in 133.47 seconds (1.681 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: 109429860659500
Reset training subject: 109432671732200
Adding measurement 595a4fdf to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-30.078613749024402;dx=-1.1777895151327626E-6
New Minimum: -30.078613749024402 > -30.078615154750995
END: th(2.154434690031884)=-30.078615154750995; dx=-9.08492137507973E-7 evalInputDelta=1.4057265929068308E-6
Fitness changed from -30.078613749024402 to -30.078615154750995
Iteration 1 complete. Error: -30.078615154750995 Total: 13.6523; Orientation: 0.0655; Line Search: 5.5326
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding measurement c95e166 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-30.078615154750995;dx=-9.074810756634117E-7
New Minimum: -30.078615154750995 > -30.07861937193038
WOLFE (weak): th(4.641588833612779)=-30.07861937193038; dx=-9.072416974347497E-7 evalInputDelta=4.217179384369274E-6
New Minimum: -30.07861937193038 > -30.0786249948353
WOLFE (weak): th(9.283177667225559)=-30.0786249948353; dx=-9.072226617626053E-7 evalInputDelta=9.840084306489416E-6
New Minimum: -30.0786249948353 > -30.07864326926905
WOLFE (weak): th(27.849533001676676)=-30.07864326926905; dx=-9.066149864998271E-7 evalInputDelta=2.8114518055843973E-5
New Minimum: -30.07864326926905 > -30.078726206944207
WOLFE (weak): th(111.3981320067067)=-30.078726206944207; dx=-9.051602463872779E-7 evalInputDelta=1.1105219321194681E-4
New Minimum: -30.078726206944207 > -30.079170411617007
WOLFE (weak): th(556.9906600335335)=-30.079170411617007; dx=-9.06172595830439E-7 evalInputDelta=5.552568660114332E-4
New Minimum: -30.079170411617007 > -30.08193389207128
WOLFE (weak): th(3341.9439602012008)=-30.08193389207128; dx=-9.059974955958351E-7 evalInputDelta=0.0033187373202849813
New Minimum: -30.08193389207128 > -30.101828799769212
WOLFE (weak): th(23393.607721408407)=-30.101828799769212; dx=-9.052954080434173E-7 evalInputDelta=0.023213645018216766
New Minimum: -30.101828799769212 > -30.263477869242383
WOLFE (weak): th(187148.86177126726)=-30.263477869242383; dx=-8.952676644669925E-7 evalInputDelta=0.1848627144913877
New Minimum: -30.263477869242383 > -31.64471209063773
END: th(1684339.7559414054)=-31.64471209063773; dx=-7.834267853808552E-7 evalInputDelta=1.5660969358867334
Fitness changed from -30.078615154750995 to -31.64471209063773
Iteration 2 complete. Error: -31.64471209063773 Total: 29.8211; Orientation: 0.0622; Line Search: 26.6055
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>
Adding measurement 6ccea74a to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-31.64471209063773;dx=-7.974972948434645E-7
New Minimum: -31.64471209063773 > -34.225210738302955
END: th(3628800.0000000005)=-34.225210738302955; dx=-5.426997905909257E-7 evalInputDelta=2.5804986476652267
Fitness changed from -31.64471209063773 to -34.225210738302955
Iteration 3 complete. Error: -34.225210738302955 Total: 8.7637; Orientation: 0.0640; Line Search: 5.4327
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>
Adding measurement 21b2258e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.269e+04, gradient 7.406e-04, dot -0.812; [17af6d30-cb7a-4e6a-94ae-30033cd54016 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -34.225210738302955, -31.64471209063773, -30.078615154750995, -30.078613749024402
LBFGS Accumulation History: 3 points
Removed measurement 21b2258e to history. Total: 3
th(0)=-34.225210738302955;dx=-5.479518107843823E-7
New Minimum: -34.225210738302955 > -37.7979411281702
END: th(7818012.603187701)=-37.7979411281702; dx=-3.0549334828578573E-7 evalInputDelta=3.572730389867246
Fitness changed from -34.225210738302955 to -37.7979411281702
Iteration 4 complete. Error: -37.7979411281702 Total: 9.8352; Orientation: 1.1978; Line Search: 5.5271
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>
Adding measurement 48a13b4a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.163e+04, gradient 6.659e-04, dot -0.600; [17af6d30-cb7a-4e6a-94ae-30033cd54016 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -37.7979411281702, -31.64471209063773, -30.078615154750995, -30.078613749024402
LBFGS Accumulation History: 3 points
Removed measurement 48a13b4a to history. Total: 3
th(0)=-37.7979411281702;dx=-4.43202258755075E-7
New Minimum: -37.7979411281702 > -41.703510553894205
END: th(1.6843397559414055E7)=-41.703510553894205; dx=-1.0592949949599655E-7 evalInputDelta=3.9055694257240035
Fitness changed from -37.7979411281702 to -41.703510553894205
Iteration 5 complete. Error: -41.703510553894205 Total: 10.1941; Orientation: 1.2000; Line Search: 5.5003
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>
Adding measurement 64284e38 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.210e+04, gradient 7.312e-04, dot -0.357; [17af6d30-cb7a-4e6a-94ae-30033cd54016 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -41.703510553894205, -31.64471209063773, -30.078615154750995, -30.078613749024402
LBFGS Accumulation History: 3 points
Removed measurement 64284e38 to history. Total: 3
th(0)=-41.703510553894205;dx=-5.335578227863157E-7
New Minimum: -41.703510553894205 > -43.238623426483315
WOLF (strong): th(3.628800000000001E7)=-43.238623426483315; dx=6.410845562029251E-8 evalInputDelta=1.5351128725891101
New Minimum: -43.238623426483315 > -44.641957606335254
WOLF (strong): th(1.8144000000000004E7)=-44.641957606335254; dx=4.6903318503746166E-8 evalInputDelta=2.938447052441049
END: th(6048000.000000001)=-44.23473451802545; dx=-2.2025896459347823E-7 evalInputDelta=2.531223964131243
Fitness changed from -41.703510553894205 to -44.641957606335254
Iteration 6 complete. Error: -44.641957606335254 Total: 15.3834; Orientation: 1.1978; Line Search: 11.0980
Adding measurement 4fdc542f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.240e+04, gradient 7.769e-04, dot -0.251; [17af6d30-cb7a-4e6a-94ae-30033cd54016 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -44.641957606335254, -31.64471209063773, -30.078615154750995, -30.078613749024402
LBFGS Accumulation History: 3 points
Removed measurement 4fdc542f to history. Total: 3
th(0)=-44.641957606335254;dx=-6.027642478605048E-7
New Minimum: -44.641957606335254 > -48.63238225432512
WOLF (strong): th(1.3030021005312836E7)=-48.63238225432512; dx=2.39919061542263E-8 evalInputDelta=3.990424647989869
END: th(6515010.502656418)=-47.87887763508515; dx=-2.796952228282851E-7 evalInputDelta=3.2369200287499
Fitness changed from -44.641957606335254 to -48.63238225432512
Iteration 7 complete. Error: -48.63238225432512 Total: 11.9999; Orientation: 1.1899; Line Search: 8.1805
Adding measurement 6615946f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.140e+04, gradient 6.670e-04, dot -0.367; [17af6d30-cb7a-4e6a-94ae-30033cd54016 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -48.63238225432512, -31.64471209063773, -30.078615154750995, -30.078613749024402
LBFGS Accumulation History: 3 points
Removed measurement 6615946f to history. Total: 3
th(0)=-48.63238225432512;dx=-4.4389001818907194E-7
New Minimum: -48.63238225432512 > -51.07587672389698
WOLF (strong): th(1.4036164632845048E7)=-51.07587672389698; dx=5.758024414069358E-8 evalInputDelta=2.44349446957186
END: th(7018082.316422524)=-50.93513328284908; dx=-1.461282029998073E-7 evalInputDelta=2.302751028523957
Fitness changed from -48.63238225432512 to -51.07587672389698
Iteration 8 complete. Error: -51.07587672389698 Total: 11.8862; Orientation: 1.0753; Line Search: 8.2577
Adding measurement 7fdaab54 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.456e+04, gradient 6.906e-04, dot -0.340; [17af6d30-cb7a-4e6a-94ae-30033cd54016 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -51.07587672389698, -31.64471209063773, -30.078615154750995, -30.078613749024402
LBFGS Accumulation History: 3 points
Removed measurement 7fdaab54 to history. Total: 3
th(0)=-51.07587672389698;dx=-4.768396856216559E-7
New Minimum: -51.07587672389698 > -53.0863430203446
WOLF (strong): th(1.5120000000000006E7)=-53.0863430203446; dx=1.2305567690789073E-7 evalInputDelta=2.0104662964476177
New Minimum: -53.0863430203446 > -53.51751809819858
END: th(7560000.000000003)=-53.51751809819858; dx=-9.293237515972666E-8 evalInputDelta=2.4416413743015966
Fitness changed from -51.07587672389698 to -53.51751809819858
Iteration 9 complete. Error: -53.51751809819858 Total: 12.0857; Orientation: 1.1280; Line Search: 8.3189
Adding measurement 1ca5238a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.351e+04, gradient 4.946e-04, dot -0.538; [17af6d30-cb7a-4e6a-94ae-30033cd54016 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -53.51751809819858, -31.64471209063773, -30.078615154750995, -30.078613749024402
LBFGS Accumulation History: 3 points
Removed measurement 1ca5238a to history. Total: 3
th(0)=-53.51751809819858;dx=-2.442852285432951E-7
New Minimum: -53.51751809819858 > -55.40063906079227
END: th(1.6287526256641047E7)=-55.40063906079227; dx=-2.9501285910006808E-8 evalInputDelta=1.8831209625936935
Fitness changed from -53.51751809819858 to -55.40063906079227
Iteration 10 complete. Error: -55.40063906079227 Total: 9.3738; Orientation: 1.1338; Line Search: 5.6874
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>
Final threshold in iteration 11: -55.40063906079227 (> -Infinity) after 133.471s (< 5400.000s)
Returns
-55.40063906079227