Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

BasicOptimizer.scala:89 executed in 155.21 seconds (1.612 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: 6104639208257
Reset training subject: 6106309071319
Adding measurement 30e1fdd5 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-2.1343119853454726;dx=-1.3269060068445423E-5
New Minimum: -2.1343119853454726 > -2.1343134734690574
WOLFE (weak): th(2.154434690031884)=-2.1343134734690574; dx=-1.3186210865378412E-5 evalInputDelta=1.4881235848029917E-6
New Minimum: -2.1343134734690574 > -2.134314465550871
WOLFE (weak): th(4.308869380063768)=-2.134314465550871; dx=-1.3331382161785917E-5 evalInputDelta=2.480205398391888E-6
New Minimum: -2.134314465550871 > -2.1343180618435795
WOLFE (weak): th(12.926608140191302)=-2.1343180618435795; dx=-1.3122869478002716E-5 evalInputDelta=6.076498106910577E-6
New Minimum: -2.1343180618435795 > -2.13433691127866
WOLFE (weak): th(51.70643256076521)=-2.13433691127866; dx=-1.3183211877174983E-5 evalInputDelta=2.4925933187258664E-5
New Minimum: -2.13433691127866 > -2.1344397121758396
WOLFE (weak): th(258.53216280382605)=-2.1344397121758396; dx=-1.3206975917122915E-5 evalInputDelta=1.2772683036699206E-4
New Minimum: -2.1344397121758396 > -2.1350565375809856
WOLFE (weak): th(1551.1929768229563)=-2.1350565375809856; dx=-1.3165633685665732E-5 evalInputDelta=7.445522355129519E-4
New Minimum: -2.1350565375809856 > -2.1394908226259224
WOLFE (weak): th(10858.350837760694)=-2.1394908226259224; dx=-1.2483190980814827E-5 evalInputDelta=0.005178837280449766
New Minimum: -2.1394908226259224 > -2.184830548190172
END: th(86866.80670208555)=-2.184830548190172; dx=-7.179355170576282E-6 evalInputDelta=0.05051856284469958
Fitness changed from -2.1343119853454726 to -2.184830548190172
Iteration 1 complete. Error: -2.184830548190172 Total: 18.4077; Orientation: 0.0169; Line Search: 13.7983
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/55903935-3610-487c-bac5-234f9aab1eab.jpg)
Adding measurement 47fcdd15 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-2.184830548190172;dx=-1.2250870881407492E-5
Armijo: th(187148.86177126726)=-2.1702050737669594; dx=-4.156562018754211E-6 evalInputDelta=-0.014625474423212825
New Minimum: -2.184830548190172 > -2.1997626001034343
END: th(93574.43088563363)=-2.1997626001034343; dx=-7.359175142830341E-6 evalInputDelta=0.014932051913262079
Fitness changed from -2.184830548190172 to -2.1997626001034343
Iteration 2 complete. Error: -2.1997626001034343 Total: 6.0562; Orientation: 0.0178; Line Search: 4.1748
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/a614c15f-babe-483b-ad9e-e18c813f75c6.jpg)
Adding measurement 634eb881 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-2.1997626001034343;dx=-1.3799578410878243E-5
New Minimum: -2.1997626001034343 > -2.2235292799511024
END: th(201600.00000000003)=-2.2235292799511024; dx=-3.8068009848755084E-6 evalInputDelta=0.023766679847668115
Fitness changed from -2.1997626001034343 to -2.2235292799511024
Iteration 3 complete. Error: -2.2235292799511024 Total: 4.4161; Orientation: 0.0199; Line Search: 2.7269
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/ba05300c-9718-4f17-b002-902ba03bc108.jpg)
Adding measurement 4833a3aa to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.127e+03, gradient 3.667e-03, dot -0.317; [ee33e8e8-54ef-4f05-b1fd-3e9cd18e767d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.2235292799511024, -2.1997626001034343, -2.184830548190172, -2.1343119853454726
LBFGS Accumulation History: 3 points
Removed measurement 4833a3aa to history. Total: 3
th(0)=-2.2235292799511024;dx=-1.321734772010239E-5
Armijo: th(434334.03351042786)=-2.215259332383708; dx=-1.5255565716209035E-6 evalInputDelta=-0.008269947567394187
Armijo: th(217167.01675521393)=-2.2130824324433975; dx=-3.87891754836506E-6 evalInputDelta=-0.01044684750770486
New Minimum: -2.2235292799511024 > -2.236426761348664
END: th(72389.00558507131)=-2.236426761348664; dx=-8.732627389721732E-6 evalInputDelta=0.012897481397561528
Fitness changed from -2.2235292799511024 to -2.236426761348664
Iteration 4 complete. Error: -2.236426761348664 Total: 7.8777; Orientation: 0.5118; Line Search: 5.7878
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/49782b15-92da-41a6-a5b8-e260f55d33b5.jpg)
Adding measurement 6bd14238 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.578e+03, gradient 3.528e-03, dot -0.337; [ee33e8e8-54ef-4f05-b1fd-3e9cd18e767d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.236426761348664, -2.1997626001034343, -2.184830548190172, -2.1343119853454726
LBFGS Accumulation History: 3 points
Removed measurement 6bd14238 to history. Total: 3
th(0)=-2.236426761348664;dx=-1.2168784887238402E-5
New Minimum: -2.236426761348664 > -2.247572228994728
END: th(155957.38480938942)=-2.247572228994728; dx=-5.35000093107964E-6 evalInputDelta=0.011145467646064056
Fitness changed from -2.236426761348664 to -2.247572228994728
Iteration 5 complete. Error: -2.247572228994728 Total: 4.8513; Orientation: 0.5401; Line Search: 2.7051
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/f8645daa-99b7-4080-ae38-b72cbf002706.jpg)
Adding measurement 6039694d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.394e+03, gradient 3.569e-03, dot -0.287; [ee33e8e8-54ef-4f05-b1fd-3e9cd18e767d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.247572228994728, -2.1997626001034343, -2.184830548190172, -2.1343119853454726
LBFGS Accumulation History: 3 points
Removed measurement 6039694d to history. Total: 3
th(0)=-2.247572228994728;dx=-1.2523593618382926E-5
Armijo: th(336000.0000000001)=-2.168022123447944; dx=-2.4751507201811973E-6 evalInputDelta=-0.07955010554678399
Armijo: th(168000.00000000006)=-2.2474717764628633; dx=-5.221273951746877E-6 evalInputDelta=-1.0045253186463654E-4
New Minimum: -2.247572228994728 > -2.2478662594299883
END: th(56000.00000000002)=-2.2478662594299883; dx=-9.211167700629862E-6 evalInputDelta=2.9403043526032846E-4
Fitness changed from -2.247572228994728 to -2.2478662594299883
Iteration 6 complete. Error: -2.2478662594299883 Total: 7.3950; Orientation: 0.5107; Line Search: 5.3377
Adding measurement 50d13d9b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.932e+03, gradient 3.472e-03, dot -0.308; [ee33e8e8-54ef-4f05-b1fd-3e9cd18e767d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.2478662594299883, -2.1997626001034343, -2.184830548190172, -2.1343119853454726
LBFGS Accumulation History: 3 points
Removed measurement 50d13d9b to history. Total: 3
th(0)=-2.2478662594299883;dx=-1.1792983238638391E-5
New Minimum: -2.2478662594299883 > -2.2550599659731962
END: th(120648.34264178554)=-2.2550599659731962; dx=-6.654640116065815E-6 evalInputDelta=0.007193706543207945
Fitness changed from -2.2478662594299883 to -2.2550599659731962
Iteration 7 complete. Error: -2.2550599659731962 Total: 4.5724; Orientation: 0.4989; Line Search: 2.6391
Adding measurement 6f642335 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.982e+03, gradient 3.556e-03, dot -0.292; [ee33e8e8-54ef-4f05-b1fd-3e9cd18e767d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.2550599659731962, -2.1997626001034343, -2.184830548190172, -2.1343119853454726
LBFGS Accumulation History: 3 points
Removed measurement 6f642335 to history. Total: 3
th(0)=-2.2550599659731962;dx=-1.2402165971627032E-5
Armijo: th(259928.97468231575)=-2.158021407228081; dx=-3.5549718257843737E-6 evalInputDelta=-0.09703855874511547
Armijo: th(129964.48734115787)=-2.237002213909597; dx=-6.6319726366861175E-6 evalInputDelta=-0.018057752063599164
New Minimum: -2.2550599659731962 > -2.2606195102445983
END: th(43321.49578038596)=-2.2606195102445983; dx=-9.787421028880377E-6 evalInputDelta=0.005559544271402039
Fitness changed from -2.2550599659731962 to -2.2606195102445983
Iteration 8 complete. Error: -2.2606195102445983 Total: 7.0417; Orientation: 0.4847; Line Search: 5.2904
Adding measurement 4dead11e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.161e+03, gradient 3.492e-03, dot -0.300; [ee33e8e8-54ef-4f05-b1fd-3e9cd18e767d = 1.0

...skipping 666 bytes...

ed: LBFGS Orientation magnitude: 1.031e+04, gradient 3.566e-03, dot -0.289; [ee33e8e8-54ef-4f05-b1fd-3e9cd18e767d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.26962294608555, -2.1997626001034343, -2.184830548190172, -2.1343119853454726
LBFGS Accumulation History: 3 points
Removed measurement 2386d4c3 to history. Total: 3
th(0)=-2.26962294608555;dx=-1.2453289251081147E-5
Armijo: th(201080.5710696426)=-2.194815470105234; dx=-4.3701620023769815E-6 evalInputDelta=-0.0748074759803159
Armijo: th(100540.2855348213)=-2.241233981759836; dx=-7.398702399596097E-6 evalInputDelta=-0.028388964325714028
New Minimum: -2.26962294608555 > -2.2698412427270083
END: th(33513.428511607104)=-2.2698412427270083; dx=-1.0245979453389729E-5 evalInputDelta=2.182966414583376E-4
Fitness changed from -2.26962294608555 to -2.2698412427270083
Iteration 10 complete. Error: -2.2698412427270083 Total: 7.0818; Orientation: 0.4985; Line Search: 5.2467
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/c97cdfe9-3066-4dcd-bde8-c82067842331.jpg)
Adding measurement 35b00342 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.040e+04, gradient 3.427e-03, dot -0.297; [ee33e8e8-54ef-4f05-b1fd-3e9cd18e767d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.2698412427270083, -2.1997626001034343, -2.184830548190172, -2.1343119853454726
LBFGS Accumulation History: 3 points
Removed measurement 35b00342 to history. Total: 3
th(0)=-2.2698412427270083;dx=-1.1404347476636929E-5
Armijo: th(72202.49296730995)=-2.2503622615945567; dx=-8.281568745757356E-6 evalInputDelta=-0.01947898113245161
Armijo: th(36101.24648365498)=-2.2600957439477507; dx=-9.575597263250932E-6 evalInputDelta=-0.009745498779257566
Armijo: th(12033.748827884992)=-2.2679045262250486; dx=-1.0569681247302117E-5 evalInputDelta=-0.001936716501959701
Armijo: th(3008.437206971248)=-2.2694909317323178; dx=-1.120274127901102E-5 evalInputDelta=-3.5031099469051696E-4
Armijo: th(601.6874413942496)=-2.269794016867949; dx=-1.1324427322580165E-5 evalInputDelta=-4.722585905936327E-5
Armijo: th(100.28124023237494)=-2.269832847090544; dx=-1.1450102124883562E-5 evalInputDelta=-8.395636464264555E-6
Armijo: th(14.32589146176785)=-2.2698397268504995; dx=-1.1424160223800372E-5 evalInputDelta=-1.5158765087619486E-6
Armijo: th(1.7907364327209812)=-2.269841126121159; dx=-1.138455651808747E-5 evalInputDelta=-1.1660584942063679E-7
Armijo: th(0.1989707147467757)=-2.269840776303575; dx=-1.145266133448542E-5 evalInputDelta=-4.6642343320968394E-7
Armijo: th(0.01989707147467757)=-2.2698412427270083; dx=-1.1424397599050127E-5 evalInputDelta=0.0
Armijo: th(0.0018088246795161427)=-2.2698412427270083; dx=-1.1464359921759488E-5 evalInputDelta=0.0
Armijo: th(1.5073538995967855E-4)=-2.2698410095153037; dx=-1.1461780794532752E-5 evalInputDelta=-2.332117046144333E-7
WOLFE (weak): th(1.159502999689835E-5)=-2.2698412427270083; dx=-1.1399566644009282E-5 evalInputDelta=0.0
Armijo: th(8.116520997828845E-5)=-2.269841126121159; dx=-1.140551615966818E-5 evalInputDelta=-1.1660584942063679E-7
Armijo: th(4.63801199875934E-5)=-2.269841126121159; dx=-1.1442915913526764E-5 evalInputDelta=-1.1660584942063679E-7
Armijo: th(2.8987574992245876E-5)=-2.2698412427270083; dx=-1.1459903716897827E-5 evalInputDelta=0.0
Armijo: th(2.0291302494572115E-5)=-2.2698412427270083; dx=-1.1401761770190613E-5 evalInputDelta=0.0
WOLFE (weak): th(1.5943166245735233E-5)=-2.2698412427270083; dx=-1.1443395430477979E-5 evalInputDelta=0.0
WOLFE (weak): th(1.8117234370153672E-5)=-2.2698412427270083; dx=-1.1343166396263101E-5 evalInputDelta=0.0
WOLFE (weak): th(1.9204268432362893E-5)=-2.2698412427270083; dx=-1.1417429656926629E-5 evalInputDelta=0.0
Armijo: th(1.9747785463467504E-5)=-2.2698412427270083; dx=-1.1398434275500856E-5 evalInputDelta=0.0
Armijo: th(1.94760269479152E-5)=-2.2698412427270083; dx=-1.1471479461169403E-5 evalInputDelta=0.0
WOLFE (weak): th(1.9340147690139047E-5)=-2.2698412427270083; dx=-1.1374302806427825E-5 evalInputDelta=0.0
WOLFE (weak): th(1.9408087319027125E-5)=-2.2698412427270083; dx=-1.1391333440300329E-5 evalInputDelta=0.0
WOLFE (weak): th(1.9442057133471163E-5)=-2.2698412427270083; dx=-1.1454930349034152E-5 evalInputDelta=0.0
WOLFE (weak): th(1.9459042040693183E-5)=-2.2698412427270083; dx=-1.1423572270049594E-5 evalInputDelta=0.0
WOLFE (weak): th(1.9467534494304192E-5)=-2.2698412427270083; dx=-1.1484881881069127E-5 evalInputDelta=0.0
Armijo: th(1.9471780721109696E-5)=-2.2698412427270083; dx=-1.1466091332603103E-5 evalInputDelta=0.0
WOLFE (weak): th(1.9469657607706942E-5)=-2.2698412427270083; dx=-1.1337146095052568E-5 evalInputDelta=0.0
Armijo: th(1.9470719164408318E-5)=-2.2698412427270083; dx=-1.1436721720243607E-5 evalInputDelta=0.0
Armijo: th(1.947018838605763E-5)=-2.2698412427270083; dx=-1.1388355530533084E-5 evalInputDelta=0.0
WOLFE (weak): th(1.9469922996882286E-5)=-2.2698412427270083; dx=-1.1448222950428247E-5 evalInputDelta=0.0
WOLFE (weak): th(1.9470055691469958E-5)=-2.2698412427270083; dx=-1.1455151648519811E-5 evalInputDelta=0.0
mu ~= nu (1.9470055691469958E-5): th(0.0)=-2.2698412427270083
Fitness changed from -2.2698412427270083 to -2.2698412427270083
Static Iteration Total: 49.2738; Orientation: 0.5521; Line Search: 47.0717
Iteration 11 failed. Error: -2.2698412427270083
Previous Error: 0.0 -> -2.2698412427270083
Retrying iteration 11
Reset training subject: 6226110058778
Adding measurement 3947ab62 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-2.2698412427270083;dx=-1.1452570766295265E-5
WOLFE (weak): th(4.194710633946703E-5)=-2.2698412427270083; dx=-1.1410998743486528E-5 evalInputDelta=0.0
WOLFE (weak): th(8.389421267893405E-5)=-2.2698412427270083; dx=-1.1345579687702148E-5 evalInputDelta=0.0
Armijo: th(2.5168263803680214E-4)=-2.269841126121159; dx=-1.1499654126273742E-5 evalInputDelta=-1.1660584942063679E-7
Armijo: th(1.677884253578681E-4)=-2.2698410095153037; dx=-1.1364856990550337E-5 evalInputDelta=-2.332117046144333E-7
Armijo: th(1.2584131901840107E-4)=-2.2698410095153037; dx=-1.142064949099315E-5 evalInputDelta=-2.332117046144333E-7
Armijo: th(1.0486776584866756E-4)=-2.2698410095153037; dx=-1.1507812622485377E-5 evalInputDelta=-2.332117046144333E-7
WOLFE (weak): th(9.438098926380081E-5)=-2.2698412427270083; dx=-1.1447015365219414E-5 evalInputDelta=0.0
Armijo: th(9.96243775562342E-5)=-2.2698412427270083; dx=-1.1477783573089113E-5 evalInputDelta=0.0
Armijo: th(9.70026834100175E-5)=-2.2698412427270083; dx=-1.1426737793008178E-5 evalInputDelta=0.0
WOLFE (weak): th(9.569183633690917E-5)=-2.2698412427270083; dx=-1.1458176903868278E-5 evalInputDelta=0.0
WOLFE (weak): th(9.634725987346334E-5)=-2.2698412427270083; dx=-1.138543921059135E-5 evalInputDelta=0.0
WOLFE (weak): th(9.667497164174042E-5)=-2.2698412427270083; dx=-1.1494354177111052E-5 evalInputDelta=0.0
WOLFE (weak): th(9.683882752587895E-5)=-2.2698412427270083; dx=-1.1421519803918507E-5 evalInputDelta=0.0
WOLFE (weak): th(9.692075546794822E-5)=-2.2698412427270083; dx=-1.1365919593394997E-5 evalInputDelta=0.0
Armijo: th(9.696171943898287E-5)=-2.2698412427270083; dx=-1.1456900491286996E-5 evalInputDelta=0.0
Armijo: th(9.694123745346555E-5)=-2.2698412427270083; dx=-1.145457026383647E-5 evalInputDelta=0.0
WOLFE (weak): th(9.693099646070688E-5)=-2.2698412427270083; dx=-1.1366155086092358E-5 evalInputDelta=0.0
WOLFE (weak): th(9.693611695708621E-5)=-2.2698412427270083; dx=-1.140082694723177E-5 evalInputDelta=0.0
WOLFE (weak): th(9.693867720527588E-5)=-2.2698412427270083; dx=-1.147990012207899E-5 evalInputDelta=0.0
WOLFE (weak): th(9.693995732937071E-5)=-2.2698412427270083; dx=-1.14719334183004E-5 evalInputDelta=0.0
WOLFE (weak): th(9.694059739141813E-5)=-2.2698412427270083; dx=-1.1438327860653544E-5 evalInputDelta=0.0
mu ~= nu (9.694059739141813E-5): th(0.0)=-2.2698412427270083
Fitness changed from -2.2698412427270083 to -2.2698412427270083
Static Iteration Total: 33.7430; Orientation: 0.0181; Line Search: 31.1716
Iteration 12 failed. Error: -2.2698412427270083
Previous Error: 0.0 -> -2.2698412427270083
Optimization terminated 12
Final threshold in iteration 12: -2.2698412427270083 (> -Infinity) after 155.214s (< 3600.000s)

Returns

    -2.2698412427270083