BasicOptimizer.scala:89 executed in 331.75 seconds (4.204 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: 657850534426500
Reset training subject: 657856469941100
Adding measurement 7c182442 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-17.268732245051904;dx=-2.286275851710676E-6
New Minimum: -17.268732245051904 > -17.268736071988105
WOLFE (weak): th(2.154434690031884)=-17.268736071988105; dx=-2.169168686672806E-6 evalInputDelta=3.8269362008236385E-6
New Minimum: -17.268736071988105 > -17.26874208574328
WOLFE (weak): th(4.308869380063768)=-17.26874208574328; dx=-2.1681205689807783E-6 evalInputDelta=9.840691376439281E-6
New Minimum: -17.26874208574328 > -17.26876340722202
WOLFE (weak): th(12.926608140191302)=-17.26876340722202; dx=-2.169134319516321E-6 evalInputDelta=3.1162170117227106E-5
New Minimum: -17.26876340722202 > -17.268857440096248
WOLFE (weak): th(51.70643256076521)=-17.268857440096248; dx=-2.169194160343087E-6 evalInputDelta=1.251950443439398E-4
New Minimum: -17.268857440096248 > -17.269358211197552
WOLFE (weak): th(258.53216280382605)=-17.269358211197552; dx=-2.168690778710491E-6 evalInputDelta=6.25966145648249E-4
New Minimum: -17.269358211197552 > -17.27248934140354
WOLFE (weak): th(1551.1929768229563)=-17.27248934140354; dx=-2.1686271562300572E-6 evalInputDelta=0.003757096351634459
New Minimum: -17.27248934140354 > -17.29502678906268
WOLFE (weak): th(10858.350837760694)=-17.29502678906268; dx=-2.167803152543347E-6 evalInputDelta=0.026294544010774246
New Minimum: -17.29502678906268 > -17.478794995868558
WOLFE (weak): th(86866.80670208555)=-17.478794995868558; dx=-2.1618491048334597E-6 evalInputDelta=0.21006275081665393
New Minimum: -17.478794995868558 > -19.121713255609304
WOLFE (weak): th(781801.26031877)=-19.121713255609304; dx=-2.060797469669276E-6 evalInputDelta=1.8529810105574
New Minimum: -19.121713255609304 > -27.110312423896215
END: th(7818012.6031877)=-27.110312423896215; dx=-1.254369921518334E-7 evalInputDelta=9.84158017884431
Fitness changed from -17.268732245051904 to -27.110312423896215
Iteration 1 complete. Error: -27.110312423896215 Total: 84.2901; Orientation: 0.1435; Line Search: 66.6679
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/07e9daff-f29c-4e54-a6b4-d287536e6c0b.jpg)
Adding measurement 1a028af3 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-27.110312423896215;dx=-1.7040860080394419E-6
New Minimum: -27.110312423896215 > -31.2405125123117
WOLF (strong): th(1.684339755941405E7)=-31.2405125123117; dx=2.620850922633522E-7 evalInputDelta=4.130200088415485
New Minimum: -31.2405125123117 > -33.59931045595056
WOLF (strong): th(8421698.779707026)=-33.59931045595056; dx=8.338254223574939E-8 evalInputDelta=6.488998032054344
END: th(2807232.9265690087)=-31.4826871003527; dx=-1.025438544518284E-6 evalInputDelta=4.372374676456484
Fitness changed from -27.110312423896215 to -33.59931045595056
Iteration 2 complete. Error: -33.59931045595056 Total: 31.0153; Orientation: 0.1363; Line Search: 24.0556
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/88bc5343-a831-44d9-af0a-06a1aad70f3a.jpg)
Adding measurement 69d42729 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-33.59931045595056;dx=-1.6116674970296965E-6
New Minimum: -33.59931045595056 > -39.590272566629764
END: th(6048000.0)=-39.590272566629764; dx=-1.1341368130776126E-7 evalInputDelta=5.990962110679206
Fitness changed from -33.59931045595056 to -39.590272566629764
Iteration 3 complete. Error: -39.590272566629764 Total: 19.9311; Orientation: 0.1509; Line Search: 12.6083
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/0ea8694b-d29b-4a15-8dd5-a7d011b44d58.jpg)
Adding measurement c3effd1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.234e+04, gradient 1.003e-03, dot -0.698; [e5e9f643-e8d4-4a00-99d9-d61b14ffd535 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -39.590272566629764, -33.59931045595056, -27.110312423896215, -17.268732245051904
LBFGS Accumulation History: 3 points
Removed measurement c3effd1 to history. Total: 3
th(0)=-39.590272566629764;dx=-1.0048662532071474E-6
New Minimum: -39.590272566629764 > -43.54034476464721
WOLF (strong): th(1.3030021005312834E7)=-43.54034476464721; dx=8.86371624824182E-8 evalInputDelta=3.9500721980174447
New Minimum: -43.54034476464721 > -43.614960971814746
END: th(6515010.502656417)=-43.614960971814746; dx=-1.7462151390861983E-7 evalInputDelta=4.024688405184982
Fitness changed from -39.590272566629764 to -43.614960971814746
Iteration 4 complete. Error: -43.614960971814746 Total: 28.6879; Orientation: 2.6963; Line Search: 18.9044
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/95b2db52-68c5-4a50-a832-7f473cc99e99.jpg)
Adding measurement 7747ca66 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.856e+04, gradient 9.794e-04, dot -0.691; [e5e9f643-e8d4-4a00-99d9-d61b14ffd535 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -43.614960971814746, -33.59931045595056, -27.110312423896215, -17.268732245051904
LBFGS Accumulation History: 3 points
Removed measurement 7747ca66 to history. Total: 3
th(0)=-43.614960971814746;dx=-9.587825682359403E-7
New Minimum: -43.614960971814746 > -46.9651306099628
WOLF (strong): th(1.4036164632845046E7)=-46.9651306099628; dx=9.924696832767891E-8 evalInputDelta=3.350169638148053
New Minimum: -46.9651306099628 > -47.3865085098545
END: th(7018082.316422523)=-47.3865085098545; dx=-9.637713512030425E-8 evalInputDelta=3.771547538039755
Fitness changed from -43.614960971814746 to -47.3865085098545
Iteration 5 complete. Error: -47.3865085098545 Total: 28.4495; Orientation: 2.5717; Line Search: 18.3085
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/47862431-501a-4809-9b76-909c4c6f2189.jpg)
Adding measurement 309ae77b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.664e+04, gradient 9.800e-04, dot -0.634; [e5e9f643-e8d4-4a00-99d9-d61b14ffd535 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -47.3865085098545, -33.59931045595056, -27.110312423896215, -17.268732245051904
LBFGS Accumulation History: 3 points
Removed measurement 309ae77b to history. Total: 3
th(0)=-47.3865085098545;dx=-9.597428835544279E-7
New Minimum: -47.3865085098545 > -50.12452698479233
WOLF (strong): th(1.5120000000000004E7)=-50.12452698479233; dx=1.581371832162118E-7 evalInputDelta=2.7380184749378316
New Minimum: -50.12452698479233 > -51.16459891284104
END: th(7560000.000000002)=-51.16459891284104; dx=-2.683407621958535E-8 evalInputDelta=3.7780904029865425
Fitness changed from -47.3865085098545 to -51.16459891284104
Iteration 6 complete. Error: -51.16459891284104 Total: 30.1487; Orientation: 2.8337; Line Search: 20.1168
Adding measurement 5e96fc7d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.148e+04, gradient 9.689e-04, dot -0.620; [e5e9f643-e8d4-4a00-99d9-d61b14ffd535 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -51.16459891284104, -33.59931045595056, -27.110312423896215, -17.268732245051904
LBFGS Accumulation History: 3 points
Removed measurement 5e96fc7d to history. Total: 3
th(0)=-51.16459891284104;dx=-9.383247307005336E-7
New Minimum: -51.16459891284104 > -53.4384629001081
WOLF (strong): th(1.6287526256641045E7)=-53.4384629001081; dx=2.0288377058118355E-7 evalInputDelta=2.273863987267056
New Minimum: -53.4384629001081 > -54.983490489117244
WOLF (strong): th(8143763.128320523)=-54.983490489117244; dx=1.602837142796518E-8 evalInputDelta=3.818891576276201
END: th(2714587.709440174)=-53.52779957112619; dx=-6.053873328770426E-7 evalInputDelta=2.3632006582851446
Fitness changed from -51.16459891284104 to -54.983490489117244
Iteration 7 complete. Error: -54.983490489117244 Total: 33.6605; Orientation: 2.5838; Line Search: 25.0475
Adding measurement 2e7dc06b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.148e+04, gradient 9.498e-04, dot -0.585; [e5e9f643-e8d4-4a00-99d9-d61b14ffd535 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -54.983490489117244, -33.59931045595056, -27.110312423896215, -17.268732245051904
LBFGS Accumulation History: 3 points
Removed measurement 2e7dc06b to history. Total: 3
th(0)=-54.983490489117244;dx=-9.01249154546371E-7
New Minimum: -54.983490489117244 > -58.626330855630435
END: th(5848401.930352103)=-58.626330855630435; dx=-1.9993898730545708E-7 evalInputDelta=3.642840366513191
Fitness changed from -54.983490489117244 to -58.626330855630435
Iteration 8 complete. Error: -58.626330855630435 Total: 21.2958; Orientation: 2.5826; Line Search: 12.4700
Adding measurement 267d22b8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.048e+05, gradient 7.218e-04, dot -0.742; [e5e9f643-e8d4-4a00-99d9-d61b14ffd535 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -58.626330855630435, -33.59931045595056, -27.110312423896215, -17.268732245051904
LBFGS Accumulation History: 3 points
Removed measurement 267d22b8 to history. Total: 3
th(0)=-58.626330855630435;dx=-5.203212537452524E-7
New Minimum: -58.626330855630435 > -62.801442830500534
END: th(1.2600000000000004E7)=-62.801442830500534; dx=-1.4999926011453872E-7 evalInputDelta=4.175111974870099
Fitness changed from -58.626330855630435 to -62.801442830500534
Iteration 9 complete. Error: -62.801442830500534 Total: 20.7040; Orientation: 2.5624; Line Search: 11.9860
Adding measurement 1a7b998c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.683e+04, gradient 8.874e-04, dot -0.564; [e5e9f643-e8d4-4a00-99d9-d61b14ffd535 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -62.801442830500534, -33.59931045595056, -27.110312423896215, -17.268732245051904
LBFGS Accumulation History: 3 points
Removed measurement 1a7b998c to history. Total: 3
th(0)=-62.801442830500534;dx=-7.861564575860308E-7
Armijo: th(2.7145877094401743E7)=-62.617982191811585; dx=1.941408157766215E-7 evalInputDelta=-0.18346063868894902
New Minimum: -62.801442830500534 > -65.89695314177223
WOLF (strong): th(1.3572938547200872E7)=-65.89695314177223; dx=1.5227147122051837E-7 evalInputDelta=3.0955103112716955
END: th(4524312.849066957)=-65.75262190796136; dx=-3.600367953472217E-7 evalInputDelta=2.9511790774608215
Fitness changed from -62.801442830500534 to -65.89695314177223
Iteration 10 complete. Error: -65.89695314177223 Total: 32.4817; Orientation: 2.5274; Line Search: 24.2299
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/ebc58718-09e1-453a-8480-50f541d4e799.jpg)
Final threshold in iteration 11: -65.89695314177223 (> -Infinity) after 331.746s (< 5400.000s)
Returns
-65.89695314177223