BasicOptimizer.scala:89 executed in 84.20 seconds (1.039 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: 305570251081800
Reset training subject: 305572048279100
Corrupt weights measurement
LBFGS Accumulation History: 0 points
Constructing line search parameters: GD+Trust
New Minimum: -165.14446232391148 > -165.30021728165298
th(0)=-165.30021728165298;dx=-4.052566771391932E-5
New Minimum: -165.30021728165298 > -165.30029821339247
END: th(2.154434690031884)=-165.30029821339247; dx=-3.365699353067052E-5 evalInputDelta=8.09317394896425E-5
Fitness changed from -165.14446232391148 to -165.30029821339247
Iteration 1 complete. Error: -165.30029821339247 Total: 8.1673; Orientation: 0.0374; Line Search: 3.2214
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/783d2993-4a06-40d2-a5a8-9b8d6fd11006.jpg)
Adding measurement 5b681523 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-165.30029821339247;dx=-3.362538067575382E-5
New Minimum: -165.30029821339247 > -165.30046630226326
WOLFE (weak): th(4.641588833612779)=-165.30046630226326; dx=-3.361113984340693E-5 evalInputDelta=1.680888707937811E-4
New Minimum: -165.30046630226326 > -165.30064061646726
WOLFE (weak): th(9.283177667225559)=-165.30064061646726; dx=-3.3611716695508313E-5 evalInputDelta=3.4240307479649346E-4
New Minimum: -165.30064061646726 > -165.30132542048906
WOLFE (weak): th(27.849533001676676)=-165.30132542048906; dx=-3.358029630862199E-5 evalInputDelta=0.0010272070965982039
New Minimum: -165.30132542048906 > -165.30438832739267
WOLFE (weak): th(111.3981320067067)=-165.30438832739267; dx=-3.359169548299635E-5 evalInputDelta=0.004090114000206313
New Minimum: -165.30438832739267 > -165.32074777147986
WOLFE (weak): th(556.9906600335335)=-165.32074777147986; dx=-3.3587044988003844E-5 evalInputDelta=0.02044955808739246
New Minimum: -165.32074777147986 > -165.42295142145642
WOLFE (weak): th(3341.9439602012008)=-165.42295142145642; dx=-3.35629619318392E-5 evalInputDelta=0.12265320806395152
New Minimum: -165.42295142145642 > -166.15609607166473
WOLFE (weak): th(23393.607721408407)=-166.15609607166473; dx=-3.331137972749902E-5 evalInputDelta=0.8557978582722683
New Minimum: -166.15609607166473 > -171.8932192047715
WOLFE (weak): th(187148.86177126726)=-171.8932192047715; dx=-3.07580082463923E-5 evalInputDelta=6.592920991379032
New Minimum: -171.8932192047715 > -207.12950834974686
END: th(1684339.7559414054)=-207.12950834974686; dx=-1.3742885622620864E-5 evalInputDelta=41.82921013635439
Fitness changed from -165.30029821339247 to -207.12950834974686
Iteration 2 complete. Error: -207.12950834974686 Total: 18.9169; Orientation: 0.0634; Line Search: 17.0090
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/c668a51b-f3bc-44fa-9732-c873562f51e2.jpg)
Adding measurement 2e0ed2e7 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-207.12950834974686;dx=-1.4557655736648923E-5
New Minimum: -207.12950834974686 > -244.25173304543037
END: th(3628800.0000000005)=-244.25173304543037; dx=-5.3785974683067184E-6 evalInputDelta=37.122224695683514
Fitness changed from -207.12950834974686 to -244.25173304543037
Iteration 3 complete. Error: -244.25173304543037 Total: 5.3984; Orientation: 0.0620; Line Search: 3.5050
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/271c1d04-599b-4c69-b7a9-d56d2777b0f3.jpg)
Adding measurement 353712c9 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-244.25173304543037;dx=-9.217016866269669E-6
New Minimum: -244.25173304543037 > -271.62028521728064
WOLF (strong): th(7818012.603187701)=-271.62028521728064; dx=1.6281852808203306E-7 evalInputDelta=27.36855217185027
END: th(3909006.3015938504)=-267.46918907933605; dx=-2.7624276210824122E-6 evalInputDelta=23.217456033905677
Fitness changed from -244.25173304543037 to -271.62028521728064
Iteration 4 complete. Error: -271.62028521728064 Total: 6.6523; Orientation: 0.0614; Line Search: 4.7943
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/1d252544-2a93-492c-ab18-709ad90cdc28.jpg)
Adding measurement 749e4cca to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.487e+04, gradient 3.658e-03, dot -0.446; [e0f53a6b-d8ad-4736-9136-747e35052a79 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -271.62028521728064, -244.25173304543037, -207.12950834974686, -165.30029821339247
LBFGS Accumulation History: 3 points
Removed measurement 749e4cca to history. Total: 3
th(0)=-271.62028521728064;dx=-1.3358656551977854E-5
Armijo: th(8421698.779707028)=-271.3007578042928; dx=6.019555169954794E-6 evalInputDelta=-0.3195274129878385
New Minimum: -271.62028521728064 > -294.826696993176
WOLF (strong): th(4210849.389853514)=-294.826696993176; dx=1.994542823492393E-6 evalInputDelta=23.206411775895333
END: th(1403616.4632845046)=-287.8236242744042; dx=-7.71164114455378E-6 evalInputDelta=16.20333905712357
Fitness changed from -271.62028521728064 to -294.826696993176
Iteration 5 complete. Error: -294.826696993176 Total: 9.6863; Orientation: 1.0872; Line Search: 6.5152
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/c60bcf7a-ed5e-4a74-b13d-699fa6e2afa6.jpg)
Adding measurement 15b4fc03 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.037e+04, gradient 2.917e-03, dot -0.459; [e0f53a6b-d8ad-4736-9136-747e35052a79 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -294.826696993176, -244.25173304543037, -207.12950834974686, -165.30029821339247
LBFGS Accumulation History: 3 points
Removed measurement 15b4fc03 to history. Total: 3
th(0)=-294.826696993176;dx=-8.49845672365113E-6
New Minimum: -294.826696993176 > -309.86773115620576
END: th(3024000.0000000005)=-309.86773115620576; dx=-9.23926521459375E-7 evalInputDelta=15.041034163029792
Fitness changed from -294.826696993176 to -309.86773115620576
Iteration 6 complete. Error: -309.86773115620576 Total: 6.1582; Orientation: 1.0705; Line Search: 3.2217
Adding measurement 5743b43c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.834e+04, gradient 2.079e-03, dot -0.577; [e0f53a6b-d8ad-4736-9136-747e35052a79 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -309.86773115620576, -244.25173304543037, -207.12950834974686, -165.30029821339247
LBFGS Accumulation History: 3 points
Removed measurement 5743b43c to history. Total: 3
th(0)=-309.86773115620576;dx=-4.300002446126195E-6
New Minimum: -309.86773115620576 > -319.9402972734773
WOLF (strong): th(6515010.502656418)=-319.9402972734773; dx=4.7617105064927384E-7 evalInputDelta=10.072566117271549
END: th(3257505.251328209)=-319.2714334378999; dx=-1.3535949918500225E-6 evalInputDelta=9.403702281694109
Fitness changed from -309.86773115620576 to -319.9402972734773
Iteration 7 complete. Error: -319.9402972734773 Total: 7.6338; Orientation: 1.0955; Line Search: 4.9734
Adding measurement 20d1f9f1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.497e+04, gradient 2.822e-03, dot -0.405; [e0f53a6b-d8ad-4736-9136-747e35052a79 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -319.9402972734773, -244.25173304543037, -207.12950834974686, -165.30029821339247
LBFGS Accumulation History: 3 points
Removed measurement 20d1f9f1 to history. Total: 3
th(0)=-319.9402972734773;dx=-7.962460680242388E-6
Armijo: th(7018082.316422524)=-317.7941435673242; dx=4.632273832437095E-6 evalInputDelta=-2.146153706153086
New Minimum: -319.9402972734773 > -331.88886018551824
WOLF (strong): th(3509041.158211262)=-331.88886018551824; dx=1.2340632739665404E-6 evalInputDelta=11.948562912040927
END: th(1169680.3860704207)=-328.1083919457913; dx=-4.79675687473901E-6 evalInputDelta=8.168094672313998
Fitness changed from -319.9402972734773 to -331.88886018551824
Iteration 8 complete. Error: -331.88886018551824 Total: 9.4638; Orientation: 0.9914; Line Search: 6.7919
Adding measurement 22974d00 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.844e+04, gradient 2.117e-03, dot -0.471; [e0f53a6b-d8ad-4736-9136-747e35052a79 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -331.88886018551824, -244.25173304543037, -207.12950834974686, -165.30029821339247
LBFGS Accumulation History: 3 points
Removed measurement 22974d00 to history. Total: 3
th(0)=-331.88886018551824;dx=-4.474188213582443E-6
New Minimum: -331.88886018551824 > -339.27224262515625
END: th(2520000.000000001)=-339.27224262515625; dx=-1.1286371181872615E-6 evalInputDelta=7.383382439638012
Fitness changed from -331.88886018551824 to -339.27224262515625
Iteration 9 complete. Error: -339.27224262515625 Total: 5.8820; Orientation: 1.0150; Line Search: 3.3128
Adding measurement 6b553239 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.038e+04, gradient 1.529e-03, dot -0.593; [e0f53a6b-d8ad-4736-9136-747e35052a79 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -339.27224262515625, -244.25173304543037, -207.12950834974686, -165.30029821339247
LBFGS Accumulation History: 3 points
Removed measurement 6b553239 to history. Total: 3
th(0)=-339.27224262515625;dx=-2.334237813105229E-6
New Minimum: -339.27224262515625 > -346.74647034382355
END: th(5429175.418880349)=-346.74647034382355; dx=-6.334392892784554E-7 evalInputDelta=7.474227718667294
Fitness changed from -339.27224262515625 to -346.74647034382355
Iteration 10 complete. Error: -346.74647034382355 Total: 5.9574; Orientation: 0.9902; Line Search: 3.2936
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/9af664f7-887c-4a25-b3b0-868c2f7a7455.jpg)
Final threshold in iteration 11: -346.74647034382355 (> -Infinity) after 84.198s (< 5400.000s)
Returns
-346.74647034382355