BasicOptimizer.scala:89 executed in 123.68 seconds (1.809 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: 327072911443500
Reset training subject: 327075588762100
Adding measurement 50893336 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-86.29711236304483;dx=-2.0772482454925586E-5
New Minimum: -86.29711236304483 > -86.29715986279234
WOLFE (weak): th(2.154434690031884)=-86.29715986279234; dx=-1.9285111761240872E-5 evalInputDelta=4.749974750950514E-5
New Minimum: -86.29715986279234 > -86.29720456841316
WOLFE (weak): th(4.308869380063768)=-86.29720456841316; dx=-1.9290149677235443E-5 evalInputDelta=9.2205368332543E-5
New Minimum: -86.29720456841316 > -86.29739177294881
WOLFE (weak): th(12.926608140191302)=-86.29739177294881; dx=-1.92871455237182E-5 evalInputDelta=2.7940990398178656E-4
New Minimum: -86.29739177294881 > -86.29822999723282
WOLFE (weak): th(51.70643256076521)=-86.29822999723282; dx=-1.9287713607075056E-5 evalInputDelta=0.0011176341879917118
New Minimum: -86.29822999723282 > -86.30270318317191
WOLFE (weak): th(258.53216280382605)=-86.30270318317191; dx=-1.9283613688228298E-5 evalInputDelta=0.005590820127082452
New Minimum: -86.30270318317191 > -86.33064347378449
WOLFE (weak): th(1551.1929768229563)=-86.33064347378449; dx=-1.927588893350395E-5 evalInputDelta=0.0335311107396592
New Minimum: -86.33064347378449 > -86.53110864513201
WOLFE (weak): th(10858.350837760694)=-86.53110864513201; dx=-1.913200924876847E-5 evalInputDelta=0.23399628208717616
New Minimum: -86.53110864513201 > -88.1115534895998
END: th(86866.80670208555)=-88.1115534895998; dx=-1.8079077082856483E-5 evalInputDelta=1.8144411265549678
Fitness changed from -86.29711236304483 to -88.1115534895998
Iteration 1 complete. Error: -88.1115534895998 Total: 31.6646; Orientation: 0.0666; Line Search: 23.6533
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/d4744528-fa1f-443b-b2a1-8aaa1d101533.jpg)
Adding measurement 7f90e015 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-88.1115534895998;dx=-1.7581235022858305E-5
New Minimum: -88.1115534895998 > -91.60567544550513
END: th(187148.86177126726)=-91.60567544550513; dx=-1.5802819140404624E-5 evalInputDelta=3.494121955905328
Fitness changed from -88.1115534895998 to -91.60567544550513
Iteration 2 complete. Error: -91.60567544550513 Total: 8.3638; Orientation: 0.0637; Line Search: 5.1949
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/e4dd1db6-ca78-4951-aa42-dc42c8324672.jpg)
Adding measurement 64ae6c79 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-91.60567544550513;dx=-1.509112119393848E-5
New Minimum: -91.60567544550513 > -97.76563519500225
END: th(403200.00000000006)=-97.76563519500225; dx=-1.231390282418962E-5 evalInputDelta=6.159959749497119
Fitness changed from -91.60567544550513 to -97.76563519500225
Iteration 3 complete. Error: -97.76563519500225 Total: 8.1762; Orientation: 0.0643; Line Search: 5.2072
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/3404488a-a26e-4c1a-9274-374162eff88e.jpg)
Adding measurement 7d010ee6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.128e+04, gradient 3.406e-03, dot -0.933; [fdecb6f4-c401-4d72-ac27-a526ea12d9d2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -97.76563519500225, -91.60567544550513, -88.1115534895998, -86.29711236304483
LBFGS Accumulation History: 3 points
Removed measurement 7d010ee6 to history. Total: 3
th(0)=-97.76563519500225;dx=-1.1592854240661335E-5
New Minimum: -97.76563519500225 > -107.42474043952078
END: th(868668.0670208557)=-107.42474043952078; dx=-8.45372481978081E-6 evalInputDelta=9.659105244518528
Fitness changed from -97.76563519500225 to -107.42474043952078
Iteration 4 complete. Error: -107.42474043952078 Total: 9.5574; Orientation: 1.1305; Line Search: 5.3871
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/4964d32f-6252-4814-b61d-d48f8629cafb.jpg)
Adding measurement 3821b16a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.054e+04, gradient 2.922e-03, dot -0.823; [fdecb6f4-c401-4d72-ac27-a526ea12d9d2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -107.42474043952078, -91.60567544550513, -88.1115534895998, -86.29711236304483
LBFGS Accumulation History: 3 points
Removed measurement 3821b16a to history. Total: 3
th(0)=-107.42474043952078;dx=-8.535579524511865E-6
New Minimum: -107.42474043952078 > -121.56162328857017
END: th(1871488.617712673)=-121.56162328857017; dx=-5.279196788505577E-6 evalInputDelta=14.1368828490494
Fitness changed from -107.42474043952078 to -121.56162328857017
Iteration 5 complete. Error: -121.56162328857017 Total: 9.3627; Orientation: 1.1255; Line Search: 5.3105
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/75d657f1-2b1d-42c1-a76c-7688f367ab31.jpg)
Adding measurement 3afae00f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.233e+04, gradient 2.627e-03, dot -0.689; [fdecb6f4-c401-4d72-ac27-a526ea12d9d2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -121.56162328857017, -91.60567544550513, -88.1115534895998, -86.29711236304483
LBFGS Accumulation History: 3 points
Removed measurement 3afae00f to history. Total: 3
th(0)=-121.56162328857017;dx=-6.889904790579012E-6
New Minimum: -121.56162328857017 > -139.09937858296797
END: th(4032000.0000000014)=-139.09937858296797; dx=-2.1225112065807366E-6 evalInputDelta=17.537755294397797
Fitness changed from -121.56162328857017 to -139.09937858296797
Iteration 6 complete. Error: -139.09937858296797 Total: 9.4739; Orientation: 1.1260; Line Search: 5.2991
Adding measurement 2cc94960 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.339e+04, gradient 3.140e-03, dot -0.405; [fdecb6f4-c401-4d72-ac27-a526ea12d9d2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -139.09937858296797, -91.60567544550513, -88.1115534895998, -86.29711236304483
LBFGS Accumulation History: 3 points
Removed measurement 2cc94960 to history. Total: 3
th(0)=-139.09937858296797;dx=-9.854071843228704E-6
Armijo: th(8686680.670208558)=-133.0827195917663; dx=2.924779096259228E-6 evalInputDelta=-6.016658991201666
New Minimum: -139.09937858296797 > -146.96447353113962
WOLF (strong): th(4343340.335104279)=-146.96447353113962; dx=2.2339731323310294E-6 evalInputDelta=7.865094948171645
New Minimum: -146.96447353113962 > -148.9865662806526
END: th(1447780.1117014263)=-148.9865662806526; dx=-2.7460450398649376E-6 evalInputDelta=9.887187697684624
Fitness changed from -139.09937858296797 to -148.9865662806526
Iteration 7 complete. Error: -148.9865662806526 Total: 14.3104; Orientation: 1.2742; Line Search: 10.5260
Adding measurement 42ed51fb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.064e+04, gradient 2.372e-03, dot -0.606; [fdecb6f4-c401-4d72-ac27-a526ea12d9d2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -148.9865662806526, -91.60567544550513, -88.1115534895998, -86.29711236304483
LBFGS Accumulation History: 3 points
Removed measurement 42ed51fb to history. Total: 3
th(0)=-148.9865662806526;dx=-5.622524057251194E-6
New Minimum: -148.9865662806526 > -159.04908917383057
END: th(3119147.6961877886)=-159.04908917383057; dx=-1.0623799598851065E-6 evalInputDelta=10.06252289317797
Fitness changed from -148.9865662806526 to -159.04908917383057
Iteration 8 complete. Error: -159.04908917383057 Total: 9.0174; Orientation: 1.1165; Line Search: 5.4335
Adding measurement 2dc8d764 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.192e+04, gradient 2.930e-03, dot -0.432; [fdecb6f4-c401-4d72-ac27-a526ea12d9d2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -159.04908917383057, -91.60567544550513, -88.1115534895998, -86.29711236304483
LBFGS Accumulation History: 3 points
Removed measurement 2dc8d764 to history. Total: 3
th(0)=-159.04908917383057;dx=-8.581251890532519E-6
Armijo: th(6720000.000000003)=-154.04790066106204; dx=2.980148911518595E-6 evalInputDelta=-5.001188512768522
New Minimum: -159.04908917383057 > -164.98903748089586
WOLF (strong): th(3360000.0000000014)=-164.98903748089586; dx=2.239065998542855E-6 evalInputDelta=5.939948307065293
New Minimum: -164.98903748089586 > -166.18056852715182
END: th(1120000.0000000005)=-166.18056852715182; dx=-2.9637650804961757E-6 evalInputDelta=7.131479353321254
Fitness changed from -159.04908917383057 to -166.18056852715182
Iteration 9 complete. Error: -166.18056852715182 Total: 13.9868; Orientation: 1.2186; Line Search: 10.2576
Adding measurement 51ddc6f8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.894e+04, gradient 2.004e-03, dot -0.686; [fdecb6f4-c401-4d72-ac27-a526ea12d9d2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -166.18056852715182, -91.60567544550513, -88.1115534895998, -86.29711236304483
LBFGS Accumulation History: 3 points
Removed measurement 51ddc6f8 to history. Total: 3
th(0)=-166.18056852715182;dx=-4.014056968990764E-6
New Minimum: -166.18056852715182 > -174.07892339438698
END: th(2412966.852835711)=-174.07892339438698; dx=-2.217572591019664E-6 evalInputDelta=7.898354867235156
Fitness changed from -166.18056852715182 to -174.07892339438698
Iteration 10 complete. Error: -174.07892339438698 Total: 9.3327; Orientation: 1.1121; Line Search: 5.7379
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/b12f196b-a1ca-430a-a39d-7c61bd7b56d5.jpg)
Final threshold in iteration 11: -174.07892339438698 (> -Infinity) after 123.678s (< 5400.000s)
Returns
-174.07892339438698