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 110.75 seconds (1.369 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: 47247421389300
Reset training subject: 47249887774600
Adding measurement 675d0ac3 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-48.149896186361865;dx=-1.6244747417662934E-6
New Minimum: -48.149896186361865 > -48.14989800260528
END: th(2.154434690031884)=-48.14989800260528; dx=-1.2531538465158657E-6 evalInputDelta=1.816243418772956E-6
Fitness changed from -48.149896186361865 to -48.14989800260528
Iteration 1 complete. Error: -48.14989800260528 Total: 11.5427; Orientation: 0.0607; Line Search: 4.5773
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/817266a1-6117-4173-b109-22b1c172cb28.jpg)
Adding measurement 794151e8 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-48.14989800260528;dx=-1.239018650378043E-6
New Minimum: -48.14989800260528 > -48.14990526757827
WOLFE (weak): th(4.641588833612779)=-48.14990526757827; dx=-1.2344441820618778E-6 evalInputDelta=7.26497298586537E-6
New Minimum: -48.14990526757827 > -48.14991253255016
WOLFE (weak): th(9.283177667225559)=-48.14991253255016; dx=-1.2341008921090257E-6 evalInputDelta=1.4529944877494927E-5
New Minimum: -48.14991253255016 > -48.14993614370123
WOLFE (weak): th(27.849533001676676)=-48.14993614370123; dx=-1.233627705125472E-6 evalInputDelta=3.814109594912907E-5
New Minimum: -48.14993614370123 > -48.15004693433242
WOLFE (weak): th(111.3981320067067)=-48.15004693433242; dx=-1.2317177638577244E-6 evalInputDelta=1.489317271392565E-4
New Minimum: -48.15004693433242 > -48.150642656634446
WOLFE (weak): th(556.9906600335335)=-48.150642656634446; dx=-1.2320277326310358E-6 evalInputDelta=7.446540291624615E-4
New Minimum: -48.150642656634446 > -48.15436393797659
WOLFE (weak): th(3341.9439602012008)=-48.15436393797659; dx=-1.2320928494565125E-6 evalInputDelta=0.004465935371307239
New Minimum: -48.15436393797659 > -48.181147227128285
WOLFE (weak): th(23393.607721408407)=-48.181147227128285; dx=-1.2311197536021277E-6 evalInputDelta=0.03124922452300183
New Minimum: -48.181147227128285 > -48.39851918519762
WOLFE (weak): th(187148.86177126726)=-48.39851918519762; dx=-1.2149185211132832E-6 evalInputDelta=0.24862118259233768
New Minimum: -48.39851918519762 > -50.255303983156615
END: th(1684339.7559414054)=-50.255303983156615; dx=-1.076506022311928E-6 evalInputDelta=2.105405980551332
Fitness changed from -48.14989800260528 to -50.255303983156615
Iteration 2 complete. Error: -50.255303983156615 Total: 26.2010; Orientation: 0.0648; Line Search: 23.5599
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/376ffd91-573c-423d-95b6-f74898198d69.jpg)
Adding measurement 64399350 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-50.255303983156615;dx=-1.0852385585646367E-6
New Minimum: -50.255303983156615 > -53.83738838432292
END: th(3628800.0000000005)=-53.83738838432292; dx=-8.066651284525136E-7 evalInputDelta=3.5820844011663056
Fitness changed from -50.255303983156615 to -53.83738838432292
Iteration 3 complete. Error: -53.83738838432292 Total: 7.3792; Orientation: 0.0616; Line Search: 4.5034
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/317ea667-41bd-4ca3-8c8d-f510898b1a23.jpg)
Adding measurement 6483d061 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.547e+04, gradient 8.807e-04, dot -0.884; [7f0e8850-3228-4ecf-b2d8-7f766f5e7739 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -53.83738838432292, -50.255303983156615, -48.14989800260528, -48.149896186361865
LBFGS Accumulation History: 3 points
Removed measurement 6483d061 to history. Total: 3
th(0)=-53.83738838432292;dx=-7.752925887113584E-7
New Minimum: -53.83738838432292 > -59.23693472475342
END: th(7818012.603187701)=-59.23693472475342; dx=-5.320605521862078E-7 evalInputDelta=5.399546340430497
Fitness changed from -53.83738838432292 to -59.23693472475342
Iteration 4 complete. Error: -59.23693472475342 Total: 8.2865; Orientation: 1.0618; Line Search: 4.5819
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/d052c21a-afdc-4043-9ce4-689094221ebe.jpg)
Adding measurement 4d64a37d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.453e+04, gradient 7.475e-04, dot -0.770; [7f0e8850-3228-4ecf-b2d8-7f766f5e7739 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -59.23693472475342, -50.255303983156615, -48.14989800260528, -48.149896186361865
LBFGS Accumulation History: 3 points
Removed measurement 4d64a37d to history. Total: 3
th(0)=-59.23693472475342;dx=-5.587386408691094E-7
New Minimum: -59.23693472475342 > -66.77472963765183
END: th(1.6843397559414055E7)=-66.77472963765183; dx=-3.160315247328848E-7 evalInputDelta=7.537794912898413
Fitness changed from -59.23693472475342 to -66.77472963765183
Iteration 5 complete. Error: -66.77472963765183 Total: 8.5286; Orientation: 1.0337; Line Search: 4.6116
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/00bc580b-b05b-476e-9831-93f58abc1563.jpg)
Adding measurement 4bea09fc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.915e+04, gradient 6.774e-04, dot -0.618; [7f0e8850-3228-4ecf-b2d8-7f766f5e7739 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -66.77472963765183, -50.255303983156615, -48.14989800260528, -48.149896186361865
LBFGS Accumulation History: 3 points
Removed measurement 4bea09fc to history. Total: 3
th(0)=-66.77472963765183;dx=-4.578017261726824E-7
New Minimum: -66.77472963765183 > -75.05750748947135
END: th(3.628800000000001E7)=-75.05750748947135; dx=-9.439342862846763E-8 evalInputDelta=8.282777851819517
Fitness changed from -66.77472963765183 to -75.05750748947135
Iteration 6 complete. Error: -75.05750748947135 Total: 8.1632; Orientation: 1.0516; Line Search: 4.4890
Adding measurement 2d92d5c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.032e+04, gradient 8.195e-04, dot -0.303; [7f0e8850-3228-4ecf-b2d8-7f766f5e7739 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -75.05750748947135, -50.255303983156615, -48.14989800260528, -48.149896186361865
LBFGS Accumulation History: 3 points
Removed measurement 2d92d5c to history. Total: 3
th(0)=-75.05750748947135;dx=-6.701752541144767E-7
Armijo: th(7.818012603187701E7)=-70.44663426205607; dx=1.398325622929351E-7 evalInputDelta=-4.610873227415283
New Minimum: -75.05750748947135 > -78.08224373849343
WOLF (strong): th(3.9090063015938506E7)=-78.08224373849343; dx=1.678815105023254E-7 evalInputDelta=3.0247362490220837
New Minimum: -78.08224373849343 > -80.64480222642958
END: th(1.3030021005312836E7)=-80.64480222642958; dx=-1.5561967431190434E-7 evalInputDelta=5.587294736958228
Fitness changed from -75.05750748947135 to -80.64480222642958
Iteration 7 complete. Error: -80.64480222642958 Total: 12.0677; Orientation: 0.9885; Line Search: 8.8844
Adding measurement cda568c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.344e+04, gradient 5.812e-04, dot -0.536; [7f0e8850-3228-4ecf-b2d8-7f766f5e7739 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -80.64480222642958, -50.255303983156615, -48.14989800260528, -48.149896186361865
LBFGS Accumulation History: 3 points
Removed measurement cda568c to history. Total: 3
th(0)=-80.64480222642958;dx=-3.3718361456070996E-7
New Minimum: -80.64480222642958 > -85.50958458788635
END: th(2.8072329265690096E7)=-85.50958458788635; dx=-5.3946323759193175E-8 evalInputDelta=4.864782361456776
Fitness changed from -80.64480222642958 to -85.50958458788635
Iteration 8 complete. Error: -85.50958458788635 Total: 7.9814; Orientation: 0.9866; Line Search: 4.6782
Adding measurement ca6fd56 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.600e+04, gradient 7.062e-04, dot -0.379; [7f0e8850-3228-4ecf-b2d8-7f766f5e7739 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -85.50958458788635, -50.255303983156615, -48.14989800260528, -48.149896186361865
LBFGS Accumulation History: 3 points
Removed measurement ca6fd56 to history. Total: 3
th(0)=-85.50958458788635;dx=-4.975644386694771E-7
Armijo: th(6.048000000000002E7)=-82.7517552995944; dx=1.352973382476315E-7 evalInputDelta=-2.7578292882919584
New Minimum: -85.50958458788635 > -88.1412501604389
WOLF (strong): th(3.024000000000001E7)=-88.1412501604389; dx=1.301109165896326E-7 evalInputDelta=2.6316655725525493
New Minimum: -88.1412501604389 > -89.08589036892302
END: th(1.0080000000000004E7)=-89.08589036892302; dx=-1.7287476724994356E-7 evalInputDelta=3.576305781036666
Fitness changed from -85.50958458788635 to -89.08589036892302
Iteration 9 complete. Error: -89.08589036892302 Total: 12.1597; Orientation: 1.0086; Line Search: 9.0023
Adding measurement 57ca14f5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.605e+04, gradient 4.783e-04, dot -0.614; [7f0e8850-3228-4ecf-b2d8-7f766f5e7739 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -89.08589036892302, -50.255303983156615, -48.14989800260528, -48.149896186361865
LBFGS Accumulation History: 3 points
Removed measurement 57ca14f5 to history. Total: 3
th(0)=-89.08589036892302;dx=-2.280162522128465E-7
New Minimum: -89.08589036892302 > -92.74799117279845
END: th(2.1716701675521396E7)=-92.74799117279845; dx=-1.2135283666727337E-7 evalInputDelta=3.6621008038754326
Fitness changed from -89.08589036892302 to -92.74799117279845
Iteration 10 complete. Error: -92.74799117279845 Total: 7.9274; Orientation: 0.9950; Line Search: 4.4469
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/24fd087f-87b5-4f4d-91f4-e8d0cdcb1076.jpg)
Final threshold in iteration 11: -92.74799117279845 (> -Infinity) after 110.750s (< 5400.000s)

Returns

    -92.74799117279845