BasicOptimizer.scala:89 executed in 115.85 seconds (1.561 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: 41963078659100
Reset training subject: 41965408617800
Corrupt weights measurement
LBFGS Accumulation History: 0 points
Constructing line search parameters: GD+Trust
New Minimum: -47.23906970155087 > -47.44671563870771
th(0)=-47.44671563870771;dx=-1.7652927942664933E-6
New Minimum: -47.44671563870771 > -47.446717481868625
END: th(2.154434690031884)=-47.446717481868625; dx=-1.4823858905391545E-6 evalInputDelta=1.8431609163371832E-6
Fitness changed from -47.23906970155087 to -47.446717481868625
Iteration 1 complete. Error: -47.446717481868625 Total: 11.7504; Orientation: 0.0398; Line Search: 4.8352
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/fa740417-d450-4d68-acf8-a5fc39ae951c.jpg)
Adding measurement 4bf5bfc9 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-47.446717481868625;dx=-1.48347084020507E-6
New Minimum: -47.446717481868625 > -47.44672669767215
WOLFE (weak): th(4.641588833612779)=-47.44672669767215; dx=-1.4812900816075007E-6 evalInputDelta=9.21580352297724E-6
New Minimum: -47.44672669767215 > -47.44673407031367
WOLFE (weak): th(9.283177667225559)=-47.44673407031367; dx=-1.4794495198531372E-6 evalInputDelta=1.658844504248691E-5
New Minimum: -47.44673407031367 > -47.44676356086832
WOLFE (weak): th(27.849533001676676)=-47.44676356086832; dx=-1.4786712416866325E-6 evalInputDelta=4.60789996949984E-5
New Minimum: -47.44676356086832 > -47.446898111291304
WOLFE (weak): th(111.3981320067067)=-47.446898111291304; dx=-1.4765044385899766E-6 evalInputDelta=1.8062942267960125E-4
New Minimum: -47.446898111291304 > -47.44761140647569
WOLFE (weak): th(556.9906600335335)=-47.44761140647569; dx=-1.4766303987870682E-6 evalInputDelta=8.939246070625018E-4
New Minimum: -47.44761140647569 > -47.45207709100314
WOLFE (weak): th(3341.9439602012008)=-47.45207709100314; dx=-1.476501117445513E-6 evalInputDelta=0.005359609134515608
New Minimum: -47.45207709100314 > -47.48420730829405
WOLFE (weak): th(23393.607721408407)=-47.48420730829405; dx=-1.4744936476620805E-6 evalInputDelta=0.03748982642542842
New Minimum: -47.48420730829405 > -47.74517263029701
WOLFE (weak): th(187148.86177126726)=-47.74517263029701; dx=-1.460041125491748E-6 evalInputDelta=0.2984551484283884
New Minimum: -47.74517263029701 > -49.990562761621554
END: th(1684339.7559414054)=-49.990562761621554; dx=-1.3081971739905583E-6 evalInputDelta=2.5438452797529294
Fitness changed from -47.446717481868625 to -49.990562761621554
Iteration 2 complete. Error: -49.990562761621554 Total: 27.1246; Orientation: 0.0586; Line Search: 24.4724
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/85580d4f-8eb0-4a3e-afdd-2c61eb8ff0f5.jpg)
Adding measurement 1dace20b to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-49.990562761621554;dx=-1.3177942457183133E-6
New Minimum: -49.990562761621554 > -54.417379608365906
END: th(3628800.0000000005)=-54.417379608365906; dx=-1.0032454258469765E-6 evalInputDelta=4.426816846744352
Fitness changed from -49.990562761621554 to -54.417379608365906
Iteration 3 complete. Error: -54.417379608365906 Total: 8.0698; Orientation: 0.0819; Line Search: 5.2694
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/4a631746-0441-4c0e-bcf4-4b322e430c46.jpg)
Adding measurement 7eab8aa0 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-54.417379608365906;dx=-9.500533587257614E-7
New Minimum: -54.417379608365906 > -61.093779785084685
END: th(7818012.603187701)=-61.093779785084685; dx=-6.530400401929112E-7 evalInputDelta=6.676400176718779
Fitness changed from -54.417379608365906 to -61.093779785084685
Iteration 4 complete. Error: -61.093779785084685 Total: 8.2251; Orientation: 0.0667; Line Search: 5.0428
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/ae6926cf-3b3b-4042-8899-e5f6cdd1464b.jpg)
Adding measurement 218f3b6b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.470e+04, gradient 8.127e-04, dot -0.813; [68d8f865-1c55-4fdd-8442-6c39d265e198 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -61.093779785084685, -54.417379608365906, -49.990562761621554, -47.446717481868625
LBFGS Accumulation History: 3 points
Removed measurement 218f3b6b to history. Total: 3
th(0)=-61.093779785084685;dx=-6.60099061807893E-7
New Minimum: -61.093779785084685 > -70.02811679821812
END: th(1.6843397559414055E7)=-70.02811679821812; dx=-3.685929615856812E-7 evalInputDelta=8.934337013133437
Fitness changed from -61.093779785084685 to -70.02811679821812
Iteration 5 complete. Error: -70.02811679821812 Total: 9.5249; Orientation: 1.2582; Line Search: 5.2496
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/fc5e3b85-3c16-4b1c-8326-df401d327d8e.jpg)
Adding measurement 5d76e437 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.294e+04, gradient 7.005e-04, dot -0.653; [68d8f865-1c55-4fdd-8442-6c39d265e198 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -70.02811679821812, -54.417379608365906, -49.990562761621554, -47.446717481868625
LBFGS Accumulation History: 3 points
Removed measurement 5d76e437 to history. Total: 3
th(0)=-70.02811679821812;dx=-4.892066615531231E-7
New Minimum: -70.02811679821812 > -79.59843456167027
END: th(3.628800000000001E7)=-79.59843456167027; dx=-1.1721166608286017E-7 evalInputDelta=9.570317763452152
Fitness changed from -70.02811679821812 to -79.59843456167027
Iteration 6 complete. Error: -79.59843456167027 Total: 8.7607; Orientation: 1.1571; Line Search: 4.5599
Adding measurement 13fe11d4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.991e+04, gradient 7.925e-04, dot -0.376; [68d8f865-1c55-4fdd-8442-6c39d265e198 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -79.59843456167027, -54.417379608365906, -49.990562761621554, -47.446717481868625
LBFGS Accumulation History: 3 points
Removed measurement 13fe11d4 to history. Total: 3
th(0)=-79.59843456167027;dx=-6.271872731502852E-7
Armijo: th(7.818012603187701E7)=-76.24951737099678; dx=1.4314248643136017E-7 evalInputDelta=-3.3489171906734896
New Minimum: -79.59843456167027 > -83.51794648586718
WOLF (strong): th(3.9090063015938506E7)=-83.51794648586718; dx=1.3879416830921707E-7 evalInputDelta=3.919511924196911
New Minimum: -83.51794648586718 > -85.09009337636205
END: th(1.3030021005312836E7)=-85.09009337636205; dx=-1.831013885161339E-7 evalInputDelta=5.491658814691775
Fitness changed from -79.59843456167027 to -85.09009337636205
Iteration 7 complete. Error: -85.09009337636205 Total: 12.8607; Orientation: 1.1315; Line Search: 9.5665
Adding measurement 2b9d091 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.131e+04, gradient 5.715e-04, dot -0.557; [68d8f865-1c55-4fdd-8442-6c39d265e198 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -85.09009337636205, -54.417379608365906, -49.990562761621554, -47.446717481868625
LBFGS Accumulation History: 3 points
Removed measurement 2b9d091 to history. Total: 3
th(0)=-85.09009337636205;dx=-3.257569125866671E-7
New Minimum: -85.09009337636205 > -90.29770088185515
END: th(2.8072329265690096E7)=-90.29770088185515; dx=-8.00947538204456E-8 evalInputDelta=5.207607505493101
Fitness changed from -85.09009337636205 to -90.29770088185515
Iteration 8 complete. Error: -90.29770088185515 Total: 7.9815; Orientation: 1.1482; Line Search: 4.6651
Adding measurement 3fd0f8cf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.530e+04, gradient 6.648e-04, dot -0.433; [68d8f865-1c55-4fdd-8442-6c39d265e198 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -90.29770088185515, -54.417379608365906, -49.990562761621554, -47.446717481868625
LBFGS Accumulation History: 3 points
Removed measurement 3fd0f8cf to history. Total: 3
th(0)=-90.29770088185515;dx=-4.413319284487466E-7
Armijo: th(6.048000000000002E7)=-88.90743456698384; dx=1.1982913196564965E-7 evalInputDelta=-1.3902663148713117
New Minimum: -90.29770088185515 > -93.3262633206602
WOLF (strong): th(3.024000000000001E7)=-93.3262633206602; dx=8.805656239493505E-8 evalInputDelta=3.0285624388050536
New Minimum: -93.3262633206602 > -93.54752855564445
END: th(1.0080000000000004E7)=-93.54752855564445; dx=-1.772860192519195E-7 evalInputDelta=3.249827673789298
Fitness changed from -90.29770088185515 to -93.54752855564445
Iteration 9 complete. Error: -93.54752855564445 Total: 12.7333; Orientation: 1.1539; Line Search: 9.4003
Adding measurement 652f5348 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.187e+04, gradient 4.730e-04, dot -0.616; [68d8f865-1c55-4fdd-8442-6c39d265e198 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -93.54752855564445, -54.417379608365906, -49.990562761621554, -47.446717481868625
LBFGS Accumulation History: 3 points
Removed measurement 652f5348 to history. Total: 3
th(0)=-93.54752855564445;dx=-2.2329246652067852E-7
New Minimum: -93.54752855564445 > -97.18449273181861
END: th(2.1716701675521396E7)=-97.18449273181861; dx=-1.2463441304155122E-7 evalInputDelta=3.6369641761741605
Fitness changed from -93.54752855564445 to -97.18449273181861
Iteration 10 complete. Error: -97.18449273181861 Total: 8.3211; Orientation: 1.1316; Line Search: 4.7686
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/f50af509-4763-4e3f-9f97-6b07b08ab81f.jpg)
Final threshold in iteration 11: -97.18449273181861 (> -Infinity) after 115.848s (< 5400.000s)
Returns
-97.18449273181861