BasicOptimizer.scala:89 executed in 53.42 seconds (1.135 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: 218825676092400
Reset training subject: 218826326271900
Adding measurement 5733ff89 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-9.367109397184311;dx=-6.14299753662821E-4
New Minimum: -9.367109397184311 > -9.367848162539538
WOLFE (weak): th(2.154434690031884)=-9.367848162539538; dx=-6.120082670446458E-4 evalInputDelta=7.387653552264339E-4
New Minimum: -9.367848162539538 > -9.368587471676053
WOLFE (weak): th(4.308869380063768)=-9.368587471676053; dx=-6.108086513936761E-4 evalInputDelta=0.0014780744917413102
New Minimum: -9.368587471676053 > -9.371596238660274
WOLFE (weak): th(12.926608140191302)=-9.371596238660274; dx=-6.129823521793964E-4 evalInputDelta=0.004486841475962677
New Minimum: -9.371596238660274 > -9.385639087608542
WOLFE (weak): th(51.70643256076521)=-9.385639087608542; dx=-6.080792405528596E-4 evalInputDelta=0.018529690424230694
New Minimum: -9.385639087608542 > -9.46742772878027
WOLFE (weak): th(258.53216280382605)=-9.46742772878027; dx=-6.102189922421737E-4 evalInputDelta=0.10031833159595926
New Minimum: -9.46742772878027 > -10.023757000991942
END: th(1551.1929768229563)=-10.023757000991942; dx=-4.593751772292615E-4 evalInputDelta=0.656647603807631
Fitness changed from -9.367109397184311 to -10.023757000991942
Iteration 1 complete. Error: -10.023757000991942 Total: 6.7901; Orientation: 0.0168; Line Search: 4.9142
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/41e25e06-4e7a-4cfa-b41c-094820a601c7.jpg)
Adding measurement 14a8b86b to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-10.023757000991942;dx=-8.743227091903159E-4
New Minimum: -10.023757000991942 > -11.370363064842854
END: th(3341.943960201201)=-11.370363064842854; dx=-2.991378157161737E-4 evalInputDelta=1.3466060638509116
Fitness changed from -10.023757000991942 to -11.370363064842854
Iteration 2 complete. Error: -11.370363064842854 Total: 2.0973; Orientation: 0.0164; Line Search: 1.3818
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/c1014ae4-da81-4d3f-b5fa-542c42deae7a.jpg)
Adding measurement 5f7d2429 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-11.370363064842854;dx=-6.852261102968274E-4
New Minimum: -11.370363064842854 > -13.14336854460497
END: th(7200.000000000001)=-13.14336854460497; dx=-1.8793415339734355E-4 evalInputDelta=1.7730054797621158
Fitness changed from -11.370363064842854 to -13.14336854460497
Iteration 3 complete. Error: -13.14336854460497 Total: 1.9694; Orientation: 0.0170; Line Search: 1.3148
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/80cf4d4e-bf25-424a-ae5b-ea0d1a7a8b67.jpg)
Adding measurement 4248a8f2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.319e+03, gradient 2.503e-02, dot -0.355; [919fb888-23d6-4105-9e85-202d9b163b21 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -13.14336854460497, -11.370363064842854, -10.023757000991942, -9.367109397184311
LBFGS Accumulation History: 3 points
Removed measurement 4248a8f2 to history. Total: 3
th(0)=-13.14336854460497;dx=-6.265566365785042E-4
New Minimum: -13.14336854460497 > -15.526882873593603
END: th(15511.929768229566)=-15.526882873593603; dx=-1.190114374473983E-4 evalInputDelta=2.3835143289886336
Fitness changed from -13.14336854460497 to -15.526882873593603
Iteration 4 complete. Error: -15.526882873593603 Total: 2.3109; Orientation: 0.3734; Line Search: 1.3223
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/5a1d3c57-5a9a-4a2f-a924-92c8ef5a09b4.jpg)
Adding measurement 5fd0f107 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.006e+03, gradient 2.625e-02, dot -0.216; [919fb888-23d6-4105-9e85-202d9b163b21 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -15.526882873593603, -11.370363064842854, -10.023757000991942, -9.367109397184311
LBFGS Accumulation History: 3 points
Removed measurement 5fd0f107 to history. Total: 3
th(0)=-15.526882873593603;dx=-6.888149690935132E-4
New Minimum: -15.526882873593603 > -16.807079198713836
END: th(33419.43960201202)=-16.807079198713836; dx=-3.29082467903873E-5 evalInputDelta=1.280196325120233
Fitness changed from -15.526882873593603 to -16.807079198713836
Iteration 5 complete. Error: -16.807079198713836 Total: 2.3403; Orientation: 0.3446; Line Search: 1.3445
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/58699e9f-0af6-4851-8a26-b3c33a4e788f.jpg)
Adding measurement 44bf92bb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.214e+03, gradient 2.265e-02, dot -0.178; [919fb888-23d6-4105-9e85-202d9b163b21 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -16.807079198713836, -11.370363064842854, -10.023757000991942, -9.367109397184311
LBFGS Accumulation History: 3 points
Removed measurement 44bf92bb to history. Total: 3
th(0)=-16.807079198713836;dx=-5.129688589309651E-4
New Minimum: -16.807079198713836 > -19.582343638610485
END: th(72000.00000000003)=-19.582343638610485; dx=-2.7216303007635054E-5 evalInputDelta=2.775264439896649
Fitness changed from -16.807079198713836 to -19.582343638610485
Iteration 6 complete. Error: -19.582343638610485 Total: 2.5208; Orientation: 0.3150; Line Search: 1.5449
Adding measurement 733982e6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.359e+03, gradient 1.903e-02, dot -0.150; [919fb888-23d6-4105-9e85-202d9b163b21 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -19.582343638610485, -11.370363064842854, -10.023757000991942, -9.367109397184311
LBFGS Accumulation History: 3 points
Removed measurement 733982e6 to history. Total: 3
th(0)=-19.582343638610485;dx=-3.620635084530797E-4
New Minimum: -19.582343638610485 > -20.84641096695079
END: th(155119.2976822957)=-20.84641096695079; dx=-1.0877897224818558E-5 evalInputDelta=1.2640673283403032
Fitness changed from -19.582343638610485 to -20.84641096695079
Iteration 7 complete. Error: -20.84641096695079 Total: 2.3143; Orientation: 0.2927; Line Search: 1.4223
Adding measurement 25a2adac to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.016e+03, gradient 1.746e-02, dot -0.074; [919fb888-23d6-4105-9e85-202d9b163b21 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -20.84641096695079, -11.370363064842854, -10.023757000991942, -9.367109397184311
LBFGS Accumulation History: 3 points
Removed measurement 25a2adac to history. Total: 3
th(0)=-20.84641096695079;dx=-3.048273019762341E-4
Armijo: th(334194.39602012024)=-16.682863783500064; dx=1.049178744185909E-5 evalInputDelta=-4.163547183450724
New Minimum: -20.84641096695079 > -25.918548765468852
END: th(167097.19801006012)=-25.918548765468852; dx=-2.7098603085788222E-5 evalInputDelta=5.072137798518064
Fitness changed from -20.84641096695079 to -25.918548765468852
Iteration 8 complete. Error: -25.918548765468852 Total: 2.9184; Orientation: 0.3009; Line Search: 2.0107
Adding measurement 6e352b44 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.980e+03, gradient 1.701e-02, dot -0.082; [919fb888-23d6-4105-9e85-202d9b163b21 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -25.918548765468852, -11.370363064842854, -10.023757000991942, -9.367109397184311
LBFGS Accumulation History: 3 points
Removed measurement 6e352b44 to history. Total: 3
th(0)=-25.918548765468852;dx=-2.893288314866905E-4
Armijo: th(360000.0000000002)=-17.620979856683274; dx=1.4845788902543824E-5 evalInputDelta=-8.297568908785578
New Minimum: -25.918548765468852 > -30.71111300209906
END: th(180000.0000000001)=-30.71111300209906; dx=-2.3329066474193656E-5 evalInputDelta=4.792564236630209
Fitness changed from -25.918548765468852 to -30.71111300209906
Iteration 9 complete. Error: -30.71111300209906 Total: 2.9346; Orientation: 0.3184; Line Search: 1.9711
Adding measurement 96ed852 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.945e+03, gradient 1.707e-02, dot -0.099; [919fb888-23d6-4105-9e85-202d9b163b21 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -30.71111300209906, -11.370363064842854, -10.023757000991942, -9.367109397184311
LBFGS Accumulation History: 3 points
Removed measurement 96ed852 to history. Total: 3
th(0)=-30.71111300209906;dx=-2.913042986706953E-4
Armijo: th(387798.2442057393)=-20.128016562400504; dx=1.4852088240525314E-5 evalInputDelta=-10.583096439698558
New Minimum: -30.71111300209906 > -35.19830290301509
END: th(193899.12210286965)=-35.19830290301509; dx=-3.092090844972114E-5 evalInputDelta=4.487189900916029
Fitness changed from -30.71111300209906 to -35.19830290301509
Iteration 10 complete. Error: -35.19830290301509 Total: 2.7430; Orientation: 0.3074; Line Search: 1.8062
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/f02d5394-733b-4fbd-8bcf-b5b583334978.jpg)
Adding measurement 72a9aa5d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.885e+03, gradient 1.701e-02, dot -0.112; [919fb888-23d6-4105-9e85-202d9b163b21 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -35.19830290301509, -11.370363064842854, -10.023757000991942, -9.367109397184311
LBFGS Accumulation History: 3 points
Removed measurement 72a9aa5d to history. Total: 3
th(0)=-35.19830290301509;dx=-2.8934379896577875E-4
Armijo: th(417742.99502515036)=-23.969910831728612; dx=1.2029062298232582E-5 evalInputDelta=-11.228392071286478
New Minimum: -35.19830290301509 > -39.932808024329454
END: th(208871.49751257518)=-39.932808024329454; dx=-3.235842038331607E-5 evalInputDelta=4.734505121314363
Fitness changed from -35.19830290301509 to -39.932808024329454
Iteration 11 complete. Error: -39.932808024329454 Total: 3.1840; Orientation: 0.3126; Line Search: 1.9466
Adding measurement 6c148d7e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.001e+04, gradient 1.639e-02, dot -0.139; [919fb888-23d6-4105-9e85-202d9b163b21 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -39.932808024329454, -11.370363064842854, -10.023757000991942, -9.367109397184311
LBFGS Accumulation History: 3 points
Removed measurement 6c148d7e to history. Total: 3
th(0)=-39.932808024329454;dx=-2.685068254421732E-4
Armijo: th(450000.0000000003)=-26.028327255477116; dx=1.7493642307373613E-5 evalInputDelta=-13.904480768852338
New Minimum: -39.932808024329454 > -44.27761036091877
END: th(225000.00000000015)=-44.27761036091877; dx=-3.212926296358709E-5 evalInputDelta=4.344802336589318
Fitness changed from -39.932808024329454 to -44.27761036091877
Iteration 12 complete. Error: -44.27761036091877 Total: 2.7225; Orientation: 0.2971; Line Search: 1.8709
Adding measurement 3d620d0d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.729e+04, gradient 1.635e-02, dot -0.148; [919fb888-23d6-4105-9e85-202d9b163b21 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -44.27761036091877, -11.370363064842854, -10.023757000991942, -9.367109397184311
LBFGS Accumulation History: 3 points
Removed measurement 3d620d0d to history. Total: 3
th(0)=-44.27761036091877;dx=-2.67323929939239E-4
Armijo: th(484747.8052571742)=-27.08532980941716; dx=1.6198286096408045E-5 evalInputDelta=-17.19228055150161
New Minimum: -44.27761036091877 > -48.292484845491884
END: th(242373.9026285871)=-48.292484845491884; dx=-3.271354066183509E-5 evalInputDelta=4.014874484573113
Fitness changed from -44.27761036091877 to -48.292484845491884
Iteration 13 complete. Error: -48.292484845491884 Total: 2.7570; Orientation: 0.2937; Line Search: 1.8546
Adding measurement 4e5cc237 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.926e+05, gradient 1.658e-02, dot -0.142; [919fb888-23d6-4105-9e85-202d9b163b21 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -48.292484845491884, -11.370363064842854, -10.023757000991942, -9.367109397184311
LBFGS Accumulation History: 3 points
Removed measurement 4e5cc237 to history. Total: 3
th(0)=-48.292484845491884;dx=-2.7484522342251087E-4
Armijo: th(522178.74378143804)=-26.10228556756673; dx=2.0828391377372376E-5 evalInputDelta=-22.190199277925153
New Minimum: -48.292484845491884 > -50.89748590310984
END: th(261089.37189071902)=-50.89748590310984; dx=-2.9190698003675147E-5 evalInputDelta=2.6050010576179545
Fitness changed from -48.292484845491884 to -50.89748590310984
Iteration 14 complete. Error: -50.89748590310984 Total: 2.7206; Orientation: 0.3025; Line Search: 1.8801
Adding measurement 249067cd to history. Total: 3
Accepted: LBFGS Orientation magnitude: 6.467e+04, gradient 1.685e-02, dot 0.151; [919fb888-23d6-4105-9e85-202d9b163b21 = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-50.89748590310984;dx=-164.34360986875393
Armijo: th(562500.0000000005)=713.5309916428885; dx=5.625926055389269E-4 evalInputDelta=-764.4284775459982
Armijo: th(281250.00000000023)=713.2600690091564; dx=0.0011246265537486265 evalInputDelta=-764.1575549122663
Armijo: th(93750.00000000007)=712.6327733987838; dx=0.0033702062213311406 evalInputDelta=-763.5302593018937
Armijo: th(23437.50000000002)=711.5740751688484; dx=0.01345804932909732 evalInputDelta=-762.4715610719581
Armijo: th(4687.500000000004)=707.8740434328929; dx=0.06693695260588514 evalInputDelta=-758.7715293360027
Armijo: th(781.2500000000006)=696.9270072113474; dx=0.39698696240347875 evalInputDelta=-747.8244931144573
Armijo: th(111.60714285714293)=668.5007817518815; dx=2.6972215588704405 evalInputDelta=-719.3982676549913
Armijo: th(13.950892857142867)=570.1460083619556; dx=19.091205010418435 evalInputDelta=-621.0434942650654
Armijo: th(1.5500992063492074)=244.86528797984334; dx=89.709403421165 evalInputDelta=-295.7627738829532
Armijo: th(0.15500992063492075)=-25.56063478676829; dx=27.408313250652103 evalInputDelta=-25.33685111634155
Armijo: th(0.014091810966810977)=-50.00556569051646; dx=-92.96275110947497 evalInputDelta=-0.8919202125933765
Armijo: th(0.0011743175805675814)=-50.843789013811374; dx=-114.12122612801768 evalInputDelta=-0.05369688929846461
Armijo: th(9.033212158212165E-5)=-50.8935296033698; dx=-115.87140852204645 evalInputDelta=-0.003956299740039526
Armijo: th(6.452294398722975E-6)=-50.897202326196464; dx=-116.32242604612097 evalInputDelta=-2.835769133753274E-4
Armijo: th(4.30152959914865E-7)=-50.897467977383; dx=-116.2232715851382 evalInputDelta=-1.7925726837120237E-5
Armijo: th(2.6884559994679062E-8)=-50.89748232683115; dx=-116.19648483792882 evalInputDelta=-3.5762786865234375E-6
Armijo: th(1.5814447055693565E-9)=-50.89748325647652; dx=-116.2227119945099 evalInputDelta=-2.6466333196140113E-6
MIN ALPHA (8.785803919829758E-11): th(0.0)=-50.89748590310984
Fitness changed from -50.89748590310984 to -50.89748590310984
Static Iteration Total: 13.1004; Orientation: 0.2771; Line Search: 11.9448
Iteration 15 failed. Error: -50.89748590310984
Previous Error: 0.0 -> -50.89748590310984
Retrying iteration 15
Final threshold in iteration 15: -50.89748590310984 (> -Infinity) after 53.424s (< 5400.000s)
Returns
-50.89748590310984