BasicOptimizer.scala:89 executed in 2269.37 seconds (5.418 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: 970764467066
Reset training subject: 1020459991757
Adding measurement 1750bb7c to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.20318815112113953;dx=-4.7508979785235846E-7
New Minimum: -0.20318815112113953 > -0.20318925380706787
WOLFE (weak): th(2.154434690031884)=-0.20318925380706787; dx=-4.780382973727637E-7 evalInputDelta=1.1026859283447266E-6
New Minimum: -0.20318925380706787 > -0.20319029688835144
WOLFE (weak): th(4.308869380063768)=-0.20319029688835144; dx=-4.3567948685446273E-7 evalInputDelta=2.1457672119140625E-6
New Minimum: -0.20319029688835144 > -0.2031952142715454
END: th(12.926608140191302)=-0.2031952142715454; dx=-4.001846653733883E-7 evalInputDelta=7.063150405883789E-6
Fitness changed from -0.20318815112113953 to -0.2031952142715454
Iteration 1 complete. Error: -0.2031952142715454 Total: 342.3487; Orientation: 0.3128; Line Search: 195.7400
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/a9cd452b-968a-443a-83cc-026f98a37aff.jpg)
Adding measurement 42e5c3ea to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.2031952142715454;dx=-3.9754976078903177E-7
New Minimum: -0.2031952142715454 > -0.20320826768875122
WOLFE (weak): th(27.849533001676672)=-0.20320826768875122; dx=-4.0963360106651483E-7 evalInputDelta=1.3053417205810547E-5
New Minimum: -0.20320826768875122 > -0.2032214105129242
WOLFE (weak): th(55.699066003353344)=-0.2032214105129242; dx=-4.09656229557717E-7 evalInputDelta=2.619624137878418E-5
New Minimum: -0.2032214105129242 > -0.20327386260032654
WOLFE (weak): th(167.09719801006003)=-0.20327386260032654; dx=-4.132731592216215E-7 evalInputDelta=7.864832878112793E-5
New Minimum: -0.20327386260032654 > -0.2035096287727356
WOLFE (weak): th(668.3887920402401)=-0.2035096287727356; dx=-4.1327671520516276E-7 evalInputDelta=3.1441450119018555E-4
New Minimum: -0.2035096287727356 > -0.20476728677749634
WOLFE (weak): th(3341.9439602012008)=-0.20476728677749634; dx=-4.1321041766810376E-7 evalInputDelta=0.0015720725059509277
New Minimum: -0.20476728677749634 > -0.2126196026802063
WOLFE (weak): th(20051.663761207205)=-0.2126196026802063; dx=-4.1260422667504164E-7 evalInputDelta=0.009424388408660889
New Minimum: -0.2126196026802063 > -0.26874199509620667
WOLFE (weak): th(140361.64632845044)=-0.26874199509620667; dx=-3.6581540357779387E-7 evalInputDelta=0.06554678082466125
New Minimum: -0.26874199509620667 > -0.6976984143257141
END: th(1122893.1706276035)=-0.6976984143257141; dx=-3.4340212272536507E-7 evalInputDelta=0.4945032000541687
Fitness changed from -0.2031952142715454 to -0.6976984143257141
Iteration 2 complete. Error: -0.6976984143257141 Total: 489.0377; Orientation: 0.0753; Line Search: 439.3088
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/300bb88c-2f42-4c9f-b768-2f6dbf59fee0.jpg)
Adding measurement 9871bab to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.6976984143257141;dx=-3.7269314695789645E-7
New Minimum: -0.6976984143257141 > -1.59235879778862
END: th(2419200.0000000005)=-1.59235879778862; dx=-2.703271640813531E-7 evalInputDelta=0.8946603834629059
Fitness changed from -0.6976984143257141 to -1.59235879778862
Iteration 3 complete. Error: -1.59235879778862 Total: 147.8575; Orientation: 0.0840; Line Search: 97.6419
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/727b4d58-9fcf-485b-81fd-b3a26a1a4901.jpg)
Adding measurement 60c5fe39 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.749e+04, gradient 4.859e-04, dot -0.612; [ab755e08-d17b-4163-9979-ad8a1ac2858c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.59235879778862, -0.6976984143257141, -0.2031952142715454, -0.20318815112113953
LBFGS Accumulation History: 3 points
Removed measurement 60c5fe39 to history. Total: 3
th(0)=-1.59235879778862;dx=-2.318817231126426E-7
New Minimum: -1.59235879778862 > -2.7674712538719177
END: th(5212008.402125134)=-2.7674712538719177; dx=-1.5961036668379632E-7 evalInputDelta=1.1751124560832977
Fitness changed from -1.59235879778862 to -2.7674712538719177
Iteration 4 complete. Error: -2.7674712538719177 Total: 151.0890; Orientation: 2.2232; Line Search: 97.5392
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/c8096381-daa4-48a2-b1d2-47c8da9ee626.jpg)
Adding measurement 31dae2f8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.194e+04, gradient 3.828e-04, dot -0.545; [ab755e08-d17b-4163-9979-ad8a1ac2858c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.7674712538719177, -0.6976984143257141, -0.2031952142715454, -0.20318815112113953
LBFGS Accumulation History: 3 points
Removed measurement 31dae2f8 to history. Total: 3
th(0)=-2.7674712538719177;dx=-1.4646614622263436E-7
New Minimum: -2.7674712538719177 > -4.200517475605011
END: th(1.1228931706276037E7)=-4.200517475605011; dx=-8.401851335186559E-8 evalInputDelta=1.4330462217330933
Fitness changed from -2.7674712538719177 to -4.200517475605011
Iteration 5 complete. Error: -4.200517475605011 Total: 149.0422; Orientation: 2.1272; Line Search: 97.3586
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/dd4b352e-24c5-421e-9e4e-ae88c189d3f0.jpg)
Adding measurement 3e6740c0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.680e+04, gradient 2.891e-04, dot -0.434; [ab755e08-d17b-4163-9979-ad8a1ac2858c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -4.200517475605011, -0.6976984143257141, -0.2031952142715454, -0.20318815112113953
LBFGS Accumulation History: 3 points
Removed measurement 3e6740c0 to history. Total: 3
th(0)=-4.200517475605011;dx=-8.469774164716774E-8
New Minimum: -4.200517475605011 > -5.64740052819252
END: th(2.4192000000000004E7)=-5.64740052819252; dx=-3.2399005209538226E-8 evalInputDelta=1.4468830525875092
Fitness changed from -4.200517475605011 to -5.64740052819252
Iteration 6 complete. Error: -5.64740052819252 Total: 149.3818; Orientation: 2.4641; Line Search: 97.7406
Adding measurement 74641197 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.662e+04, gradient 2.267e-04, dot -0.299; [ab755e08-d17b-4163-9979-ad8a1ac2858c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.64740052819252, -0.6976984143257141, -0.2031952142715454, -0.20318815112113953
LBFGS Accumulation History: 3 points
Removed measurement 74641197 to history. Total: 3
th(0)=-5.64740052819252;dx=-5.077497916643409E-8
New Minimum: -5.64740052819252 > -6.567169696092606
END: th(5.212008402125134E7)=-6.567169696092606; dx=-3.2167276468064525E-9 evalInputDelta=0.9197691679000854
Fitness changed from -5.64740052819252 to -6.567169696092606
Iteration 7 complete. Error: -6.567169696092606 Total: 148.8375; Orientation: 2.1097; Line Search: 98.1012
Adding measurement 416bd446 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.341e+04, gradient 2.026e-04, dot -0.148; [ab755e08-d17b-4163-9979-ad8a1ac2858c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.567169696092606, -0.6976984143257141, -0.2031952142715454, -0.20318815112113953
LBFGS Accumulation History: 3 points
Removed measurement 416bd446 to history. Total: 3
th(0)=-6.567169696092606;dx=-4.1133781621233276E-8
Armijo: th(1.1228931706276038E8)=-6.07895690202713; dx=1.2245049087115109E-8 evalInputDelta=-0.48821279406547546
New Minimum: -6.567169696092606 > -6.884436994791031
WOLF (strong): th(5.614465853138019E7)=-6.884436994791031; dx=6.434477693198122E-9 evalInputDelta=0.3172672986984253
New Minimum: -6.884436994791031 > -6.961721554398537
END: th(1.871488617712673E7)=-6.961721554398537; dx=-6.356354851145747E-9 evalInputDelta=0.3945518583059311
Fitness changed from -6.567169696092606 to -6.961721554398537
Iteration 8 complete. Error: -6.961721554398537 Total: 246.7138; Orientation: 2.1923; Line Search: 195.2512
Adding measurement 5e2db0e5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.347e+04, gradient 1.247e-04, dot -0.224; [ab755e08-d17b-4163-9979-ad8a1ac2858c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.961721554398537, -0.6976984143257141, -0.2031952142715454, -0.20318815112113953
LBFGS Accumulation History: 3 points
Removed measurement 5e2db0e5 to history. Total: 3
th(0)=-6.961721554398537;dx=-1.5940563926878303E-8
New Minimum: -6.961721554398537 > -7.196377083659172
END: th(4.0320000000000015E7)=-7.196377083659172; dx=-1.3300681176548621E-9 evalInputDelta=0.23465552926063538
Fitness changed from -6.961721554398537 to -7.196377083659172
Iteration 9 complete. Error: -7.196377083659172 Total: 148.8735; Orientation: 2.0485; Line Search: 98.3293
Adding measurement 4b91f657 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.627e+03, gradient 2.201e-04, dot -0.020; [ab755e08-d17b-4163-9979-ad8a1ac2858c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.196377083659172, -0.6976984143257141, -0.2031952142715454, -0.20318815112113953
LBFGS Accumulation History: 3 points
Removed measurement 4b91f657 to history. Total: 3
th(0)=-7.196377083659172;dx=-4.843222106746711E-8
Armijo: th(8.686680670208558E7)=-6.342949390411377; dx=1.2658595992659334E-8 evalInputDelta=-0.8534276932477951
Armijo: th(4.343340335104279E7)=-7.029129087924957; dx=1.0344828297971694E-8 evalInputDelta=-0.16724799573421478
New Minimum: -7.196377083659172 > -7.332815989851952
WOLF (strong): th(1.4477801117014265E7)=-7.332815989851952; dx=3.447618717256773E-9 evalInputDelta=0.13643890619277954
END: th(3619450.279253566)=-7.31858991086483; dx=-1.5403491543843635E-8 evalInputDelta=0.12221282720565796
Fitness changed from -7.196377083659172 to -7.332815989851952
Iteration 10 complete. Error: -7.332815989851952 Total: 295.0532; Orientation: 2.0230; Line Search: 244.9851
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/67d019c3-d4c6-4294-b6c2-cd06db682523.jpg)
Final threshold in iteration 11: -7.332815989851952 (> -Infinity) after 2269.341s (< 5400.000s)
Returns
-7.332815989851952