BasicOptimizer.scala:89 executed in 1895.57 seconds (237.745 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: 680678379250000
Reset training subject: 680706653135300
Adding measurement 7fbdc6b9 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-202.07044525053632;dx=-0.0018633007334552766
New Minimum: -202.07044525053632 > -202.07659245630109
WOLFE (weak): th(2.154434690031884)=-202.07659245630109; dx=-0.0018642483635673787 evalInputDelta=0.00614720576476202
New Minimum: -202.07659245630109 > -202.08274914004906
WOLFE (weak): th(4.308869380063768)=-202.08274914004906; dx=-0.001863392402235309 evalInputDelta=0.012303889512736532
New Minimum: -202.08274914004906 > -202.10733534436596
WOLFE (weak): th(12.926608140191302)=-202.10733534436596; dx=-0.001865855959575067 evalInputDelta=0.03689009382964059
New Minimum: -202.10733534436596 > -202.21798456430625
WOLFE (weak): th(51.70643256076521)=-202.21798456430625; dx=-0.0018620758459165164 evalInputDelta=0.14753931376992568
New Minimum: -202.21798456430625 > -202.8081374723411
WOLFE (weak): th(258.53216280382605)=-202.8081374723411; dx=-0.001866301000836922 evalInputDelta=0.7376922218047639
New Minimum: -202.8081374723411 > -206.49685984295257
WOLFE (weak): th(1551.1929768229563)=-206.49685984295257; dx=-0.0018661908579658522 evalInputDelta=4.426414592416251
New Minimum: -206.49685984295257 > -232.9000003354444
WOLFE (weak): th(10858.350837760694)=-232.9000003354444; dx=-0.0018419706046524514 evalInputDelta=30.829555084908066
New Minimum: -232.9000003354444 > -401.727850198365
END: th(86866.80670208555)=-401.727850198365; dx=-9.97107064196015E-4 evalInputDelta=199.65740494782867
Fitness changed from -202.07044525053632 to -401.727850198365
Iteration 1 complete. Error: -401.727850198365 Total: 338.2547; Orientation: 0.1063; Line Search: 252.5222
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/cdc6cf45-f4da-4254-8b1b-442ce4c9afe9.jpg)
Adding measurement 3acb434f to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-401.727850198365;dx=-0.0016427729519127975
New Minimum: -401.727850198365 > -703.7106782975515
END: th(187148.86177126726)=-703.7106782975515; dx=-5.360029155849449E-4 evalInputDelta=301.98282809918646
Fitness changed from -401.727850198365 to -703.7106782975515
Iteration 2 complete. Error: -703.7106782975515 Total: 87.5234; Orientation: 0.1072; Line Search: 57.1236
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/539c5fd5-8b78-454e-a3e4-8f1de62692c4.jpg)
Adding measurement 56419443 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-703.7106782975515;dx=-0.001786827506770372
New Minimum: -703.7106782975515 > -1022.6305540125427
END: th(403200.00000000006)=-1022.6305540125427; dx=-4.341774193023556E-5 evalInputDelta=318.91987571499124
Fitness changed from -703.7106782975515 to -1022.6305540125427
Iteration 3 complete. Error: -1022.6305540125427 Total: 85.9170; Orientation: 0.0932; Line Search: 53.9597
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/ddcf2061-11da-4a29-b282-a457af8613e0.jpg)
Adding measurement 179d6d31 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.111e+04, gradient 4.845e-02, dot -0.312; [88f13762-e146-43bb-b62c-c6a4d06f0cbf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1022.6305540125427, -703.7106782975515, -401.727850198365, -202.07044525053632
LBFGS Accumulation History: 3 points
Removed measurement 179d6d31 to history. Total: 3
th(0)=-1022.6305540125427;dx=-0.002346861056714996
New Minimum: -1022.6305540125427 > -1137.6837214270054
WOLF (strong): th(868668.0670208557)=-1137.6837214270054; dx=2.3243844214081703E-4 evalInputDelta=115.05316741446268
New Minimum: -1137.6837214270054 > -1316.756621399718
WOLF (strong): th(434334.03351042786)=-1316.756621399718; dx=2.500339472812738E-4 evalInputDelta=294.1260673871752
END: th(144778.01117014262)=-1306.9559097383508; dx=-5.181262031603365E-4 evalInputDelta=284.3253557258081
Fitness changed from -1022.6305540125427 to -1316.756621399718
Iteration 4 complete. Error: -1316.756621399718 Total: 135.7992; Orientation: 1.7472; Line Search: 105.9890
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/d0327c04-3411-40b5-80b6-d319f671c49e.jpg)
Adding measurement 14517abb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.973e+04, gradient 4.675e-02, dot -0.240; [88f13762-e146-43bb-b62c-c6a4d06f0cbf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1316.756621399718, -703.7106782975515, -401.727850198365, -202.07044525053632
LBFGS Accumulation History: 3 points
Removed measurement 14517abb to history. Total: 3
th(0)=-1316.756621399718;dx=-0.0021843204694034007
New Minimum: -1316.756621399718 > -1733.4687046497263
WOLF (strong): th(311914.76961877884)=-1733.4687046497263; dx=4.278524120629378E-5 evalInputDelta=416.7120832500084
END: th(155957.38480938942)=-1665.1621542660644; dx=-7.005465732887885E-4 evalInputDelta=348.40553286634645
Fitness changed from -1316.756621399718 to -1733.4687046497263
Iteration 5 complete. Error: -1733.4687046497263 Total: 116.7216; Orientation: 1.7846; Line Search: 84.7999
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/2af20065-c3b9-4aed-8608-c94d2a9ad467.jpg)
Adding measurement 6ffc9d5f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.186e+04, gradient 4.145e-02, dot -0.250; [88f13762-e146-43bb-b62c-c6a4d06f0cbf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1733.4687046497263, -703.7106782975515, -401.727850198365, -202.07044525053632
LBFGS Accumulation History: 3 points
Removed measurement 6ffc9d5f to history. Total: 3
th(0)=-1733.4687046497263;dx=-0.0017146808844823067
New Minimum: -1733.4687046497263 > -2014.1597503673834
WOLF (strong): th(336000.0000000001)=-2014.1597503673834; dx=2.5230777936562337E-4 evalInputDelta=280.69104571765706
END: th(168000.00000000006)=-2002.3472476071677; dx=-4.2089756104324327E-4 evalInputDelta=268.87854295744137
Fitness changed from -1733.4687046497263 to -2014.1597503673834
Iteration 6 complete. Error: -2014.1597503673834 Total: 110.1239; Orientation: 1.7370; Line Search: 79.4941
Adding measurement 724dc117 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.297e+04, gradient 4.444e-02, dot -0.256; [88f13762-e146-43bb-b62c-c6a4d06f0cbf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2014.1597503673834, -703.7106782975515, -401.727850198365, -202.07044525053632
LBFGS Accumulation History: 3 points
Removed measurement 724dc117 to history. Total: 3
th(0)=-2014.1597503673834;dx=-0.0019737672657771724
New Minimum: -2014.1597503673834 > -2235.291256190119
WOLF (strong): th(361945.0279253566)=-2235.291256190119; dx=5.144606883323252E-4 evalInputDelta=221.13150582273556
New Minimum: -2235.291256190119 > -2289.7890732554383
END: th(180972.5139626783)=-2289.7890732554383; dx=-1.9597028234900053E-4 evalInputDelta=275.62932288805496
Fitness changed from -2014.1597503673834 to -2289.7890732554383
Iteration 7 complete. Error: -2289.7890732554383 Total: 115.4281; Orientation: 1.7377; Line Search: 85.0069
Adding measurement 14d064d7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.068e+04, gradient 3.353e-02, dot -0.336; [88f13762-e146-43bb-b62c-c6a4d06f0cbf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2289.7890732554383, -703.7106782975515, -401.727850198365, -202.07044525053632
LBFGS Accumulation History: 3 points
Removed measurement 14d064d7 to history. Total: 3
th(0)=-2289.7890732554383;dx=-0.0011222612754491624
New Minimum: -2289.7890732554383 > -2468.3965443177885
WOLF (strong): th(389893.4620234736)=-2468.3965443177885; dx=1.9071030571734968E-4 evalInputDelta=178.6074710623502
New Minimum: -2468.3965443177885 > -2470.3512908086573
END: th(194946.7310117368)=-2470.3512908086573; dx=-1.9419308056412723E-4 evalInputDelta=180.56221755321894
Fitness changed from -2289.7890732554383 to -2470.3512908086573
Iteration 8 complete. Error: -2470.3512908086573 Total: 113.7250; Orientation: 1.7306; Line Search: 85.0453
Adding measurement 73e4f0f5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.009e+05, gradient 3.320e-02, dot -0.357; [88f13762-e146-43bb-b62c-c6a4d06f0cbf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2470.3512908086573, -703.7106782975515, -401.727850198365, -202.07044525053632
LBFGS Accumulation History: 3 points
Removed measurement 73e4f0f5 to history. Total: 3
th(0)=-2470.3512908086573;dx=-0.0011001472142044217
New Minimum: -2470.3512908086573 > -2604.2964500993353
WOLF (strong): th(420000.0000000002)=-2604.2964500993353; dx=1.592949479372905E-4 evalInputDelta=133.94515929067802
New Minimum: -2604.2964500993353 > -2619.7871096713184
END: th(210000.0000000001)=-2619.7871096713184; dx=-5.355300591173487E-5 evalInputDelta=149.4358188626611
Fitness changed from -2470.3512908086573 to -2619.7871096713184
Iteration 9 complete. Error: -2619.7871096713184 Total: 109.5037; Orientation: 1.7347; Line Search: 81.8529
Adding measurement 4794125a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.077e+05, gradient 3.504e-02, dot -0.331; [88f13762-e146-43bb-b62c-c6a4d06f0cbf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2619.7871096713184, -703.7106782975515, -401.727850198365, -202.07044525053632
LBFGS Accumulation History: 3 points
Removed measurement 4794125a to history. Total: 3
th(0)=-2619.7871096713184;dx=-0.001225843472005284
New Minimum: -2619.7871096713184 > -2667.9950337285113
WOLF (strong): th(452431.2849066958)=-2667.9950337285113; dx=3.6954167899478E-4 evalInputDelta=48.20792405719294
New Minimum: -2667.9950337285113 > -2760.865715676878
WOLF (strong): th(226215.6424533479)=-2760.865715676878; dx=1.5034326749086376E-4 evalInputDelta=141.07860600555978
END: th(75405.21415111596)=-2720.0909911251133; dx=-5.980631287132538E-4 evalInputDelta=100.30388145379493
Fitness changed from -2619.7871096713184 to -2760.865715676878
Iteration 10 complete. Error: -2760.865715676878 Total: 136.1567; Orientation: 1.7198; Line Search: 107.7006
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/84cba358-14e7-406f-b89d-7ef0c622c508.jpg)
Adding measurement 98d7b2b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.172e+05, gradient 3.801e-02, dot -0.306; [88f13762-e146-43bb-b62c-c6a4d06f0cbf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2760.865715676878, -703.7106782975515, -401.727850198365, -202.07044525053632
LBFGS Accumulation History: 3 points
Removed measurement 98d7b2b to history. Total: 3
th(0)=-2760.865715676878;dx=-0.0014436671160312636
New Minimum: -2760.865715676878 > -2918.7570984924387
END: th(162455.60917644732)=-2918.7570984924387; dx=-4.525648054621782E-6 evalInputDelta=157.89138281556052
Fitness changed from -2760.865715676878 to -2918.7570984924387
Iteration 11 complete. Error: -2918.7570984924387 Total: 87.8656; Orientation: 1.7366; Line Search: 57.2429
Adding measurement 51dee5e0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.279e+05, gradient 3.109e-02, dot -0.365; [88f13762-e146-43bb-b62c-c6a4d06f0cbf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2918.7570984924387, -703.7106782975515, -401.727850198365, -202.07044525053632
LBFGS Accumulation History: 3 points
Removed measurement 51dee5e0 to history. Total: 3
th(0)=-2918.7570984924387;dx=-9.653831623504972E-4
New Minimum: -2918.7570984924387 > -3022.1474153323493
WOLF (strong): th(350000.0000000002)=-3022.1474153323493; dx=2.5856138919393026E-4 evalInputDelta=103.39031683991061
New Minimum: -3022.1474153323493 > -3046.502913177665
END: th(175000.0000000001)=-3046.502913177665; dx=-1.0404959957406182E-4 evalInputDelta=127.74581468522638
Fitness changed from -2918.7570984924387 to -3046.502913177665
Iteration 12 complete. Error: -3046.502913177665 Total: 110.2849; Orientation: 1.7347; Line Search: 81.1226
Adding measurement 35108066 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.413e+05, gradient 3.074e-02, dot -0.373; [88f13762-e146-43bb-b62c-c6a4d06f0cbf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3046.502913177665, -703.7106782975515, -401.727850198365, -202.07044525053632
LBFGS Accumulation History: 3 points
Removed measurement 35108066 to history. Total: 3
th(0)=-3046.502913177665;dx=-9.425134374796335E-4
New Minimum: -3046.502913177665 > -3126.2931724328096
WOLF (strong): th(377026.07075557986)=-3126.2931724328096; dx=2.2147084895456087E-4 evalInputDelta=79.79025925514452
New Minimum: -3126.2931724328096 > -3159.2404150365005
WOLF (strong): th(188513.03537778993)=-3159.2404150365005; dx=1.57523397309609E-7 evalInputDelta=112.73750185883546
END: th(62837.67845926331)=-3113.422554039204; dx=-5.246895692618196E-4 evalInputDelta=66.91964086153894
Fitness changed from -3046.502913177665 to -3159.2404150365005
Iteration 13 complete. Error: -3159.2404150365005 Total: 144.1678; Orientation: 1.7658; Line Search: 113.2925
Adding measurement 6b0c1f5e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.448e+05, gradient 3.238e-02, dot -0.346; [88f13762-e146-43bb-b62c-c6a4d06f0cbf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3159.2404150365005, -703.7106782975515, -401.727850198365, -202.07044525053632
LBFGS Accumulation History: 3 points
Removed measurement 6b0c1f5e to history. Total: 3
th(0)=-3159.2404150365005;dx=-0.0010473448191464976
New Minimum: -3159.2404150365005 > -3268.339792616429
END: th(135379.67431370614)=-3268.339792616429; dx=-1.248661919709561E-4 evalInputDelta=109.09937757992839
Fitness changed from -3159.2404150365005 to -3268.339792616429
Iteration 14 complete. Error: -3268.339792616429 Total: 85.5462; Orientation: 1.7215; Line Search: 56.2769
Adding measurement 28374a4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.532e+05, gradient 2.724e-02, dot -0.408; [88f13762-e146-43bb-b62c-c6a4d06f0cbf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3268.339792616429, -703.7106782975515, -401.727850198365, -202.07044525053632
LBFGS Accumulation History: 3 points
Removed measurement 28374a4 to history. Total: 3
th(0)=-3268.339792616429;dx=-7.410489625904462E-4
New Minimum: -3268.339792616429 > -3376.1706118026677
WOLF (strong): th(291666.66666666686)=-3376.1706118026677; dx=6.587791219818033E-5 evalInputDelta=107.83081918623884
END: th(145833.33333333343)=-3363.1173039309824; dx=-1.8675126841634403E-4 evalInputDelta=94.77751131455352
Fitness changed from -3268.339792616429 to -3376.1706118026677
Iteration 15 complete. Error: -3376.1706118026677 Total: 117.6832; Orientation: 1.7203; Line Search: 87.1105
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/80e75e40-4d6f-4987-8889-c4ea8b873b17.jpg)
Final threshold in iteration 16: -3376.1706118026677 (> -Infinity) after 1895.568s (< 5400.000s)
Returns
-3376.1706118026677