BasicOptimizer.scala:89 executed in 150.60 seconds (2.566 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: 463651946189600
Reset training subject: 463654932813300
Adding measurement 1f1e17b4 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-104.91286142361001;dx=-1.2604286591921252E-5
New Minimum: -104.91286142361001 > -104.91288790517918
WOLFE (weak): th(2.154434690031884)=-104.91288790517918; dx=-1.1467458874030335E-5 evalInputDelta=2.648156916507105E-5
New Minimum: -104.91288790517918 > -104.91291968305335
WOLFE (weak): th(4.308869380063768)=-104.91291968305335; dx=-1.1455446391987074E-5 evalInputDelta=5.825944333537336E-5
New Minimum: -104.91291968305335 > -104.91302031292473
WOLFE (weak): th(12.926608140191302)=-104.91302031292473; dx=-1.14490939236959E-5 evalInputDelta=1.5888931471863543E-4
New Minimum: -104.91302031292473 > -104.9134916831425
WOLFE (weak): th(51.70643256076521)=-104.9134916831425; dx=-1.1464206544676725E-5 evalInputDelta=6.30259532485411E-4
New Minimum: -104.9134916831425 > -104.9160020910996
WOLFE (weak): th(258.53216280382605)=-104.9160020910996; dx=-1.1468052014839116E-5 evalInputDelta=0.0031406674895890774
New Minimum: -104.9160020910996 > -104.93170931388052
WOLFE (weak): th(1551.1929768229563)=-104.93170931388052; dx=-1.14655852027369E-5 evalInputDelta=0.01884789027050715
New Minimum: -104.93170931388052 > -105.04469389918434
WOLFE (weak): th(10858.350837760694)=-105.04469389918434; dx=-1.1436834505084095E-5 evalInputDelta=0.13183247557432765
New Minimum: -105.04469389918434 > -105.96133993841748
END: th(86866.80670208555)=-105.96133993841748; dx=-1.1306881054577897E-5 evalInputDelta=1.0484785148074707
Fitness changed from -104.91286142361001 to -105.96133993841748
Iteration 1 complete. Error: -105.96133993841748 Total: 33.9374; Orientation: 0.1066; Line Search: 25.4068
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/0691fc4e-fc89-4ceb-a32f-45e1aa035bc1.jpg)
Adding measurement a83ceb to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-105.96133993841748;dx=-1.1252129012981196E-5
New Minimum: -105.96133993841748 > -108.14682267990887
WOLFE (weak): th(187148.86177126726)=-108.14682267990887; dx=-1.0887933884470592E-5 evalInputDelta=2.185482741491384
New Minimum: -108.14682267990887 > -110.25965036489184
WOLFE (weak): th(374297.7235425345)=-110.25965036489184; dx=-1.0552174794457512E-5 evalInputDelta=4.298310426474359
New Minimum: -110.25965036489184 > -117.96977454040602
END: th(1122893.1706276035)=-117.96977454040602; dx=-9.067697986471341E-6 evalInputDelta=12.00843460198854
Fitness changed from -105.96133993841748 to -117.96977454040602
Iteration 2 complete. Error: -117.96977454040602 Total: 14.7761; Orientation: 0.1015; Line Search: 11.3213
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/d591010f-ce57-4595-ae92-eeb771deed20.jpg)
Adding measurement 594e4738 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-117.96977454040602;dx=-8.683172767682374E-6
New Minimum: -117.96977454040602 > -135.82758814537277
END: th(2419200.0000000005)=-135.82758814537277; dx=-5.579540913542276E-6 evalInputDelta=17.85781360496675
Fitness changed from -117.96977454040602 to -135.82758814537277
Iteration 3 complete. Error: -135.82758814537277 Total: 9.2457; Orientation: 0.0902; Line Search: 5.5394
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/8ea173cb-8b55-42e7-8855-97c0e807b3b4.jpg)
Adding measurement 3332ec4b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.903e+04, gradient 2.418e-03, dot -0.769; [eb53f1fd-5ef9-4ffa-8441-b3f22fbd0184 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -135.82758814537277, -117.96977454040602, -105.96133993841748, -104.91286142361001
LBFGS Accumulation History: 3 points
Removed measurement 3332ec4b to history. Total: 3
th(0)=-135.82758814537277;dx=-5.820195455065911E-6
New Minimum: -135.82758814537277 > -157.95296610238185
END: th(5212008.402125134)=-157.95296610238185; dx=-2.7477873179472486E-6 evalInputDelta=22.12537795700908
Fitness changed from -135.82758814537277 to -157.95296610238185
Iteration 4 complete. Error: -157.95296610238185 Total: 11.4249; Orientation: 1.8580; Line Search: 5.9914
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/67d1fb18-4c00-474b-b399-528b76e03608.jpg)
Adding measurement 3951680e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.679e+04, gradient 2.130e-03, dot -0.557; [eb53f1fd-5ef9-4ffa-8441-b3f22fbd0184 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -157.95296610238185, -117.96977454040602, -105.96133993841748, -104.91286142361001
LBFGS Accumulation History: 3 points
Removed measurement 3951680e to history. Total: 3
th(0)=-157.95296610238185;dx=-4.531580487289707E-6
New Minimum: -157.95296610238185 > -178.1776582358027
END: th(1.1228931706276037E7)=-178.1776582358027; dx=-4.154733166856954E-7 evalInputDelta=20.22469213342086
Fitness changed from -157.95296610238185 to -178.1776582358027
Iteration 5 complete. Error: -178.1776582358027 Total: 10.9763; Orientation: 1.9551; Line Search: 5.7458
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/0486d6a2-056a-49b9-92ec-1b49710e1a0b.jpg)
Adding measurement 4790430e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.481e+04, gradient 2.452e-03, dot -0.275; [eb53f1fd-5ef9-4ffa-8441-b3f22fbd0184 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -178.1776582358027, -117.96977454040602, -105.96133993841748, -104.91286142361001
LBFGS Accumulation History: 3 points
Removed measurement 4790430e to history. Total: 3
th(0)=-178.1776582358027;dx=-6.011529590580298E-6
Armijo: th(2.4192000000000004E7)=-163.92101791458145; dx=1.7723141666002218E-6 evalInputDelta=-14.256640321221255
New Minimum: -178.1776582358027 > -189.96744947776693
WOLF (strong): th(1.2096000000000002E7)=-189.96744947776693; dx=1.5715061291177374E-6 evalInputDelta=11.789791241964224
New Minimum: -189.96744947776693 > -194.6534835504243
END: th(4032000.0000000005)=-194.6534835504243; dx=-1.9021793031870987E-6 evalInputDelta=16.475825314621602
Fitness changed from -178.1776582358027 to -194.6534835504243
Iteration 6 complete. Error: -194.6534835504243 Total: 16.7272; Orientation: 1.7521; Line Search: 11.2906
Adding measurement 4bee7168 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.378e+04, gradient 1.663e-03, dot -0.512; [eb53f1fd-5ef9-4ffa-8441-b3f22fbd0184 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -194.6534835504243, -117.96977454040602, -105.96133993841748, -104.91286142361001
LBFGS Accumulation History: 3 points
Removed measurement 4bee7168 to history. Total: 3
th(0)=-194.6534835504243;dx=-2.765963931807216E-6
New Minimum: -194.6534835504243 > -207.79351575231152
END: th(8686680.670208557)=-207.79351575231152; dx=-6.405121742456579E-7 evalInputDelta=13.140032201887209
Fitness changed from -194.6534835504243 to -207.79351575231152
Iteration 7 complete. Error: -207.79351575231152 Total: 10.4195; Orientation: 1.7662; Line Search: 5.9217
Adding measurement 334b1ffe to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.662e+04, gradient 1.821e-03, dot -0.414; [eb53f1fd-5ef9-4ffa-8441-b3f22fbd0184 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -207.79351575231152, -117.96977454040602, -105.96133993841748, -104.91286142361001
LBFGS Accumulation History: 3 points
Removed measurement 334b1ffe to history. Total: 3
th(0)=-207.79351575231152;dx=-3.316357917459853E-6
Armijo: th(1.8714886177126728E7)=-206.68894373317667; dx=1.06509792397492E-6 evalInputDelta=-1.1045720191348494
New Minimum: -207.79351575231152 > -216.47163245529958
WOLF (strong): th(9357443.088563364)=-216.47163245529958; dx=4.4820383149978727E-7 evalInputDelta=8.678116702988063
END: th(3119147.696187788)=-215.32707442270245; dx=-1.4364010724688552E-6 evalInputDelta=7.533558670390931
Fitness changed from -207.79351575231152 to -216.47163245529958
Iteration 8 complete. Error: -216.47163245529958 Total: 16.1559; Orientation: 1.7084; Line Search: 11.5013
Adding measurement 1c355a31 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.640e+04, gradient 2.031e-03, dot -0.313; [eb53f1fd-5ef9-4ffa-8441-b3f22fbd0184 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -216.47163245529958, -117.96977454040602, -105.96133993841748, -104.91286142361001
LBFGS Accumulation History: 3 points
Removed measurement 1c355a31 to history. Total: 3
th(0)=-216.47163245529958;dx=-4.115010375755546E-6
New Minimum: -216.47163245529958 > -229.0893000165331
WOLF (strong): th(6720000.000000002)=-229.0893000165331; dx=2.413072483814138E-7 evalInputDelta=12.617667561233503
END: th(3360000.000000001)=-226.8728169731524; dx=-1.8027985178068234E-6 evalInputDelta=10.401184517852812
Fitness changed from -216.47163245529958 to -229.0893000165331
Iteration 9 complete. Error: -229.0893000165331 Total: 13.0563; Orientation: 1.7800; Line Search: 8.4754
Adding measurement c54235d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.231e+04, gradient 1.613e-03, dot -0.411; [eb53f1fd-5ef9-4ffa-8441-b3f22fbd0184 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -229.0893000165331, -117.96977454040602, -105.96133993841748, -104.91286142361001
LBFGS Accumulation History: 3 points
Removed measurement c54235d to history. Total: 3
th(0)=-229.0893000165331;dx=-2.5929730626852652E-6
New Minimum: -229.0893000165331 > -237.06809781753662
WOLF (strong): th(7238900.558507131)=-237.06809781753662; dx=7.6431327048085E-8 evalInputDelta=7.978797801003537
END: th(3619450.2792535657)=-235.72844136843622; dx=-1.0438870440479409E-6 evalInputDelta=6.639141351903135
Fitness changed from -229.0893000165331 to -237.06809781753662
Iteration 10 complete. Error: -237.06809781753662 Total: 13.1446; Orientation: 1.7055; Line Search: 8.4709
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/23a0c4a9-2290-4136-9b51-0b95a1756aaf.jpg)
Final threshold in iteration 11: -237.06809781753662 (> -Infinity) after 150.603s (< 5400.000s)
Returns
-237.06809781753662