BasicOptimizer.scala:89 executed in 229.32 seconds (2.540 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: 3737587588682
Reset training subject: 3743159656589
Adding measurement 4e202368 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-13.05845832824707;dx=-2.8786857691828715E-6
New Minimum: -13.05845832824707 > -13.058465749025345
WOLFE (weak): th(2.154434690031884)=-13.058465749025345; dx=-2.722995787431956E-6 evalInputDelta=7.420778274536133E-6
New Minimum: -13.058465749025345 > -13.058472901582718
WOLFE (weak): th(4.308869380063768)=-13.058472901582718; dx=-2.7236544666353176E-6 evalInputDelta=1.4573335647583008E-5
New Minimum: -13.058472901582718 > -13.058501213788986
WOLFE (weak): th(12.926608140191302)=-13.058501213788986; dx=-2.7234760246337455E-6 evalInputDelta=4.2885541915893555E-5
New Minimum: -13.058501213788986 > -13.058629423379898
WOLFE (weak): th(51.70643256076521)=-13.058629423379898; dx=-2.7238770889885173E-6 evalInputDelta=1.710951328277588E-4
New Minimum: -13.058629423379898 > -13.059312969446182
WOLFE (weak): th(258.53216280382605)=-13.059312969446182; dx=-2.7232636771869157E-6 evalInputDelta=8.546411991119385E-4
New Minimum: -13.059312969446182 > -13.063580304384232
WOLFE (weak): th(1551.1929768229563)=-13.063580304384232; dx=-2.7187914102100787E-6 evalInputDelta=0.005121976137161255
New Minimum: -13.063580304384232 > -13.094141393899918
WOLFE (weak): th(10858.350837760694)=-13.094141393899918; dx=-2.693329223408127E-6 evalInputDelta=0.03568306565284729
New Minimum: -13.094141393899918 > -13.331410199403763
END: th(86866.80670208555)=-13.331410199403763; dx=-2.4456197270198502E-6 evalInputDelta=0.2729518711566925
Fitness changed from -13.05845832824707 to -13.331410199403763
Iteration 1 complete. Error: -13.331410199403763 Total: 61.0501; Orientation: 0.0268; Line Search: 45.5722
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/a07b3199-658b-4a9c-a47d-4eeef077fe90.jpg)
Adding measurement 6d58d72b to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-13.331410199403763;dx=-2.2680550323852296E-6
New Minimum: -13.331410199403763 > -13.789625644683838
END: th(187148.86177126726)=-13.789625644683838; dx=-1.7682882814498637E-6 evalInputDelta=0.4582154452800751
Fitness changed from -13.331410199403763 to -13.789625644683838
Iteration 2 complete. Error: -13.789625644683838 Total: 15.2851; Orientation: 0.0304; Line Search: 9.7281
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/a5b85330-8789-4905-b752-0a9172e38819.jpg)
Adding measurement 63b18d71 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-13.789625644683838;dx=-1.6027043023918231E-6
New Minimum: -13.789625644683838 > -14.4281165599823
END: th(403200.00000000006)=-14.4281165599823; dx=-1.0408601163142651E-6 evalInputDelta=0.6384909152984619
Fitness changed from -13.789625644683838 to -14.4281165599823
Iteration 3 complete. Error: -14.4281165599823 Total: 15.9806; Orientation: 0.0299; Line Search: 10.5551
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/a7de57a0-9a83-43b6-9ca6-cc34dc044286.jpg)
Adding measurement 1e8709f3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.689e+03, gradient 1.044e-03, dot -0.843; [a7f43b0d-5d09-41c2-928d-1041cbff61f6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -14.4281165599823, -13.789625644683838, -13.331410199403763, -13.05845832824707
LBFGS Accumulation History: 3 points
Removed measurement 1e8709f3 to history. Total: 3
th(0)=-14.4281165599823;dx=-1.088161465696505E-6
New Minimum: -14.4281165599823 > -15.208950817584991
END: th(868668.0670208557)=-15.208950817584991; dx=-5.463976567093102E-7 evalInputDelta=0.7808342576026917
Fitness changed from -14.4281165599823 to -15.208950817584991
Iteration 4 complete. Error: -15.208950817584991 Total: 16.0424; Orientation: 0.6104; Line Search: 10.3252
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/ebab611b-fd45-44b9-93b7-4c6693c9d698.jpg)
Adding measurement 3f76ea63 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.753e+03, gradient 9.426e-04, dot -0.713; [a7f43b0d-5d09-41c2-928d-1041cbff61f6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -15.208950817584991, -13.789625644683838, -13.331410199403763, -13.05845832824707
LBFGS Accumulation History: 3 points
Removed measurement 3f76ea63 to history. Total: 3
th(0)=-15.208950817584991;dx=-8.871244731066431E-7
New Minimum: -15.208950817584991 > -15.941814571619034
END: th(1871488.617712673)=-15.941814571619034; dx=-1.445916511706256E-7 evalInputDelta=0.7328637540340424
Fitness changed from -15.208950817584991 to -15.941814571619034
Iteration 5 complete. Error: -15.941814571619034 Total: 16.5467; Orientation: 0.6275; Line Search: 10.5461
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/e9b273f3-3db7-414b-9de1-da604eb0a8a9.jpg)
Adding measurement 3a7e37b6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.562e+03, gradient 1.011e-03, dot -0.450; [a7f43b0d-5d09-41c2-928d-1041cbff61f6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -15.941814571619034, -13.789625644683838, -13.331410199403763, -13.05845832824707
LBFGS Accumulation History: 3 points
Removed measurement 3a7e37b6 to history. Total: 3
th(0)=-15.941814571619034;dx=-1.021654437115975E-6
Armijo: th(4032000.0000000014)=-15.848748475313187; dx=1.961925849212212E-7 evalInputDelta=-0.09306609630584717
New Minimum: -15.941814571619034 > -16.440236419439316
WOLF (strong): th(2016000.0000000007)=-16.440236419439316; dx=1.8480689103877007E-7 evalInputDelta=0.498421847820282
New Minimum: -16.440236419439316 > -16.486034989356995
END: th(672000.0000000002)=-16.486034989356995; dx=-3.133046820477615E-7 evalInputDelta=0.5442204177379608
Fitness changed from -15.941814571619034 to -16.486034989356995
Iteration 6 complete. Error: -16.486034989356995 Total: 26.2801; Orientation: 0.6163; Line Search: 20.4878
Adding measurement cb581fc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.984e+03, gradient 7.251e-04, dot -0.599; [a7f43b0d-5d09-41c2-928d-1041cbff61f6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -16.486034989356995, -13.789625644683838, -13.331410199403763, -13.05845832824707
LBFGS Accumulation History: 3 points
Removed measurement cb581fc to history. Total: 3
th(0)=-16.486034989356995;dx=-5.252938816400952E-7
New Minimum: -16.486034989356995 > -16.973664313554764
END: th(1447780.1117014263)=-16.973664313554764; dx=-1.072131245005765E-7 evalInputDelta=0.48762932419776917
Fitness changed from -16.486034989356995 to -16.973664313554764
Iteration 7 complete. Error: -16.973664313554764 Total: 15.5143; Orientation: 0.6186; Line Search: 9.9128
Adding measurement 163d1b57 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.194e+03, gradient 7.455e-04, dot -0.534; [a7f43b0d-5d09-41c2-928d-1041cbff61f6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -16.973664313554764, -13.789625644683838, -13.331410199403763, -13.05845832824707
LBFGS Accumulation History: 3 points
Removed measurement 163d1b57 to history. Total: 3
th(0)=-16.973664313554764;dx=-5.551353110525269E-7
New Minimum: -16.973664313554764 > -17.050939977169037
WOLF (strong): th(3119147.6961877886)=-17.050939977169037; dx=1.544511480100625E-7 evalInputDelta=0.07727566361427307
New Minimum: -17.050939977169037 > -17.334064066410065
WOLF (strong): th(1559573.8480938943)=-17.334064066410065; dx=5.6820514334330264E-8 evalInputDelta=0.3603997528553009
END: th(519857.94936463144)=-17.23960569500923; dx=-2.911206394726641E-7 evalInputDelta=0.2659413814544678
Fitness changed from -16.973664313554764 to -17.334064066410065
Iteration 8 complete. Error: -17.334064066410065 Total: 26.0513; Orientation: 0.6057; Line Search: 20.5003
Adding measurement 575584db to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.183e+03, gradient 7.689e-04, dot -0.463; [a7f43b0d-5d09-41c2-928d-1041cbff61f6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -17.334064066410065, -13.789625644683838, -13.331410199403763, -13.05845832824707
LBFGS Accumulation History: 3 points
Removed measurement 575584db to history. Total: 3
th(0)=-17.334064066410065;dx=-5.907818852616534E-7
New Minimum: -17.334064066410065 > -17.709750413894653
END: th(1120000.0000000005)=-17.709750413894653; dx=-8.762914130566227E-9 evalInputDelta=0.3756863474845886
Fitness changed from -17.334064066410065 to -17.709750413894653
Iteration 9 complete. Error: -17.709750413894653 Total: 16.0452; Orientation: 0.6141; Line Search: 10.4295
Adding measurement 53bc88b0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.437e+03, gradient 5.784e-04, dot -0.573; [a7f43b0d-5d09-41c2-928d-1041cbff61f6 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -17.709750413894653, -13.789625644683838, -13.331410199403763, -13.05845832824707
LBFGS Accumulation History: 3 points
Removed measurement 53bc88b0 to history. Total: 3
th(0)=-17.709750413894653;dx=-3.341097711396048E-7
New Minimum: -17.709750413894653 > -17.91156193614006
WOLF (strong): th(2412966.852835711)=-17.91156193614006; dx=8.01964256325949E-8 evalInputDelta=0.2018115222454071
New Minimum: -17.91156193614006 > -17.96660989522934
END: th(1206483.4264178555)=-17.96660989522934; dx=-5.00913991493289E-8 evalInputDelta=0.2568594813346863
Fitness changed from -17.709750413894653 to -17.96660989522934
Iteration 10 complete. Error: -17.96660989522934 Total: 20.2560; Orientation: 0.6216; Line Search: 14.6711
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/c6fa2848-12c5-4827-8636-2003ae4c47bd.jpg)
Final threshold in iteration 11: -17.96660989522934 (> -Infinity) after 229.320s (< 5400.000s)
Returns
-17.96660989522934