BasicOptimizer.scala:89 executed in 152.53 seconds (1.975 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: 2610512148000
Reset training subject: 2611622705011
Adding measurement 5258ab09 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.35570159065034923;dx=-0.0010577181047225516
New Minimum: -0.35570159065034923 > -0.3576101178775908
WOLFE (weak): th(2.154434690031884)=-0.3576101178775908; dx=-0.0010616513987685083 evalInputDelta=0.001908527227241552
New Minimum: -0.3576101178775908 > -0.35952181031537045
WOLFE (weak): th(4.308869380063768)=-0.35952181031537045; dx=-0.0010700323534891846 evalInputDelta=0.0038202196650212183
New Minimum: -0.35952181031537045 > -0.3672485502526308
WOLFE (weak): th(12.926608140191302)=-0.3672485502526308; dx=-0.0010794253134314641 evalInputDelta=0.011546959602281581
New Minimum: -0.3672485502526308 > -0.4026216037247368
WOLFE (weak): th(51.70643256076521)=-0.4026216037247368; dx=-0.0011306238722817664 evalInputDelta=0.04692001307438759
New Minimum: -0.4026216037247368 > -0.627287119777491
WOLFE (weak): th(258.53216280382605)=-0.627287119777491; dx=-0.0013837004692622726 evalInputDelta=0.27158552912714173
New Minimum: -0.627287119777491 > -2.899811748685603
WOLFE (weak): th(1551.1929768229563)=-2.899811748685603; dx=-0.0016172626130865708 evalInputDelta=2.5441101580352536
New Minimum: -2.899811748685603 > -13.23322103919976
END: th(10858.350837760694)=-13.23322103919976; dx=-2.187890334173384E-4 evalInputDelta=12.87751944854941
Fitness changed from -0.35570159065034923 to -13.23322103919976
Iteration 1 complete. Error: -13.23322103919976 Total: 12.0655; Orientation: 0.0221; Line Search: 8.8091
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding measurement 59724202 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-13.23322103919976;dx=-0.01256307741531223
New Minimum: -13.23322103919976 > -27.23866425170189
WOLF (strong): th(23393.607721408407)=-27.23866425170189; dx=8.635252991987858E-5 evalInputDelta=14.005443212502131
New Minimum: -27.23866425170189 > -27.375149531599735
END: th(11696.803860704204)=-27.375149531599735; dx=-4.133062992412292E-4 evalInputDelta=14.141928492399975
Fitness changed from -13.23322103919976 to -27.375149531599735
Iteration 2 complete. Error: -27.375149531599735 Total: 4.4185; Orientation: 0.0183; Line Search: 3.3111
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>
Adding measurement 11cd340b to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-27.375149531599735;dx=-0.028352844008211107
New Minimum: -27.375149531599735 > -37.18815406141534
WOLF (strong): th(25200.000000000004)=-37.18815406141534; dx=5.737109323386018E-4 evalInputDelta=9.813004529815604
New Minimum: -37.18815406141534 > -56.48121695761568
WOLF (strong): th(12600.000000000002)=-56.48121695761568; dx=1.8928746230043007E-4 evalInputDelta=29.106067426015944
New Minimum: -56.48121695761568 > -60.36117703764293
END: th(4200.000000000001)=-60.36117703764293; dx=-0.0014422635914980854 evalInputDelta=32.9860275060432
Fitness changed from -27.375149531599735 to -60.36117703764293
Iteration 3 complete. Error: -60.36117703764293 Total: 5.7351; Orientation: 0.0191; Line Search: 4.6288
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>
Adding measurement 76cb6094 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.750e+03, gradient 1.750e-01, dot -0.079; [e3a8f353-e39d-4b93-8587-2920d930be18 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -60.36117703764293, -27.375149531599735, -13.23322103919976, -0.35570159065034923
LBFGS Accumulation History: 3 points
Removed measurement 76cb6094 to history. Total: 3
th(0)=-60.36117703764293;dx=-0.030600069044568867
New Minimum: -60.36117703764293 > -82.68742610592652
WOLF (strong): th(9048.625698133914)=-82.68742610592652; dx=6.644228514048384E-5 evalInputDelta=22.326249068283587
New Minimum: -82.68742610592652 > -95.30269872050512
END: th(4524.312849066957)=-95.30269872050512; dx=-0.001247045547357744 evalInputDelta=34.94152168286219
Fitness changed from -60.36117703764293 to -95.30269872050512
Iteration 4 complete. Error: -95.30269872050512 Total: 5.0618; Orientation: 0.5919; Line Search: 3.3741
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>
Adding measurement 12789452 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.237e+03, gradient 2.197e-01, dot -0.074; [e3a8f353-e39d-4b93-8587-2920d930be18 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -95.30269872050512, -27.375149531599735, -13.23322103919976, -0.35570159065034923
LBFGS Accumulation History: 3 points
Removed measurement 12789452 to history. Total: 3
th(0)=-95.30269872050512;dx=-0.04821772221053279
New Minimum: -95.30269872050512 > -131.22266373345937
WOLF (strong): th(9747.336550586839)=-131.22266373345937; dx=7.465262027034507E-4 evalInputDelta=35.91996501295425
New Minimum: -131.22266373345937 > -151.53417238073507
END: th(4873.668275293419)=-151.53417238073507; dx=-0.0023522254509693334 evalInputDelta=56.23147366022995
Fitness changed from -95.30269872050512 to -151.53417238073507
Iteration 5 complete. Error: -151.53417238073507 Total: 5.0165; Orientation: 0.5683; Line Search: 3.3566
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>
Adding measurement 554c1a4d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.488e+04, gradient 3.020e-01, dot -0.071; [e3a8f353-e39d-4b93-8587-2920d930be18 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -151.53417238073507, -27.375149531599735, -13.23322103919976, -0.35570159065034923
LBFGS Accumulation History: 3 points
Removed measurement 554c1a4d to history. Total: 3
th(0)=-151.53417238073507;dx=-0.0911294885342048
Armijo: th(10500.000000000004)=-117.78941638959581; dx=0.0016159153126759007 evalInputDelta=-33.74475599113926
New Minimum: -151.53417238073507 > -178.7679857996668
WOLF (strong): th(5250.000000000002)=-178.7679857996668; dx=0.004029185325245202 evalInputDelta=27.23381341893173
New Minimum: -178.7679857996668 > -210.517127961834
END: th(1750.0000000000007)=-210.517127961834; dx=-0.0096627954294016 evalInputDelta=58.982955581098935
Fitness changed from -151.53417238073507 to -210.517127961834
Iteration 6 complete. Error: -210.517127961834 Total: 5.9953; Orientation: 0.4568; Line Search: 4.4527
Adding measurement 5f4ba4f7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.081e+04, gradient 2.988e-01, dot -0.084; [e3a8f353-e39d-4b93-8587-2920d930be18 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -210.517127961834, -27.375149531599735, -13.23322103919976, -0.35570159065034923
LBFGS Accumulation History: 3 points
Removed measurement 5f4ba4f7 to history. Total: 3
th(0)=-210.517127961834;dx=-0.08918617909098414
New Minimum: -210.517127961834 > -269.7474242534531
END: th(3770.260707555798)=-269.7474242534531; dx=-0.002499724574177341 evalInputDelta=59.23029629161911
Fitness changed from -210.517127961834 to -269.7474242534531
Iteration 7 complete. Error: -269.7474242534531 Total: 3.7475; Orientation: 0.4601; Line Search: 2.2288
Adding measurement 2813e561 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.315e+05, gradient 3.634e-01, dot -0.085; [e3a8f353-e39d-4b93-8587-2920d930be18 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -269.7474242534531, -27.375149531599735, -13.23322103919976, -0.35570159065034923
LBFGS Accumulation History: 3 points
Removed measurement 2813e561 to history. Total: 3
th(0)=-269.7474242534531;dx=-0.1319344433240789
Armijo: th(8122.780458822367)=-233.0414586183492; dx=0.004774211122334797 evalInputDelta=-36.70596563510392
New Minimum: -269.7474242534531 > -313.109211690614
WOLF (strong): th(4061.3902294111836)=-313.109211690614; dx=0.00612026786822774 evalInputDelta=43.3617874371609
New Minimum: -313.109211690614 > -354.3540155472265
END: th(1353.7967431370612)=-354.3540155472265; dx=-0.02290434016378908 evalI
...skipping 5570 bytes...
2 complete. Error: -537.5403846622361 Total: 11.0166; Orientation: 1.0098; Line Search: 8.9560
Adding measurement 42dbae66 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 5.178e+03, gradient 2.746e-01, dot 0.368; [e3a8f353-e39d-4b93-8587-2920d930be18 = 1.000/1.000e+00]
th(0)=-537.5403846622361;dx=-522.88477651019
Armijo: th(1309.1183012346526)=-25.942490920349794; dx=0.036605086474459037 evalInputDelta=-511.5978937418863
Armijo: th(654.5591506173263)=-25.52136044863287; dx=0.07033049483614741 evalInputDelta=-512.0190242136032
Armijo: th(218.18638353910876)=-34.21939383930527; dx=0.2657763935849792 evalInputDelta=-503.3209908229308
Armijo: th(54.54659588477719)=-61.20285430369248; dx=1.2832993240595059 evalInputDelta=-476.3375303585436
Armijo: th(10.909319176955439)=-121.83793814598116; dx=10.989096630241951 evalInputDelta=-415.7024465162549
Armijo: th(1.8182198628259065)=-448.97240039080333; dx=8.930879116708013 evalInputDelta=-88.56798427143275
New Minimum: -537.5403846622361 > -602.5350685902152
END: th(0.2597456946894152)=-602.5350685902152; dx=-208.57954941351923 evalInputDelta=64.99468392797917
Fitness changed from -537.5403846622361 to -602.5350685902152
Iteration 13 complete. Error: -602.5350685902152 Total: 10.4513; Orientation: 0.4574; Line Search: 8.9240
Adding measurement 6616c6cc to history. Total: 4
Rejected: LBFGS Orientation magnitude: 1.446e+04, gradient 3.281e-01, dot -0.041; [e3a8f353-e39d-4b93-8587-2920d930be18 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -602.5350685902152, -537.5403846622361, -27.375149531599735, -13.23322103919976, -0.35570159065034923
Rejected: LBFGS Orientation magnitude: 1.295e+04, gradient 3.281e-01, dot -0.102; [e3a8f353-e39d-4b93-8587-2920d930be18 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -602.5350685902152, -537.5403846622361, -27.375149531599735, -13.23322103919976
LBFGS Accumulation History: 3 points
Removed measurement 6616c6cc to history. Total: 4
Removed measurement 42dbae66 to history. Total: 3
th(0)=-602.5350685902152;dx=-0.1075515667695323
New Minimum: -602.5350685902152 > -602.5798392570173
WOLFE (weak): th(0.5596051352253066)=-602.5798392570173; dx=-0.10200256547074271 evalInputDelta=0.04477066680203734
New Minimum: -602.5798392570173 > -602.6246302957635
WOLFE (weak): th(1.1192102704506133)=-602.6246302957635; dx=-0.10198620906414196 evalInputDelta=0.08956170554824894
New Minimum: -602.6246302957635 > -602.8033584211827
WOLFE (weak): th(3.35763081135184)=-602.8033584211827; dx=-0.10177827028098872 evalInputDelta=0.26828983096743286
New Minimum: -602.8033584211827 > -603.6049571914482
WOLFE (weak): th(13.43052324540736)=-603.6049571914482; dx=-0.10130649169023392 evalInputDelta=1.0698886012329467
New Minimum: -603.6049571914482 > -607.8131937409036
WOLFE (weak): th(67.1526162270368)=-607.8131937409036; dx=-0.09779977675242851 evalInputDelta=5.278125150688311
New Minimum: -607.8131937409036 > -630.851994526589
END: th(402.91569736222084)=-630.851994526589; dx=-0.0808956217916054 evalInputDelta=28.316925936373764
Fitness changed from -602.5350685902152 to -630.851994526589
Iteration 14 complete. Error: -630.851994526589 Total: 10.0035; Orientation: 1.1370; Line Search: 7.8222
Adding measurement 3ecefe13 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 3.826e+03, gradient 2.925e-01, dot 0.055; [e3a8f353-e39d-4b93-8587-2920d930be18 = 1.000/1.000e+00]
th(0)=-630.851994526589;dx=-61.80564111317341
Armijo: th(868.0555555555566)=-9.58102697308158; dx=7.820669435896202E-4 evalInputDelta=-621.2709675535074
Armijo: th(434.0277777777783)=-11.797536313013929; dx=0.002918541501960294 evalInputDelta=-619.0544582135751
Armijo: th(144.6759259259261)=-22.043179623895938; dx=0.03909444397130595 evalInputDelta=-608.808814902693
Armijo: th(36.168981481481524)=-34.479571823515535; dx=0.07951508206495139 evalInputDelta=-596.3724227030734
Armijo: th(7.233796296296305)=-88.96488234570677; dx=3.9354437923084564 evalInputDelta=-541.8871121808822
Armijo: th(1.205632716049384)=-393.06131888351035; dx=94.79572150270062 evalInputDelta=-237.79067564307866
Armijo: th(0.172233245149912)=-617.8979428963333; dx=33.15935798520995 evalInputDelta=-12.954051630255663
Armijo: th(0.021529155643739)=-630.5114766673538; dx=-27.430315901547132 evalInputDelta=-0.34051785923520583
Armijo: th(0.002392128404859889)=-630.8426224429725; dx=-40.342556166039905 evalInputDelta=-0.009372083616540294
Armijo: th(2.392128404859889E-4)=-630.8513833079886; dx=-42.000416887339874 evalInputDelta=-6.112186003974784E-4
Armijo: th(2.1746621862362628E-5)=-630.8519039757227; dx=-42.20369468885994 evalInputDelta=-9.055086627540732E-5
Armijo: th(1.812218488530219E-6)=-630.851994526589; dx=-42.22208074663354 evalInputDelta=0.0
Armijo: th(1.3940142219463222E-7)=-630.8519492511575; dx=-42.116846503235976 evalInputDelta=-4.527543148924451E-5
Armijo: th(9.95724444247373E-9)=-630.8519718888737; dx=-42.14711438176106 evalInputDelta=-2.2637715346718323E-5
END: th(6.638162961649154E-10)=-630.851994526589; dx=-42.207621720409385 evalInputDelta=0.0
Fitness changed from -630.851994526589 to -630.851994526589
Static Iteration Total: 19.3331; Orientation: 0.4561; Line Search: 17.8190
Iteration 15 failed. Error: -630.851994526589
Previous Error: 0.0 -> -630.851994526589
Retrying iteration 15
Reset training subject: 2731825765685
Adding measurement 159ed734 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-630.851994526589;dx=-0.08544286950172
WOLFE (weak): th(1.4301488562661726E-9)=-630.851994526589; dx=-0.08039942446724033 evalInputDelta=0.0
WOLFE (weak): th(2.8602977125323453E-9)=-630.851994526589; dx=-0.08039175170701249 evalInputDelta=0.0
WOLFE (weak): th(8.580893137597036E-9)=-630.851994526589; dx=-0.08037200155866128 evalInputDelta=0.0
WOLFE (weak): th(3.4323572550388145E-8)=-630.851994526589; dx=-0.08040822588616311 evalInputDelta=0.0
WOLFE (weak): th(1.716178627519407E-7)=-630.851994526589; dx=-0.08044447488168249 evalInputDelta=0.0
Armijo: th(1.0297071765116442E-6)=-630.851994526589; dx=-0.08038419567336857 evalInputDelta=0.0
WOLFE (weak): th(6.006625196317925E-7)=-630.851994526589; dx=-0.08043254990121869 evalInputDelta=0.0
Armijo: th(8.151848480717183E-7)=-630.8519718888737; dx=-0.0804011184949049 evalInputDelta=-2.2637715346718323E-5
Armijo: th(7.079236838517554E-7)=-630.851994526589; dx=-0.0804209473628133 evalInputDelta=0.0
WOLFE (weak): th(6.54293101741774E-7)=-630.851994526589; dx=-0.08039934995787489 evalInputDelta=0.0
Armijo: th(6.811083927967647E-7)=-630.851994526589; dx=-0.08040956534578964 evalInputDelta=0.0
Armijo: th(6.677007472692693E-7)=-630.851994526589; dx=-0.08042274828973794 evalInputDelta=0.0
WOLFE (weak): th(6.609969245055216E-7)=-630.851994526589; dx=-0.08042272927824023 evalInputDelta=0.0
WOLFE (weak): th(6.643488358873955E-7)=-630.851994526589; dx=-0.08043640708566552 evalInputDelta=0.0
Armijo: th(6.660247915783324E-7)=-630.851994526589; dx=-0.08037203191618097 evalInputDelta=0.0
WOLFE (weak): th(6.651868137328639E-7)=-630.851994526589; dx=-0.0803997071350877 evalInputDelta=0.0
Armijo: th(6.656058026555981E-7)=-630.851994526589; dx=-0.08043365823978085 evalInputDelta=0.0
Armijo: th(6.65396308194231E-7)=-630.851994526589; dx=-0.08040897955605675 evalInputDelta=0.0
Armijo: th(6.652915609635475E-7)=-630.851994526589; dx=-0.08041338960902493 evalInputDelta=0.0
WOLFE (weak): th(6.652391873482057E-7)=-630.851994526589; dx=-0.08043063959876509 evalInputDelta=0.0
WOLFE (weak): th(6.652653741558766E-7)=-630.851994526589; dx=-0.08041406193255843 evalInputDelta=0.0
WOLFE (weak): th(6.652784675597121E-7)=-630.851994526589; dx=-0.08044537801838013 evalInputDelta=0.0
Armijo: th(6.652850142616298E-7)=-630.851994526589; dx=-0.08043312484835172 evalInputDelta=0.0
mu ~= nu (6.652784675597121E-7): th(0.0)=-630.851994526589
Fitness changed from -630.851994526589 to -630.851994526589
Static Iteration Total: 31.2191; Orientation: 0.0191; Line Search: 29.0896
Iteration 16 failed. Error: -630.851994526589
Previous Error: 0.0 -> -630.851994526589
Optimization terminated 16
Final threshold in iteration 16: -630.851994526589 (> -Infinity) after 152.533s (< 3600.000s)
Returns
-630.851994526589