BasicOptimizer.scala:89 executed in 206.53 seconds (1.686 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: 5241878346200
Reset training subject: 5246376232119
Adding measurement 1685871a to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.14049437642097473;dx=-5.587335269733604E-7
New Minimum: -0.14049437642097473 > -0.14049449563026428
END: th(2.154434690031884)=-0.14049449563026428; dx=-4.977986629587323E-7 evalInputDelta=1.1920928955078125E-7
Fitness changed from -0.14049437642097473 to -0.14049449563026428
Iteration 1 complete. Error: -0.14049449563026428 Total: 21.6373; Orientation: 0.0447; Line Search: 8.9698
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/2ebfcfcc-ac17-475a-9eb7-658dc3fe266b.jpg)
Adding measurement 45377355 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.14049449563026428;dx=-4.97798758781692E-7
New Minimum: -0.14049449563026428 > -0.14049570262432098
WOLFE (weak): th(4.641588833612779)=-0.14049570262432098; dx=-4.978030806453896E-7 evalInputDelta=1.2069940567016602E-6
New Minimum: -0.14049570262432098 > -0.14049719274044037
WOLFE (weak): th(9.283177667225559)=-0.14049719274044037; dx=-4.978014378596971E-7 evalInputDelta=2.6971101760864258E-6
New Minimum: -0.14049719274044037 > -0.14050200581550598
WOLFE (weak): th(27.849533001676676)=-0.14050200581550598; dx=-4.978053037851568E-7 evalInputDelta=7.510185241699219E-6
New Minimum: -0.14050200581550598 > -0.14052283763885498
WOLFE (weak): th(111.3981320067067)=-0.14052283763885498; dx=-4.977919004782843E-7 evalInputDelta=2.8342008590698242E-5
New Minimum: -0.14052283763885498 > -0.1406337469816208
WOLFE (weak): th(556.9906600335335)=-0.1406337469816208; dx=-4.977179721718684E-7 evalInputDelta=1.3925135135650635E-4
New Minimum: -0.1406337469816208 > -0.1413263976573944
WOLFE (weak): th(3341.9439602012008)=-0.1413263976573944; dx=-4.973012845347315E-7 evalInputDelta=8.31902027130127E-4
New Minimum: -0.1413263976573944 > -0.14629876613616943
WOLFE (weak): th(23393.607721408407)=-0.14629876613616943; dx=-4.946171511714024E-7 evalInputDelta=0.005804270505905151
New Minimum: -0.14629876613616943 > -0.18588587641716003
WOLFE (weak): th(187148.86177126726)=-0.18588587641716003; dx=-4.718564210851671E-7 evalInputDelta=0.04539138078689575
New Minimum: -0.18588587641716003 > -0.4624907374382019
END: th(1684339.7559414054)=-0.4624907374382019; dx=-2.7500708406034145E-7 evalInputDelta=0.3219962418079376
Fitness changed from -0.14049449563026428 to -0.4624907374382019
Iteration 2 complete. Error: -0.4624907374382019 Total: 47.6249; Orientation: 0.0427; Line Search: 42.9620
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/cd2e4d31-f0e9-4ad8-8f24-9e21d091511b.jpg)
Adding measurement 3fea22df to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.4624907374382019;dx=-2.5356492522235475E-7
New Minimum: -0.4624907374382019 > -0.7907758206129074
END: th(3628800.0000000005)=-0.7907758206129074; dx=-1.2226626959686657E-7 evalInputDelta=0.3282850831747055
Fitness changed from -0.4624907374382019 to -0.7907758206129074
Iteration 3 complete. Error: -0.7907758206129074 Total: 12.9391; Orientation: 0.0454; Line Search: 8.4107
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/4c5fd19e-6d7d-4164-8bb8-f98e35f381f5.jpg)
Adding measurement 278c4e9d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.016e+03, gradient 3.800e-04, dot -0.652; [4b18b073-4d8c-4a04-bf04-ecba2a0631e7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.7907758206129074, -0.4624907374382019, -0.14049449563026428, -0.14049437642097473
LBFGS Accumulation History: 3 points
Removed measurement 278c4e9d to history. Total: 3
th(0)=-0.7907758206129074;dx=-1.4439764679437164E-7
New Minimum: -0.7907758206129074 > -1.1017455905675888
END: th(7818012.603187701)=-1.1017455905675888; dx=-3.924077880847034E-8 evalInputDelta=0.3109697699546814
Fitness changed from -0.7907758206129074 to -1.1017455905675888
Iteration 4 complete. Error: -1.1017455905675888 Total: 13.6755; Orientation: 0.9943; Line Search: 8.5439
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/a2ce7205-917c-4f26-8f03-0e6adf3925ef.jpg)
Adding measurement 20644cf5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.763e+03, gradient 3.397e-04, dot -0.420; [4b18b073-4d8c-4a04-bf04-ecba2a0631e7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.1017455905675888, -0.4624907374382019, -0.14049449563026428, -0.14049437642097473
LBFGS Accumulation History: 3 points
Removed measurement 20644cf5 to history. Total: 3
th(0)=-1.1017455905675888;dx=-1.1541972609013672E-7
New Minimum: -1.1017455905675888 > -1.2430373430252075
WOLF (strong): th(1.6843397559414055E7)=-1.2430373430252075; dx=1.9390203079176136E-8 evalInputDelta=0.1412917524576187
New Minimum: -1.2430373430252075 > -1.292360097169876
END: th(8421698.779707028)=-1.292360097169876; dx=-1.1300218395211432E-9 evalInputDelta=0.1906145066022873
Fitness changed from -1.1017455905675888 to -1.292360097169876
Iteration 5 complete. Error: -1.292360097169876 Total: 18.7140; Orientation: 0.9903; Line Search: 13.4155
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/9ad7ac83-b783-493e-ae2b-e73561e284be.jpg)
Adding measurement e2ad42e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.071e+03, gradient 3.149e-04, dot -0.342; [4b18b073-4d8c-4a04-bf04-ecba2a0631e7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.292360097169876, -0.4624907374382019, -0.14049449563026428, -0.14049437642097473
LBFGS Accumulation History: 3 points
Removed measurement e2ad42e to history. Total: 3
th(0)=-1.292360097169876;dx=-9.917788516290173E-8
New Minimum: -1.292360097169876 > -1.3012938648462296
WOLF (strong): th(1.8144000000000004E7)=-1.3012938648462296; dx=3.788964096877432E-8 evalInputDelta=0.008933767676353455
New Minimum: -1.3012938648462296 > -1.4439949989318848
WOLF (strong): th(9072000.000000002)=-1.4439949989318848; dx=1.4552980018294024E-8 evalInputDelta=0.15163490176200867
END: th(3024000.0000000005)=-1.4016209691762924; dx=-4.742847142778468E-8 evalInputDelta=0.10926087200641632
Fitness changed from -1.292360097169876 to -1.4439949989318848
Iteration 6 complete. Error: -1.4439949989318848 Total: 21.8347; Orientation: 0.9827; Line Search: 16.2918
Adding measurement 774a4b52 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.002e+03, gradient 2.863e-04, dot -0.305; [4b18b073-4d8c-4a04-bf04-ecba2a0631e7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.4439949989318848, -0.4624907374382019, -0.14049449563026428, -0.14049437642097473
LBFGS Accumulation History: 3 points
Removed measurement 774a4b52 to history. Total: 3
th(0)=-1.4439949989318848;dx=-8.199177669588793E-8
New Minimum: -1.4439949989318848 > -1.5708544701337814
END: th(6515010.502656418)=-1.5708544701337814; dx=-7.723874053157025E-9 evalInputDelta=0.12685947120189667
Fitness changed from -1.4439949989318848 to -1.5708544701337814
Iteration 7 complete. Error: -1.5708544701337814 Total: 15.1376; Orientation: 1.0178; Line Search: 9.1876
Adding measurement 32e50882 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.469e+03, gradient 1.920e-04, dot -0.479; [4b18b073-4d8c-4a04-bf04-ecba2a0631e7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.5708544701337814, -0.4624907374382019, -0.14049449563026428, -0.14049437642097473
LBFGS Accumulation History: 3 points
Removed measurement 32e50882 to history. Total: 3
th(0)=-1.5708544701337814;dx=-3.6847410750484536E-8
New Minimum: -1.5708544701337814 > -1.6620551198720932
WOLF (strong): th(1.4036164632845048E7)=-1.6620551198720932; dx=5.986264013721975E-9 evalInputDelta=0.09120064973831177
END: th(7018082.316422524)=-1.654542699456215; dx=-1.1726401073341043E-8 evalInputDelta=0.08368822932243347
Fitness changed from -1.5708544701337814 to -1.6620551198720932
Iteration 8 complete. Error: -1.6620551198720932 Total: 17.9162; Orientation: 0.9823; Line Search: 12.8704
Adding measurement 62c53654 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.033e+03, gradient 2.594e-04, dot -0.239; [4b18b073-4d8c-4a04-bf04-ecba2a0631e7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.6620551198720932, -0.4624907374382019, -0.14049449563026428, -0.14049437642097473
LBFGS Accumulation History: 3 points
Removed measurement 62c53654 to history. Total: 3
th(0)=-1.6620551198720932;dx=-6.730068908718865E-8
New Minimum: -1.6620551198720932 > -1.6628114730119705
WOLF (strong): th(1.5120000000000006E7)=-1.6628114730119705; dx=2.9506932325018776E-8 evalInputDelta=7.563531398773193E-4
New Minimum: -1.6628114730119705 > -1.7465635985136032
WOLF (strong): th(7560000.000000003)=-1.7465635985136032; dx=9.181496148124123E-9 evalInputDelta=0.08450847864151001
END: th(2520000.000000001)=-1.72416290640831; dx=-3.228295445309634E-8 evalInputDelta=0.062107786536216736
Fitness changed from -1.6620551198720932 to -1.7465635985136032
Iteration 9 complete. Error: -1.7465635985136032 Total: 22.9741; Orientation: 1.1574; Line Search: 17.0436
Adding measurement 6731393d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.353e+03, gradient 1.837e-04, dot -0.359; [4b18b073-4d8c-4a04-bf04-ecba2a0631e7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.7465635985136032, -0.4624907374382019, -0.14049449563026428, -0.14049437642097473
LBFGS Accumulation History: 3 points
Removed measurement 6731393d to history. Total: 3
th(0)=-1.7465635985136032;dx=-3.374007084434486E-8
New Minimum: -1.7465635985136032 > -1.8054982423782349
END: th(5429175.418880349)=-1.8054982423782349; dx=-1.055274177173977E-8 evalInputDelta=0.05893464386463165
Fitness changed from -1.7465635985136032 to -1.8054982423782349
Iteration 10 complete. Error: -1.8054982423782349 Total: 14.0048; Orientation: 1.0275; Line Search: 8.6459
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/8ac1bc0e-ef03-4398-bd9f-e59fbfebf102.jpg)
Final threshold in iteration 11: -1.8054982423782349 (> -Infinity) after 206.530s (< 5400.000s)
Returns
-1.8054982423782349