BasicOptimizer.scala:89 executed in 45.60 seconds (0.800 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: 220628175124200
Reset training subject: 220628993395600
Adding measurement 2f7f2f0c to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-63.7213416707477;dx=-0.024883158302436453
New Minimum: -63.7213416707477 > -63.755991899466444
WOLFE (weak): th(2.154434690031884)=-63.755991899466444; dx=-0.024892285709984835 evalInputDelta=0.034650228718746234
New Minimum: -63.755991899466444 > -63.79068995332072
WOLFE (weak): th(4.308869380063768)=-63.79068995332072; dx=-0.024921630974262848 evalInputDelta=0.06934828257302428
New Minimum: -63.79068995332072 > -63.9297741482857
WOLFE (weak): th(12.926608140191302)=-63.9297741482857; dx=-0.024947004954439043 evalInputDelta=0.20843247753800398
New Minimum: -63.9297741482857 > -64.56151288138584
WOLFE (weak): th(51.70643256076521)=-64.56151288138584; dx=-0.025174139652844596 evalInputDelta=0.8401712106381396
New Minimum: -64.56151288138584 > -68.08264671304391
WOLFE (weak): th(258.53216280382605)=-68.08264671304391; dx=-0.026045167024347393 evalInputDelta=4.361305042296216
New Minimum: -68.08264671304391 > -94.07037779590947
WOLFE (weak): th(1551.1929768229563)=-94.07037779590947; dx=-0.02632202590344928 evalInputDelta=30.349036125161767
New Minimum: -94.07037779590947 > -222.3356896614123
END: th(10858.350837760694)=-222.3356896614123; dx=-0.007639301874708814 evalInputDelta=158.61434799066458
Fitness changed from -63.7213416707477 to -222.3356896614123
Iteration 1 complete. Error: -222.3356896614123 Total: 7.0261; Orientation: 0.0162; Line Search: 5.0618
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/6caafe2f-adaf-4fbb-af5e-758902c4874a.jpg)
Adding measurement 66151c82 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-222.3356896614123;dx=-0.05091155511577311
New Minimum: -222.3356896614123 > -335.23946058101006
END: th(23393.607721408407)=-335.23946058101006; dx=-0.0020815516032443126 evalInputDelta=112.90377091959778
Fitness changed from -222.3356896614123 to -335.23946058101006
Iteration 2 complete. Error: -335.23946058101006 Total: 1.8930; Orientation: 0.0163; Line Search: 1.2752
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/49af1b1f-3149-4dd4-b21a-984bb3a667bf.jpg)
Adding measurement dfb78c4 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-335.23946058101006;dx=-0.04057621453428831
New Minimum: -335.23946058101006 > -347.1603499250431
END: th(50400.00000000001)=-347.1603499250431; dx=-6.075387558479973E-4 evalInputDelta=11.920889344033014
Fitness changed from -335.23946058101006 to -347.1603499250431
Iteration 3 complete. Error: -347.1603499250431 Total: 1.9793; Orientation: 0.0204; Line Search: 1.3202
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/34c14d5b-d568-42e4-adf9-d29cc4df61b6.jpg)
Adding measurement 77963046 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.521e+03, gradient 1.856e-01, dot -0.250; [57519b95-7273-451e-a9e7-10a01dff8381 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -347.1603499250431, -335.23946058101006, -222.3356896614123, -63.7213416707477
LBFGS Accumulation History: 3 points
Removed measurement 77963046 to history. Total: 3
th(0)=-347.1603499250431;dx=-0.0343788005512741
Armijo: th(108583.50837760697)=-321.21824646093285; dx=-3.999385628410151E-4 evalInputDelta=-25.942103464110232
New Minimum: -347.1603499250431 > -526.0194250293315
END: th(54291.75418880348)=-526.0194250293315; dx=-0.0028553652614747072 evalInputDelta=178.85907510428842
Fitness changed from -347.1603499250431 to -526.0194250293315
Iteration 4 complete. Error: -526.0194250293315 Total: 3.1346; Orientation: 0.3089; Line Search: 2.1910
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/7bac5dc4-efa4-4dfa-80df-1afb8b4f1171.jpg)
Adding measurement 31dcc572 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.685e+03, gradient 1.803e-01, dot -0.181; [57519b95-7273-451e-a9e7-10a01dff8381 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -526.0194250293315, -335.23946058101006, -222.3356896614123, -63.7213416707477
LBFGS Accumulation History: 3 points
Removed measurement 31dcc572 to history. Total: 3
th(0)=-526.0194250293315;dx=-0.032471824090676185
Armijo: th(116968.03860704206)=-385.53337668952963; dx=-1.5648190732461782E-4 evalInputDelta=-140.48604833980187
New Minimum: -526.0194250293315 > -693.5596225426134
END: th(58484.01930352103)=-693.5596225426134; dx=-0.002836477543648694 evalInputDelta=167.5401975132819
Fitness changed from -526.0194250293315 to -693.5596225426134
Iteration 5 complete. Error: -693.5596225426134 Total: 2.8149; Orientation: 0.3342; Line Search: 1.8813
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/a248f968-e101-4801-a4ad-ba6039f46c35.jpg)
Adding measurement 765db4fe to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.535e+03, gradient 1.760e-01, dot -0.166; [57519b95-7273-451e-a9e7-10a01dff8381 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -693.5596225426134, -335.23946058101006, -222.3356896614123, -63.7213416707477
LBFGS Accumulation History: 3 points
Removed measurement 765db4fe to history. Total: 3
th(0)=-693.5596225426134;dx=-0.030910504706344828
Armijo: th(126000.00000000004)=-459.76536829867416; dx=2.457285193428069E-4 evalInputDelta=-233.79425424393924
New Minimum: -693.5596225426134 > -851.5412831562703
END: th(63000.00000000002)=-851.5412831562703; dx=-0.002882064388726397 evalInputDelta=157.9816606136569
Fitness changed from -693.5596225426134 to -851.5412831562703
Iteration 6 complete. Error: -851.5412831562703 Total: 2.8517; Orientation: 0.3053; Line Search: 1.9241
Adding measurement 42a18a63 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.157e+04, gradient 1.769e-01, dot -0.151; [57519b95-7273-451e-a9e7-10a01dff8381 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -851.5412831562703, -335.23946058101006, -222.3356896614123, -63.7213416707477
LBFGS Accumulation History: 3 points
Removed measurement 42a18a63 to history. Total: 3
th(0)=-851.5412831562703;dx=-0.031185311142137594
Armijo: th(135729.38547200873)=-536.3780387945878; dx=5.084508673180619E-4 evalInputDelta=-315.1632443616825
New Minimum: -851.5412831562703 > -986.8902509958723
END: th(67864.69273600436)=-986.8902509958723; dx=-0.0025531528389053215 evalInputDelta=135.34896783960198
Fitness changed from -851.5412831562703 to -986.8902509958723
Iteration 7 complete. Error: -986.8902509958723 Total: 2.7618; Orientation: 0.3022; Line Search: 1.9012
Adding measurement 5712671c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.810e+04, gradient 1.745e-01, dot -0.146; [57519b95-7273-451e-a9e7-10a01dff8381 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -986.8902509958723, -335.23946058101006, -222.3356896614123, -63.7213416707477
LBFGS Accumulation History: 3 points
Removed measurement 5712671c to history. Total: 3
th(0)=-986.8902509958723;dx=-0.030391983183799744
Armijo: th(146210.0482588026)=-621.0966757022135; dx=5.118211308097565E-4 evalInputDelta=-365.7935752936588
New Minimum: -986.8902509958723 > -1091.5482420386727
END: th(73105.0241294013)=-1091.5482420386727; dx=-0.0024238293465970277 evalInputDelta=104.6579910428004
Fitness changed from -986.8902509958723 to -1091.5482420386727
Iteration 8 complete. Error: -1091.5482420386727 Total: 3.0149; Orientation: 0.3146; Line Search: 2.1501
Adding measurement 5e0fa40f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.822e+04, gradient 1.774e-01, dot -0.138; [57519b95-7273-451e-a9e7-10a01dff8381 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1091.5482420386727, -335.23946058101006, -222.3356896614123, -63.7213416707477
LBFGS Accumulation History: 3 points
Removed measurement 5e0fa40f to history. Total: 3
th(0)=-1091.5482420386727;dx=-0.03142315519827528
Armijo: th(157500.00000000006)=-655.3311057347613; dx=8.017683515640989E-4 evalInputDelta=-436.2171363039114
New Minimum: -1091.5482420386727 > -1210.3450834033706
END: th(78750.00000000003)=-1210.3450834033706; dx=-0.002065537958112036 evalInputDelta=118.79684136469791
Fitness changed from -1091.5482420386727 to -1210.3450834033706
Iteration 9 complete. Error: -1210.3450834033706 Total: 2.6834; Orientation: 0.2904; Line Search: 1.8308
Adding measurement 4c36682b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.424e+04, gradient 1.778e-01, dot -0.140; [57519b95-7273-451e-a9e7-10a01dff8381 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1210.3450834033706, -335.23946058101006, -222.3356896614123, -63.7213416707477
LBFGS Accumulation History: 3 points
Removed measurement 4c36682b to history. Total: 3
th(0)=-1210.3450834033706;dx=-0.03155801646433886
Armijo: th(169661.7318400109)=-668.7844468531703; dx=8.379427547347488E-4 evalInputDelta=-541.5606365502003
New Minimum: -1210.3450834033706 > -1276.5868286922523
END: th(84830.86592000545)=-1276.5868286922523; dx=-0.001694961949742141 evalInputDelta=66.2417452888817
Fitness changed from -1210.3450834033706 to -1276.5868286922523
Iteration 10 complete. Error: -1276.5868286922523 Total: 2.8455; Orientation: 0.3126; Line Search: 1.9579
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/40807e28-c950-43a9-8f0d-26f13bad27da.jpg)
Adding measurement 51607505 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.192e+04, gradient 1.793e-01, dot -0.134; [57519b95-7273-451e-a9e7-10a01dff8381 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1276.5868286922523, -335.23946058101006, -222.3356896614123, -63.7213416707477
LBFGS Accumulation History: 3 points
Removed measurement 51607505 to history. Total: 3
th(0)=-1276.5868286922523;dx=-0.0319799805152903
Armijo: th(182762.56032350325)=-645.795353183371; dx=0.001011338109761085 evalInputDelta=-630.7914755088813
New Minimum: -1276.5868286922523 > -1340.8555146459994
END: th(91381.28016175162)=-1340.8555146459994; dx=-9.894979404565893E-4 evalInputDelta=64.26868595374708
Fitness changed from -1276.5868286922523 to -1340.8555146459994
Iteration 11 complete. Error: -1340.8555146459994 Total: 2.8566; Orientation: 0.3148; Line Search: 1.9188
Adding measurement 90962ee to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.662e+05, gradient 1.765e-01, dot -0.129; [57519b95-7273-451e-a9e7-10a01dff8381 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1340.8555146459994, -335.23946058101006, -222.3356896614123, -63.7213416707477
LBFGS Accumulation History: 3 points
Removed measurement 90962ee to history. Total: 3
th(0)=-1340.8555146459994;dx=-0.03112820611083069
Armijo: th(196875.0000000001)=-651.157700144469; dx=0.0013289092847161771 evalInputDelta=-689.6978145015304
New Minimum: -1340.8555146459994 > -1388.487249166844
END: th(98437.50000000004)=-1388.487249166844; dx=-8.339700983088833E-4 evalInputDelta=47.6317345208447
Fitness changed from -1340.8555146459994 to -1388.487249166844
Iteration 12 complete. Error: -1388.487249166844 Total: 3.1342; Orientation: 0.2972; Line Search: 2.2514
Adding measurement 16e7c806 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.000e+05, gradient 1.809e-01, dot -0.124; [57519b95-7273-451e-a9e7-10a01dff8381 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1388.487249166844, -335.23946058101006, -222.3356896614123, -63.7213416707477
LBFGS Accumulation History: 3 points
Removed measurement 16e7c806 to history. Total: 3
th(0)=-1388.487249166844;dx=-0.032696411139406405
Armijo: th(212077.16480001365)=-612.6757611129087; dx=0.0012806635388593435 evalInputDelta=-775.8114880539354
New Minimum: -1388.487249166844 > -1391.6857222348622
END: th(106038.58240000682)=-1391.6857222348622; dx=-6.374401534015127E-4 evalInputDelta=3.1984730680180746
Fitness changed from -1388.487249166844 to -1391.6857222348622
Iteration 13 complete. Error: -1391.6857222348622 Total: 2.7735; Orientation: 0.2985; Line Search: 1.9074
Adding measurement 41304a33 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.236e+06, gradient 1.811e-01, dot -0.114; [57519b95-7273-451e-a9e7-10a01dff8381 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1391.6857222348622, -335.23946058101006, -222.3356896614123, -63.7213416707477
LBFGS Accumulation History: 3 points
Removed measurement 41304a33 to history. Total: 3
th(0)=-1391.6857222348622;dx=-0.03276557411495009
Armijo: th(228453.20040437908)=-648.0155936135575; dx=0.0011557261204367115 evalInputDelta=-743.6701286213047
New Minimum: -1391.6857222348622 > -1413.695741693642
END: th(114226.60020218954)=-1413.695741693642; dx=-2.3956270530486114E-4 evalInputDelta=22.01001945877988
Fitness changed from -1391.6857222348622 to -1413.695741693642
Iteration 14 complete. Error: -1413.695741693642 Total: 2.8575; Orientation: 0.2972; Line Search: 1.9601
Adding measurement 5e0792fb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.381e+08, gradient 1.782e-01, dot -0.110; [57519b95-7273-451e-a9e7-10a01dff8381 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1413.695741693642, -335.23946058101006, -222.3356896614123, -63.7213416707477
LBFGS Accumulation History: 3 points
Removed measurement 5e0792fb to history. Total: 3
th(0)=-1413.695741693642;dx=-0.03170380877155056
Armijo: th(246093.75000000015)=-637.8643885948445; dx=0.0012787592975942587 evalInputDelta=-775.8313530987975
New Minimum: -1413.695741693642 > -1443.1131462949604
END: th(123046.87500000007)=-1443.1131462949604; dx=-2.1725853455400792E-4 evalInputDelta=29.417404601318367
Fitness changed from -1413.695741693642 to -1443.1131462949604
Iteration 15 complete. Error: -1443.1131462949604 Total: 2.9532; Orientation: 0.3214; Line Search: 1.9843
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/90172afb-3b04-4652-be8d-2dd58757a04c.jpg)
Final threshold in iteration 16: -1443.1131462949604 (> -Infinity) after 45.603s (< 5400.000s)
Returns
-1443.1131462949604