BasicOptimizer.scala:89 executed in 205.43 seconds (1.962 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: 2243814782655
Reset training subject: 2248472366932
Adding measurement 41a30873 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=2.5768293291330338;dx=-1.3716578297615167E-6
New Minimum: 2.5768293291330338 > 2.5768279656767845
WOLFE (weak): th(2.154434690031884)=2.5768279656767845; dx=-1.3624525078559538E-6 evalInputDelta=1.3634562492370605E-6
New Minimum: 2.5768279656767845 > 2.5768264532089233
WOLFE (weak): th(4.308869380063768)=2.5768264532089233; dx=-1.3624508516011446E-6 evalInputDelta=2.8759241104125977E-6
New Minimum: 2.5768264532089233 > 2.576820433139801
WOLFE (weak): th(12.926608140191302)=2.576820433139801; dx=-1.3624214671668245E-6 evalInputDelta=8.89599323272705E-6
New Minimum: 2.576820433139801 > 2.576793998479843
WOLFE (weak): th(51.70643256076521)=2.576793998479843; dx=-1.3623534323810741E-6 evalInputDelta=3.533065319061279E-5
New Minimum: 2.576793998479843 > 2.5766532570123672
WOLFE (weak): th(258.53216280382605)=2.5766532570123672; dx=-1.3623953858847288E-6 evalInputDelta=1.760721206665039E-4
New Minimum: 2.5766532570123672 > 2.5757724791765213
WOLFE (weak): th(1551.1929768229563)=2.5757724791765213; dx=-1.3627221521573554E-6 evalInputDelta=0.0010568499565124512
New Minimum: 2.5757724791765213 > 2.5694295465946198
WOLFE (weak): th(10858.350837760694)=2.5694295465946198; dx=-1.3632867556895272E-6 evalInputDelta=0.0073997825384140015
New Minimum: 2.5694295465946198 > 2.5176986157894135
WOLFE (weak): th(86866.80670208555)=2.5176986157894135; dx=-1.3576999017811292E-6 evalInputDelta=0.0591307133436203
New Minimum: 2.5176986157894135 > 2.105831354856491
END: th(781801.26031877)=2.105831354856491; dx=-9.856280459720206E-7 evalInputDelta=0.47099797427654266
Fitness changed from 2.5768293291330338 to 2.105831354856491
Iteration 1 complete. Error: 2.105831354856491 Total: 57.1271; Orientation: 0.0450; Line Search: 43.8905
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/02b23d2d-3786-48f0-a2c9-b3e24c5a10c4.jpg)
Adding measurement 10011053 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=2.105831354856491;dx=-1.1513426249581852E-6
New Minimum: 2.105831354856491 > 1.4247967302799225
END: th(1684339.7559414052)=1.4247967302799225; dx=-5.527306345970202E-7 evalInputDelta=0.6810346245765686
Fitness changed from 2.105831354856491 to 1.4247967302799225
Iteration 2 complete. Error: 1.4247967302799225 Total: 12.8244; Orientation: 0.0452; Line Search: 8.8024
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/3e703cc5-67e8-4da2-bb56-35ce63a30eb6.jpg)
Adding measurement 56b926de to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=1.4247967302799225;dx=-7.586047851942092E-7
New Minimum: 1.4247967302799225 > 0.6778592765331268
END: th(3628800.0)=0.6778592765331268; dx=-2.1865393940750867E-7 evalInputDelta=0.7469374537467957
Fitness changed from 1.4247967302799225 to 0.6778592765331268
Iteration 3 complete. Error: 0.6778592765331268 Total: 13.1648; Orientation: 0.0468; Line Search: 8.8136
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/d0f6d1d3-8366-4e0f-aa8e-589acf6afb25.jpg)
Adding measurement 6950c4ef to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.429e+03, gradient 6.685e-04, dot -0.555; [28cda240-bb45-4a6d-8150-4d63b4fd1656 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.6778592765331268, 1.4247967302799225, 2.105831354856491, 2.5768293291330338
LBFGS Accumulation History: 3 points
Removed measurement 6950c4ef to history. Total: 3
th(0)=0.6778592765331268;dx=-4.4689843793221503E-7
New Minimum: 0.6778592765331268 > 0.03557661175727844
END: th(7818012.6031877)=0.03557661175727844; dx=-3.5718801562925315E-8 evalInputDelta=0.6422826647758484
Fitness changed from 0.6778592765331268 to 0.03557661175727844
Iteration 4 complete. Error: 0.03557661175727844 Total: 13.4619; Orientation: 1.0072; Line Search: 8.4251
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/8d76e3e9-683f-436a-a553-27a016892f48.jpg)
Adding measurement 7ac07e28 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.504e+03, gradient 5.369e-04, dot -0.372; [28cda240-bb45-4a6d-8150-4d63b4fd1656 = 1.000/1.000e+00]
Orientation rejected. Popping history element from 0.03557661175727844, 1.4247967302799225, 2.105831354856491, 2.5768293291330338
LBFGS Accumulation History: 3 points
Removed measurement 7ac07e28 to history. Total: 3
th(0)=0.03557661175727844;dx=-2.882088955606909E-7
New Minimum: 0.03557661175727844 > -0.353808730840683
WOLF (strong): th(1.684339755941405E7)=-0.353808730840683; dx=3.9608906855385934E-8 evalInputDelta=0.3893853425979614
New Minimum: -0.353808730840683 > -0.44626376032829285
END: th(8421698.779707026)=-0.44626376032829285; dx=-1.3793450472453098E-8 evalInputDelta=0.4818403720855713
Fitness changed from 0.03557661175727844 to -0.44626376032829285
Iteration 5 complete. Error: -0.44626376032829285 Total: 18.1365; Orientation: 1.0060; Line Search: 12.7873
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/aa75baba-26bd-4059-bf94-6c59724602e9.jpg)
Adding measurement 6e440913 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.085e+03, gradient 3.846e-04, dot -0.358; [28cda240-bb45-4a6d-8150-4d63b4fd1656 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.44626376032829285, 1.4247967302799225, 2.105831354856491, 2.5768293291330338
LBFGS Accumulation History: 3 points
Removed measurement 6e440913 to history. Total: 3
th(0)=-0.44626376032829285;dx=-1.479503432414282E-7
New Minimum: -0.44626376032829285 > -0.7492980360984802
WOLF (strong): th(1.8144E7)=-0.7492980360984802; dx=3.067257451002349E-8 evalInputDelta=0.3030342757701874
New Minimum: -0.7492980360984802 > -0.7887351512908936
END: th(9072000.0)=-0.7887351512908936; dx=-2.3434596656051795E-8 evalInputDelta=0.3424713909626007
Fitness changed from -0.44626376032829285 to -0.7887351512908936
Iteration 6 complete. Error: -0.7887351512908936 Total: 18.4581; Orientation: 1.0229; Line Search: 12.5537
Adding measurement 893453e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.115e+03, gradient 2.924e-04, dot -0.397; [28cda240-bb45-4a6d-8150-4d63b4fd1656 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -0.7887351512908936, 1.4247967302799225, 2.105831354856491, 2.5768293291330338
LBFGS Accumulation History: 3 points
Removed measurement 893453e to history. Total: 3
th(0)=-0.7887351512908936;dx=-8.54786982183051E-8
New Minimum: -0.7887351512908936 > -1.0244477689266205
WOLF (strong): th(1.954503150796925E7)=-1.0244477689266205; dx=1.3065618384921063E-8 evalInputDelta=0.23571261763572693
New Minimum: -1.0244477689266205 > -1.026544913649559
END: th(9772515.753984625)=-1.026544913649559; dx=-1.7559076326130915E-8 evalInputDelta=0.23780976235866547
Fitness changed from -0.7887351512908936 to -1.026544913649559
Iteration 7 complete. Error: -1.026544913649559 Total: 17.5697; Orientation: 1.0022; Line Search: 12.6017
Adding measurement 60276360 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.377e+03, gradient 2.534e-04, dot -0.416; [28cda240-bb45-4a6d-8150-4d63b4fd1656 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.026544913649559, 1.4247967302799225, 2.105831354856491, 2.5768293291330338
LBFGS Accumulation History: 3 points
Removed measurement 60276360 to history. Total: 3
th(0)=-1.026544913649559;dx=-6.419799719894735E-8
New Minimum: -1.026544913649559 > -1.1938118040561676
WOLF (strong): th(2.1054246949267566E7)=-1.1938118040561676; dx=7.652604328663673E-9 evalInputDelta=0.16726689040660858
New Minimum: -1.1938118040561676 > -1.1996630430221558
END: th(1.0527123474633783E7)=-1.1996630430221558; dx=-8.959714469326565E-9 evalInputDelta=0.17311812937259674
Fitness changed from -1.026544913649559 to -1.1996630430221558
Iteration 8 complete. Error: -1.1996630430221558 Total: 18.6496; Orientation: 1.0107; Line Search: 12.8491
Adding measurement 7e3ce664 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.316e+03, gradient 2.366e-04, dot -0.394; [28cda240-bb45-4a6d-8150-4d63b4fd1656 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.1996630430221558, 1.4247967302799225, 2.105831354856491, 2.5768293291330338
LBFGS Accumulation History: 3 points
Removed measurement 7e3ce664 to history. Total: 3
th(0)=-1.1996630430221558;dx=-5.5964894468273355E-8
New Minimum: -1.1996630430221558 > -1.282445102930069
WOLF (strong): th(2.2680000000000004E7)=-1.282445102930069; dx=1.5225890044417837E-8 evalInputDelta=0.08278205990791321
New Minimum: -1.282445102930069 > -1.340282216668129
WOLF (strong): th(1.1340000000000002E7)=-1.340282216668129; dx=3.714848306357361E-10 evalInputDelta=0.1406191736459732
END: th(3780000.0000000005)=-1.2840357273817062; dx=-3.330415695457109E-8 evalInputDelta=0.08437268435955048
Fitness changed from -1.1996630430221558 to -1.340282216668129
Iteration 9 complete. Error: -1.340282216668129 Total: 22.6025; Orientation: 1.0553; Line Search: 17.3397
Adding measurement 4b3188cd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.331e+03, gradient 2.354e-04, dot -0.358; [28cda240-bb45-4a6d-8150-4d63b4fd1656 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.340282216668129, 1.4247967302799225, 2.105831354856491, 2.5768293291330338
LBFGS Accumulation History: 3 points
Removed measurement 4b3188cd to history. Total: 3
th(0)=-1.340282216668129;dx=-5.539239023543864E-8
New Minimum: -1.340282216668129 > -1.4554003328084946
END: th(8143763.128320522)=-1.4554003328084946; dx=-5.9610090483776415E-9 evalInputDelta=0.1151181161403656
Fitness changed from -1.340282216668129 to -1.4554003328084946
Iteration 10 complete. Error: -1.4554003328084946 Total: 13.3505; Orientation: 1.0134; Line Search: 8.3466
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/b709b384-1656-42e1-851a-8705cf107a70.jpg)
Final threshold in iteration 11: -1.4554003328084946 (> -Infinity) after 205.431s (< 5400.000s)
Returns
-1.4554003328084946