BasicOptimizer.scala:89 executed in 156.93 seconds (3.094 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: 465030225337900
Reset training subject: 465033326897000
Adding measurement 682352b7 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-104.8266390669293;dx=-1.4939092558586122E-5
New Minimum: -104.8266390669293 > -104.82667087094954
END: th(2.154434690031884)=-104.82667087094954; dx=-1.2285127576252244E-5 evalInputDelta=3.180402023872375E-5
Fitness changed from -104.8266390669293 to -104.82667087094954
Iteration 1 complete. Error: -104.82667087094954 Total: 14.8880; Orientation: 0.1026; Line Search: 5.7823
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/bd8f7d84-9bd3-4035-97d4-189d4bf4cfc4.jpg)
Adding measurement 5875cffc to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-104.82667087094954;dx=-1.2289854103294645E-5
New Minimum: -104.82667087094954 > -104.82672387762848
WOLFE (weak): th(4.641588833612779)=-104.82672387762848; dx=-1.2237025712178936E-5 evalInputDelta=5.30066789394823E-5
New Minimum: -104.82672387762848 > -104.82678748560784
WOLFE (weak): th(9.283177667225559)=-104.82678748560784; dx=-1.2266446520678157E-5 evalInputDelta=1.1661465829604367E-4
New Minimum: -104.82678748560784 > -104.82703131583781
WOLFE (weak): th(27.849533001676676)=-104.82703131583781; dx=-1.2233106221607303E-5 evalInputDelta=3.604448882725819E-4
New Minimum: -104.82703131583781 > -104.82810204187327
WOLFE (weak): th(111.3981320067067)=-104.82810204187327; dx=-1.2220573262139286E-5 evalInputDelta=0.0014311709237233572
New Minimum: -104.82810204187327 > -104.83384773141513
WOLFE (weak): th(556.9906600335335)=-104.83384773141513; dx=-1.223944788878624E-5 evalInputDelta=0.007176860465591517
New Minimum: -104.83384773141513 > -104.86975645736679
WOLFE (weak): th(3341.9439602012008)=-104.86975645736679; dx=-1.2243929202715924E-5 evalInputDelta=0.04308558641724858
New Minimum: -104.86975645736679 > -105.1277194481601
WOLFE (weak): th(23393.607721408407)=-105.1277194481601; dx=-1.2192422497929266E-5 evalInputDelta=0.3010485772105511
New Minimum: -105.1277194481601 > -107.1943450660327
WOLFE (weak): th(187148.86177126726)=-107.1943450660327; dx=-1.1778421690840895E-5 evalInputDelta=2.367674195083154
New Minimum: -107.1943450660327 > -122.5493375632463
END: th(1684339.7559414054)=-122.5493375632463; dx=-7.776603713966276E-6 evalInputDelta=17.722666692296755
Fitness changed from -104.82667087094954 to -122.5493375632463
Iteration 2 complete. Error: -122.5493375632463 Total: 32.7927; Orientation: 0.1031; Line Search: 29.0676
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/840a6766-f765-4608-91f9-3a1d7d307bdc.jpg)
Adding measurement 4bd1933e to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-122.5493375632463;dx=-7.890852156147744E-6
New Minimum: -122.5493375632463 > -142.56452270058114
END: th(3628800.0000000005)=-142.56452270058114; dx=-3.407205197572016E-6 evalInputDelta=20.01518513733484
Fitness changed from -122.5493375632463 to -142.56452270058114
Iteration 3 complete. Error: -142.56452270058114 Total: 9.9228; Orientation: 0.1356; Line Search: 6.0880
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/d7c2dd8e-7750-4383-bc11-be32562f9c7a.jpg)
Adding measurement fca019c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.627e+03, gradient 2.247e-03, dot -0.536; [130d39e1-bc08-469f-8c96-561d0fba96bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -142.56452270058114, -122.5493375632463, -104.82667087094954, -104.8266390669293
LBFGS Accumulation History: 3 points
Removed measurement fca019c to history. Total: 3
th(0)=-142.56452270058114;dx=-5.047276562035737E-6
New Minimum: -142.56452270058114 > -160.93654864409177
END: th(7818012.603187701)=-160.93654864409177; dx=-7.439640440024335E-7 evalInputDelta=18.372025943510636
Fitness changed from -142.56452270058114 to -160.93654864409177
Iteration 4 complete. Error: -160.93654864409177 Total: 11.4720; Orientation: 1.8980; Line Search: 6.1560
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/b303462c-2233-40d6-8122-97dee97b2777.jpg)
Adding measurement 8f9b1fd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.809e+03, gradient 2.465e-03, dot -0.283; [130d39e1-bc08-469f-8c96-561d0fba96bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -160.93654864409177, -122.5493375632463, -104.82667087094954, -104.8266390669293
LBFGS Accumulation History: 3 points
Removed measurement 8f9b1fd to history. Total: 3
th(0)=-160.93654864409177;dx=-6.070492308486337E-6
Armijo: th(1.6843397559414055E7)=-155.3533068846031; dx=1.7379301441080683E-6 evalInputDelta=-5.583241759488686
New Minimum: -160.93654864409177 > -171.9611319597357
WOLF (strong): th(8421698.779707028)=-171.9611319597357; dx=1.2461215126408176E-6 evalInputDelta=11.024583315643923
New Minimum: -171.9611319597357 > -172.92640552426684
END: th(2807232.926569009)=-172.92640552426684; dx=-2.234113027630978E-6 evalInputDelta=11.989856880175068
Fitness changed from -160.93654864409177 to -172.92640552426684
Iteration 5 complete. Error: -172.92640552426684 Total: 17.1565; Orientation: 1.8157; Line Search: 11.7244
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/8154cb90-c5dd-4669-8089-beb1daddd7e7.jpg)
Adding measurement 1d993c59 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.823e+04, gradient 1.753e-03, dot -0.547; [130d39e1-bc08-469f-8c96-561d0fba96bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -172.92640552426684, -122.5493375632463, -104.82667087094954, -104.8266390669293
LBFGS Accumulation History: 3 points
Removed measurement 1d993c59 to history. Total: 3
th(0)=-172.92640552426684;dx=-3.061632044455454E-6
New Minimum: -172.92640552426684 > -184.03256264195795
END: th(6048000.000000001)=-184.03256264195795; dx=-9.579080169539743E-7 evalInputDelta=11.106157117691112
Fitness changed from -172.92640552426684 to -184.03256264195795
Iteration 6 complete. Error: -184.03256264195795 Total: 11.2810; Orientation: 1.8846; Line Search: 5.9830
Adding measurement 1d39fdb7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.225e+04, gradient 1.910e-03, dot -0.456; [130d39e1-bc08-469f-8c96-561d0fba96bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -184.03256264195795, -122.5493375632463, -104.82667087094954, -104.8266390669293
LBFGS Accumulation History: 3 points
Removed measurement 1d39fdb7 to history. Total: 3
th(0)=-184.03256264195795;dx=-3.6349441805108975E-6
New Minimum: -184.03256264195795 > -186.56320185981727
WOLF (strong): th(1.3030021005312836E7)=-186.56320185981727; dx=9.093491169453411E-7 evalInputDelta=2.530639217859317
New Minimum: -186.56320185981727 > -192.04043483412224
WOLF (strong): th(6515010.502656418)=-192.04043483412224; dx=1.9704649640993997E-7 evalInputDelta=8.007872192164285
END: th(2171670.167552139)=-189.99325777227955; dx=-1.744702861167551E-6 evalInputDelta=5.9606951303215965
Fitness changed from -184.03256264195795 to -192.04043483412224
Iteration 7 complete. Error: -192.04043483412224 Total: 16.4464; Orientation: 1.7920; Line Search: 11.9508
Adding measurement 223f4e60 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.368e+04, gradient 2.134e-03, dot -0.355; [130d39e1-bc08-469f-8c96-561d0fba96bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -192.04043483412224, -122.5493375632463, -104.82667087094954, -104.8266390669293
LBFGS Accumulation History: 3 points
Removed measurement 223f4e60 to history. Total: 3
th(0)=-192.04043483412224;dx=-4.546543408366654E-6
New Minimum: -192.04043483412224 > -202.35987827234996
WOLF (strong): th(4678721.544281682)=-202.35987827234996; dx=2.8737601068862532E-8 evalInputDelta=10.319443438227722
END: th(2339360.772140841)=-200.1980714966444; dx=-2.1263538203507786E-6 evalInputDelta=8.157636662522151
Fitness changed from -192.04043483412224 to -202.35987827234996
Iteration 8 complete. Error: -202.35987827234996 Total: 13.8725; Orientation: 1.8415; Line Search: 9.3602
Adding measurement 65fd4773 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.078e+04, gradient 1.734e-03, dot -0.466; [130d39e1-bc08-469f-8c96-561d0fba96bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -202.35987827234996, -122.5493375632463, -104.82667087094954, -104.8266390669293
LBFGS Accumulation History: 3 points
Removed measurement 65fd4773 to history. Total: 3
th(0)=-202.35987827234996;dx=-3.008081018887785E-6
New Minimum: -202.35987827234996 > -209.49487665508937
END: th(5040000.000000001)=-209.49487665508937; dx=-1.326194950938775E-7 evalInputDelta=7.134998382739411
Fitness changed from -202.35987827234996 to -209.49487665508937
Iteration 9 complete. Error: -209.49487665508937 Total: 11.9623; Orientation: 1.9129; Line Search: 6.8151
Adding measurement 6818c1cb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.434e+04, gradient 1.706e-03, dot -0.460; [130d39e1-bc08-469f-8c96-561d0fba96bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -209.49487665508937, -122.5493375632463, -104.82667087094954, -104.8266390669293
LBFGS Accumulation History: 3 points
Removed measurement 6818c1cb to history. Total: 3
th(0)=-209.49487665508937;dx=-2.900193109486563E-6
New Minimum: -209.49487665508937 > -211.07685913418865
WOLF (strong): th(1.0858350837760696E7)=-211.07685913418865; dx=1.0163474333768584E-6 evalInputDelta=1.5819824790992811
New Minimum: -211.07685913418865 > -215.84062148559013
WOLF (strong): th(5429175.418880348)=-215.84062148559013; dx=1.552192498652419E-7 evalInputDelta=6.345744830500763
END: th(1809725.1396267826)=-213.74524971066222; dx=-1.6741592629728286E-6 evalInputDelta=4.250373055572851
Fitness changed from -209.49487665508937 to -215.84062148559013
Iteration 10 complete. Error: -215.84062148559013 Total: 16.3888; Orientation: 1.7918; Line Search: 11.7393
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/73286504-9ce0-413b-bcf0-4cc8c0144c25.jpg)
Final threshold in iteration 11: -215.84062148559013 (> -Infinity) after 156.931s (< 5400.000s)
Returns
-215.84062148559013