Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

BasicOptimizer.scala:89 executed in 107.65 seconds (1.108 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
Logging
Reset training subject: 3127283998603
Reset training subject: 3128474896956
Adding measurement 1e5bf7a2 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.0809592635198384;dx=-2.938693748154298E-5
New Minimum: -0.0809592635198384 > -0.08099136923232711
WOLFE (weak): th(2.154434690031884)=-0.08099136923232711; dx=-2.9443783394104723E-5 evalInputDelta=3.210571248871141E-5
New Minimum: -0.08099136923232711 > -0.08102327956096038
WOLFE (weak): th(4.308869380063768)=-0.08102327956096038; dx=-2.9447120558511265E-5 evalInputDelta=6.40160411219809E-5
New Minimum: -0.08102327956096038 > -0.08115142388711948
WOLFE (weak): th(12.926608140191302)=-0.08115142388711948; dx=-2.942076258745645E-5 evalInputDelta=1.9216036728107733E-4
New Minimum: -0.08115142388711948 > -0.08172814723509843
WOLFE (weak): th(51.70643256076521)=-0.08172814723509843; dx=-2.9585096822755043E-5 evalInputDelta=7.688837152600297E-4
New Minimum: -0.08172814723509843 > -0.08496358092879476
WOLFE (weak): th(258.53216280382605)=-0.08496358092879476; dx=-3.043336735778195E-5 evalInputDelta=0.004004317408956362
New Minimum: -0.08496358092879476 > -0.10949936593008695
WOLFE (weak): th(1551.1929768229563)=-0.10949936593008695; dx=-3.402467124464755E-5 evalInputDelta=0.028540102410248555
New Minimum: -0.10949936593008695 > -0.36173760139596345
WOLFE (weak): th(10858.350837760694)=-0.36173760139596345; dx=-2.957107938538572E-5 evalInputDelta=0.28077833787612505
END: th(86866.80670208555)=-0.21225372902697318; dx=-1.2266959759270246E-7 evalInputDelta=0.13129446550713478
Fitness changed from -0.0809592635198384 to -0.36173760139596345
Iteration 1 complete. Error: -0.36173760139596345 Total: 13.7703; Orientation: 0.0201; Line Search: 10.3423
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/4441581e-2912-4876-96d6-f285a1ea6e64.jpg)
Adding measurement 300026e2 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.36173760139596345;dx=-1.3294578856364226E-4
New Minimum: -0.36173760139596345 > -0.48133426767968757
WOLF (strong): th(187148.86177126726)=-0.48133426767968757; dx=2.5927021152343816E-6 evalInputDelta=0.11959666628372412
New Minimum: -0.48133426767968757 > -0.6493685613415785
WOLF (strong): th(93574.43088563363)=-0.6493685613415785; dx=4.4464163163780975E-6 evalInputDelta=0.28763095994561505
New Minimum: -0.6493685613415785 > -0.9534239751086874
WOLF (strong): th(31191.476961877877)=-0.9534239751086874; dx=2.5045749717906532E-6 evalInputDelta=0.5916863737127239
New Minimum: -0.9534239751086874 > -1.090353580203666
END: th(7797.869240469469)=-1.090353580203666; dx=-8.600070499032158E-5 evalInputDelta=0.7286159788077025
Fitness changed from -0.36173760139596345 to -1.090353580203666
Iteration 2 complete. Error: -1.090353580203666 Total: 6.8812; Orientation: 0.0197; Line Search: 5.7342
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/931ca826-dfad-4fd8-901d-6366654d0b8d.jpg)
Adding measurement 8c967d4 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-1.090353580203666;dx=-3.8143111532708415E-4
New Minimum: -1.090353580203666 > -1.8535618231082456
END: th(16800.000000000004)=-1.8535618231082456; dx=-9.623028647381218E-7 evalInputDelta=0.7632082429045797
Fitness changed from -1.090353580203666 to -1.8535618231082456
Iteration 3 complete. Error: -1.8535618231082456 Total: 3.4102; Orientation: 0.0199; Line Search: 2.2878
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/cbcc0f16-1cd7-4367-abbc-8019a27d38d9.jpg)
Adding measurement 69c95f3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.098e+07, gradient 2.826e-02, dot -0.028; [5be30ea0-7809-406d-96f1-0503b84f7646 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.8535618231082456, -1.090353580203666, -0.36173760139596345, -0.0809592635198384
LBFGS Accumulation History: 3 points
Removed measurement 69c95f3 to history. Total: 3
th(0)=-1.8535618231082456;dx=-7.985896063493559E-4
New Minimum: -1.8535618231082456 > -2.542600681556146
WOLF (strong): th(36194.502792535655)=-2.542600681556146; dx=1.6940654286336523E-5 evalInputDelta=0.6890388584479004
New Minimum: -2.542600681556146 > -3.4518298432283014
END: th(18097.251396267828)=-3.4518298432283014; dx=-1.9903368661139918E-5 evalInputDelta=1.5982680201200559
Fitness changed from -1.8535618231082456 to -3.4518298432283014
Iteration 4 complete. Error: -3.4518298432283014 Total: 5.0725; Orientation: 0.5062; Line Search: 3.4570
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/79a82473-c553-4ef3-9333-6f0d96e32fb9.jpg)
Adding measurement 58deeb43 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.004e+07, gradient 4.706e-02, dot -0.037; [5be30ea0-7809-406d-96f1-0503b84f7646 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3.4518298432283014, -1.090353580203666, -0.36173760139596345, -0.0809592635198384
LBFGS Accumulation History: 3 points
Removed measurement 58deeb43 to history. Total: 3
th(0)=-3.4518298432283014;dx=-0.002214199230726815
New Minimum: -3.4518298432283014 > -5.65985083241548
WOLF (strong): th(38989.346202347355)=-5.65985083241548; dx=8.362688129026799E-5 evalInputDelta=2.2080209891871787
New Minimum: -5.65985083241548 > -7.677536723397635
END: th(19494.673101173677)=-7.677536723397635; dx=-2.896295275569226E-5 evalInputDelta=4.225706880169334
Fitness changed from -3.4518298432283014 to -7.677536723397635
Iteration 5 complete. Error: -7.677536723397635 Total: 5.0611; Orientation: 0.4697; Line Search: 3.4593
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/dd93b1da-5a3d-4e98-9c2b-82258d0c0107.jpg)
Adding measurement 54982af2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.215e+07, gradient 4.883e-02, dot -0.011; [5be30ea0-7809-406d-96f1-0503b84f7646 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.677536723397635, -1.090353580203666, -0.36173760139596345, -0.0809592635198384
LBFGS Accumulation History: 3 points
Removed measurement 54982af2 to history. Total: 3
th(0)=-7.677536723397635;dx=-0.0023840757032000653
New Minimum: -7.677536723397635 > -9.126230503901322
WOLF (strong): th(42000.000000000015)=-9.126230503901322; dx=6.813091226492533E-5 evalInputDelta=1.448693780503687
New Minimum: -9.126230503901322 > -14.782743991269355
WOLF (strong): th(21000.000000000007)=-14.782743991269355; dx=8.260932062621219E-5 evalInputDelta=7.1052072678717195
New Minimum: -14.782743991269355 > -16.54448476562499
END: th(7000.000000000003)=-16.54448476562499; dx=-3.4530595905514066E-4 evalInputDelta=8.866948042227355
Fitness changed from -7.677536723397635 to -16.54448476562499
Iteration 6 complete. Error: -16.54448476562499 Total: 6.1465; Orientation: 0.4551; Line Search: 4.5887
Adding measurement 675f111f to history. Total: 3
Accepted: LBFGS Orientation magnitude: 1.125e+09, gradient 5.880e-02, dot 0.003; [5be30ea0-7809-406d-96f1-0503b84f7646 = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-16.54448476562499;dx=-229893.95588017802
Armijo: th(15081.042830223192)=-0.9333039733712848; dx=1.7815230881491607E-5 evalInputDelta=-15.611180792253705
Armijo: th(7540.521415111596)=-0.9342170445851903; dx=3.5542493113009945E-5 evalInputDelta=-15.610267721039799
Armijo: th(2513.507138370532)=-0.9346081055683233; dx=1.0917919112754395E-4 evalInputDelta=-15.609876660056667
Armijo: th(628.376784592633)=-0.9352856029711526; dx=4.305391443952353E-4 evalInputDelta=-15.609199162653837
Armijo: th(125.6753569185266)=-0.9307700447581311; dx=0.002050589238515855 evalInputDelta=-15.61371472086686
Armijo: th(20.945892819754434)=-0.9175366528487259; dx=0.01444067053458037 evalInputDelta=-15.626948112776263
Armijo: th(2.992270402822062)=-0.9046909583528837; dx=0.09895202252760778 evalInputDelta=-15.639793807272106
Armijo: th(0.37403380035275774)=-0.6786323137852744; dx=1.6021458117845078 evalInputDelta=-15.865852451839716
Armijo: th(0.041559311150306415)=-1.6701335012386211; dx=18.32830198515603 evalInputDelta=-14.87435126438637
Armijo: th(0.004155931115030641)=-0.38656198671998826; dx=143.40622003898366 evalInputDelta=-16.157922778905
Armijo: th(3.778119195482401E-4)=0.0; dx=0.0 evalInputDelta=-16.54448476562499
Armijo: th(3.1484326629020006E-5)=-0.1004649719229925; dx=1465.6756881119793 evalInputDelta=-16.444019793701997
Armijo: th(2.421871279155385E-6)=-3.561432370893398; dx=618928.2793565867 evalInputDelta=-12.983052394731592
Armijo: th(1.7299080565395607E-7)=-15.446678199087144; dx=4887482.126593761 evalInputDelta=-1.0978065665378463
Armijo: th(1.1532720376930404E-8)=-16.541584814677783; dx=80006.20464002283 evalInputDelta=-0.00289995094720652
New Minimum: -16.54448476562499 > -16.544526254236253
WOLFE (weak): th(7.207950235581503E-10)=-16.544526254236253; dx=-248787.87485768902 evalInputDelta=4.1488611262963104E-5
Armijo: th(6.126757700244277E-9)=-16.543820031730952; dx=-558.9332005107135 evalInputDelta=-6.647338940375391E-4
Armijo: th(3.4237763619012137E-9)=-16.54436029916695; dx=-127758.37164418663 evalInputDelta=-1.2446645803976253E-4
END: th(2.072285692729682E-9)=-16.54449649067785; dx=-188829.55132329816 evalInputDelta=1.1725052861066843E-5
Fitness changed from -16.54448476562499 to -16.544526254236253
Iteration 7 complete. Error: -16.544526254236253 Total: 25.7501; Orientation: 1.6380; Line Search: 23.0449
Adding measurement 7b4ae731 to history. Total: 4
Accepted: LBFGS Orientation magnitude: 1.304e+10, gradient 5.875e-02, dot 0.004; [5be30ea0-7809-406d-96f1-0503b84f7646 = 1.000/1.000e+00]
th(0)=-16.544526254236253;dx=-2870695.768141842
Armijo: th(4.4646041840735805E-9)=-16.435407761439325; dx=2.0889138613919795E7 evalInputDelta=-0.10911849279692731
Armijo: th(2.2323020920367902E-9)=-16.52345017059997; dx=7492842.79344628 evalInputDelta=-0.021076083636284437
Armijo: th(7.441006973455967E-10)=-16.54250491638185; dx=-15765.965550482506 evalInputDelta=-0.002021337854401395
Armijo: th(1.8602517433639918E-10)=-16.5444153170646; dx=-1835391.0473738052 evalInputDelta=-1.109371716516705E-4
MIN ALPHA (3.7205034867279837E-11): th(0.0)=-16.544526254236253
Fitness changed from -16.544526254236253 to -16.544526254236253
Static Iteration Total: 8.5089; Orientation: 0.5700; Line Search: 6.8428
Iteration 8 failed. Error: -16.544526254236253
Previous Error: 0.0 -> -16.544526254236253
Retrying iteration 8
Reset training subject: 3201884961071
Adding measurement 3f7869ce to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-16.544526254236253;dx=-0.003450700016325641
WOLFE (weak): th(2.1544346900318838E-10)=-16.544526254236253; dx=-0.003450817126446547 evalInputDelta=0.0
WOLFE (weak): th(4.3088693800637676E-10)=-16.544526254236253; dx=-0.0034507399600421044 evalInputDelta=0.0
WOLFE (weak): th(1.2926608140191302E-9)=-16.544526254236253; dx=-0.0034507906707252935 evalInputDelta=0.0
WOLFE (weak): th(5.170643256076521E-9)=-16.544526254236253; dx=-0.003450803832957391 evalInputDelta=0.0
WOLFE (weak): th(2.5853216280382606E-8)=-16.544526254236253; dx=-0.0034503520819303625 evalInputDelta=0.0
WOLFE (weak): th(1.5511929768229565E-7)=-16.544526254236253; dx=-0.0034506445497298546 evalInputDelta=0.0
Armijo: th(1.0858350837760695E-6)=-16.544525352311027; dx=-0.003450788860339527 evalInputDelta=-9.019252260600297E-7
Armijo: th(6.204771907291826E-7)=-16.544525352311027; dx=-0.003450742382519466 evalInputDelta=-9.019252260600297E-7
WOLFE (weak): th(3.877982442057391E-7)=-16.544526254236253; dx=-0.003450735257356225 evalInputDelta=0.0
WOLFE (weak): th(5.041377174674609E-7)=-16.544526254236253; dx=-0.0034508702870843936 evalInputDelta=0.0
Armijo: th(5.623074540983217E-7)=-16.544526254236253; dx=-0.0034507791231678368 evalInputDelta=0.0
Armijo: th(5.332225857828913E-7)=-16.544526254236253; dx=-0.0034506914874899027 evalInputDelta=0.0
Armijo: th(5.186801516251761E-7)=-16.544526254236253; dx=-0.003450783651583492 evalInputDelta=0.0
WOLFE (weak): th(5.114089345463185E-7)=-16.544526254236253; dx=-0.0034507850812420275 evalInputDelta=0.0
Armijo: th(5.150445430857473E-7)=-16.544526254236253; dx=-0.00345070142861349 evalInputDelta=0.0
WOLFE (weak): th(5.132267388160328E-7)=-16.544526254236253; dx=-0.003450783168100811 evalInputDelta=0.0
WOLFE (weak): th(5.141356409508901E-7)=-16.544526254236253; dx=-0.0034507523669429357 evalInputDelta=0.0
WOLFE (weak): th(5.145900920183187E-7)=-16.544526254236253; dx=-0.0034507720156861186 evalInputDelta=0.0
Armijo: th(5.14817317552033E-7)=-16.544526254236253; dx=-0.0034507736192339114 evalInputDelta=0.0
WOLFE (weak): th(5.147037047851758E-7)=-16.544526254236253; dx=-0.0034507472694946207 evalInputDelta=0.0
WOLFE (weak): th(5.147605111686044E-7)=-16.544526254236253; dx=-0.0034508336873428328 evalInputDelta=0.0
Armijo: th(5.147889143603187E-7)=-16.544526254236253; dx=-0.003450780286074592 evalInputDelta=0.0
WOLFE (weak): th(5.147747127644615E-7)=-16.544526254236253; dx=-0.0034508676914660258 evalInputDelta=0.0
Armijo: th(5.147818135623901E-7)=-16.544526254236253; dx=-0.0034506787198586965 evalInputDelta=0.0
WOLFE (weak): th(5.147782631634259E-7)=-16.544526254236253; dx=-0.0034507724241520338 evalInputDelta=0.0
mu ~= nu (5.147782631634259E-7): th(0.0)=-16.544526254236253
Fitness changed from -16.544526254236253 to -16.544526254236253
Static Iteration Total: 33.0509; Orientation: 0.0207; Line Search: 30.8708
Iteration 9 failed. Error: -16.544526254236253
Previous Error: 0.0 -> -16.544526254236253
Optimization terminated 9
Final threshold in iteration 9: -16.544526254236253 (> -Infinity) after 107.652s (< 3600.000s)

Returns

    -16.544526254236253