Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Iteration 15 Iteration 15

BasicOptimizer.scala:89 executed in 7.58 seconds (0.000 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: 164640742069200
Reset training subject: 164640868591800
Adding measurement 11e9275f to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-16.72231817939632;dx=-0.05306770148820792
New Minimum: -16.72231817939632 > -16.821541662880236
WOLFE (weak): th(2.154434690031884)=-16.821541662880236; dx=-0.053348088405979065 evalInputDelta=0.09922348348391452
New Minimum: -16.821541662880236 > -16.921152707057132
WOLFE (weak): th(4.308869380063768)=-16.921152707057132; dx=-0.05308349082340377 evalInputDelta=0.19883452766081078
New Minimum: -16.921152707057132 > -17.328319606943733
WOLFE (weak): th(12.926608140191302)=-17.328319606943733; dx=-0.0535139088456955 evalInputDelta=0.6060014275474117
New Minimum: -17.328319606943733 > -19.271536533481914
WOLFE (weak): th(51.70643256076521)=-19.271536533481914; dx=-0.053518617114796746 evalInputDelta=2.5492183540855926
New Minimum: -19.271536533481914 > -31.565015756792558
WOLFE (weak): th(258.53216280382605)=-31.565015756792558; dx=-0.049524533064923604 evalInputDelta=14.842697577396237
New Minimum: -31.565015756792558 > -68.11216550546422
END: th(1551.1929768229563)=-68.11216550546422; dx=-0.0071700157199874135 evalInputDelta=51.389847326067894
Fitness changed from -16.72231817939632 to -68.11216550546422
Iteration 1 complete. Error: -68.11216550546422 Total: 1.1112; Orientation: 0.0016; Line Search: 0.7664
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/fee8c8a0-8538-497b-927f-222e1ce31e01.jpg)
Adding measurement 10c1572c to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-68.11216550546422;dx=-0.11526304591899764
Armijo: th(3341.943960201201)=-46.132240285401274; dx=6.053244270716598E-5 evalInputDelta=-21.979925220062945
New Minimum: -68.11216550546422 > -75.12480501222616
WOLF (strong): th(1670.9719801006006)=-75.12480501222616; dx=0.008266142150283956 evalInputDelta=7.012639506761943
New Minimum: -75.12480501222616 > -110.27209334329561
END: th(556.9906600335336)=-110.27209334329561; dx=-0.016874559917500868 evalInputDelta=42.15992783783139
Fitness changed from -68.11216550546422 to -110.27209334329561
Iteration 2 complete. Error: -110.27209334329561 Total: 0.5690; Orientation: 0.0013; Line Search: 0.4482
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/4a0287ac-bdf5-456c-9203-bd118fbabb92.jpg)
Adding measurement 694120ef to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-110.27209334329561;dx=-0.08674050072382404
New Minimum: -110.27209334329561 > -132.2380148751674
WOLF (strong): th(1200.0000000000002)=-132.2380148751674; dx=0.001705946547152156 evalInputDelta=21.9659215318718
New Minimum: -132.2380148751674 > -148.164663729666
END: th(600.0000000000001)=-148.164663729666; dx=-0.023114537435866327 evalInputDelta=37.89257038637038
Fitness changed from -110.27209334329561 to -148.164663729666
Iteration 3 complete. Error: -148.164663729666 Total: 0.4633; Orientation: 0.0016; Line Search: 0.3450
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/3f130b97-14ba-4e7e-9b22-3487a7b84613.jpg)
Adding measurement 15c61d9a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.587e+02, gradient 2.480e-01, dot -0.508; [41f5cd7f-4301-4143-812e-51dbf09ac9c1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -148.164663729666, -110.27209334329561, -68.11216550546422, -16.72231817939632
LBFGS Accumulation History: 3 points
Removed measurement 15c61d9a to history. Total: 3
th(0)=-148.164663729666;dx=-0.06077422407408937
New Minimum: -148.164663729666 > -175.51711544034674
END: th(1292.6608140191306)=-175.51711544034674; dx=-0.0068358150217762564 evalInputDelta=27.352451710680754
Fitness changed from -148.164663729666 to -175.51711544034674
Iteration 4 complete. Error: -175.51711544034674 Total: 0.3668; Orientation: 0.0306; Line Search: 0.2219
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/e8ed9ad5-9f81-49e3-a722-f53cb5fab391.jpg)
Adding measurement 5a81d369 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.553e+03, gradient 3.103e-01, dot -0.394; [41f5cd7f-4301-4143-812e-51dbf09ac9c1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -175.51711544034674, -110.27209334329561, -68.11216550546422, -16.72231817939632
LBFGS Accumulation History: 3 points
Removed measurement 5a81d369 to history. Total: 3
th(0)=-175.51711544034674;dx=-0.09534026233864068
Armijo: th(2784.953300167668)=-123.1031071906798; dx=0.004616323158531156 evalInputDelta=-52.41400824966695
New Minimum: -175.51711544034674 > -190.39142452130034
WOLF (strong): th(1392.476650083834)=-190.39142452130034; dx=0.020701457356039236 evalInputDelta=14.874309080953594
New Minimum: -190.39142452130034 > -220.8022128229244
END: th(464.158883361278)=-220.8022128229244; dx=-0.03132458801169073 evalInputDelta=45.285097382577646
Fitness changed from -175.51711544034674 to -220.8022128229244
Iteration 5 complete. Error: -220.8022128229244 Total: 0.5880; Orientation: 0.0267; Line Search: 0.4424
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/b85fc728-a713-4461-9d95-cfecf830ad9b.jpg)
Adding measurement 71f35b97 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.267e+03, gradient 2.211e-01, dot -0.520; [41f5cd7f-4301-4143-812e-51dbf09ac9c1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -220.8022128229244, -110.27209334329561, -68.11216550546422, -16.72231817939632
LBFGS Accumulation History: 3 points
Removed measurement 71f35b97 to history. Total: 3
th(0)=-220.8022128229244;dx=-0.04807747867560421
New Minimum: -220.8022128229244 > -257.8340066787157
END: th(1000.0000000000003)=-257.8340066787157; dx=-0.019163684676551197 evalInputDelta=37.03179385579131
Fitness changed from -220.8022128229244 to -257.8340066787157
Iteration 6 complete. Error: -257.8340066787157 Total: 0.3690; Orientation: 0.0289; Line Search: 0.2214
Adding measurement 7f417de6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.195e+03, gradient 2.471e-01, dot -0.512; [41f5cd7f-4301-4143-812e-51dbf09ac9c1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -257.8340066787157, -110.27209334329561, -68.11216550546422, -16.72231817939632
LBFGS Accumulation History: 3 points
Removed measurement 7f417de6 to history. Total: 3
th(0)=-257.8340066787157;dx=-0.05989699893489732
New Minimum: -257.8340066787157 > -273.11477383601937
END: th(2154.4346900318847)=-273.11477383601937; dx=-1.1573943793746896E-5 evalInputDelta=15.280767157303671
Fitness changed from -257.8340066787157 to -273.11477383601937
Iteration 7 complete. Error: -273.11477383601937 Total: 0.3581; Orientation: 0.0269; Line Search: 0.2215
Adding measurement 145eb6b0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.920e+03, gradient 3.459e-01, dot -0.326; [41f5cd7f-4301-4143-812e-51dbf09ac9c1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -273.11477383601937, -110.27209334329561, -68.11216550546422, -16.72231817939632
LBFGS Accumulation History: 3 points
Removed measurement 145eb6b0 to history. Total: 3
th(0)=-273.11477383601937;dx=-0.11750528062366791
Armijo: th(4641.588833612781)=-143.6948399604175; dx=0.006525776297893785 evalInputDelta=-129.41993387560186
New Minimum: -273.11477383601937 > -275.7434694376278
WOLF (strong): th(2320.7944168063905)=-275.7434694376278; dx=0.021398588544494904 evalInputDelta=2.628695601608456
New Minimum: -275.7434694376278 > -351.5021892712761
END: th(773.5981389354635)=-351.5021892712761; dx=-0.02698358757011249 evalInputDelta=78.38741543525674
Fitness changed from -273.11477383601937 to -351.5021892712761
Iteration 8 complete. Error: -351.5021892712761 Total: 0.5798; Orientation: 0.0282; Line Search: 0.4459
Adding measurement 60198c44 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.123e+03, gradient 2.245e-01, dot -0.492; [41f5cd7f-4301-4143-812e-51dbf09ac9c1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -351.5021892712761, -110.27209334329561, -68.11216550546422, -16.72231817939632
LBFGS Accumulation History: 3 points
Removed measurement 60198c44 to history. Total: 3
th(0)=-351.5021892712761;dx=-0.04703886579353009
New Minimum: -351.5021892712761 > -410.26300634471056
END: th(1666.6666666666674)=-410.26300634471056; dx=-0.016496771716579546 evalInputDelta=58.76081707343445
Fitness changed from -351.5021892712761 to -410.26300634471056
Iteration 9 complete. Error: -410.26300634471056 Total: 0.3647; Orientation: 0.0282; Line Search: 0.2245
Adding measurement 74896051 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.396e+04, gradient 2.404e-01, dot -0.500; [41f5cd7f-4301-4143-812e-51dbf09ac9c1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -410.26300634471056, -110.27209334329561, -68.11216550546422, -16.72231817939632
LBFGS Accumulation History: 3 points
Removed measurement 74896051 to history. Total: 3
th(0)=-410.26300634471056;dx=-0.05595562147010933
New Minimum: -410.26300634471056 > -424.1367888134676
WOLF (strong): th(3590.7244833864747)=-424.1367888134676; dx=0.003043805621832745 evalInputDelta=13.873782468757042
New Minimum: -424.1367888134676 > -459.2847360298402
END: th(1795.3622416932374)=-459.2847360298402; dx=-0.00971950035021112 evalInputDelta=49.02172968512963
Fitness changed from -410.26300634471056 to -459.2847360298402
Iteration 10 complete. Error: -459.2847360298402 Total: 0.4652; Orientation: 0.0277; Line Search: 0.3307
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/a1676255-3d87-4453-aa22-54d3feb7cfdc.jpg)
Adding measurement 42229d74 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.649e+04, gradient 2.400e-01, dot -0.472; [41f5cd7f-4301-4143-812e-51dbf09ac9c1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -459.2847360298402, -110.27209334329561, -68.11216550546422, -16.72231817939632
LBFGS Accumulation History: 3 points
Removed measurement 42229d74 to history. Total: 3
th(0)=-459.2847360298402;dx=-0.05623655477850238
New Minimum: -459.2847360298402 > -473.6965669075511
WOLF (strong): th(3867.990694677318)=-473.6965669075511; dx=0.008510408177796526 evalInputDelta=14.411830877710884
New Minimum: -473.6965669075511 > -524.47804410671
END: th(1933.995347338659)=-524.47804410671; dx=-0.004127943130642749 evalInputDelta=65.19330807686976
Fitness changed from -459.2847360298402 to -524.47804410671
Iteration 11 complete. Error: -524.47804410671 Total: 0.4789; Orientation: 0.0279; Line Search: 0.3308
Adding measurement 26137063 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.147e+04, gradient 2.687e-01, dot -0.486; [41f5cd7f-4301-4143-812e-51dbf09ac9c1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -524.47804410671, -110.27209334329561, -68.11216550546422, -16.72231817939632
LBFGS Accumulation History: 3 points
Removed measurement 26137063 to history. Total: 3
th(0)=-524.47804410671;dx=-0.07072967318265846
Armijo: th(4166.66666666667)=-459.93679932682056; dx=0.010781236214930542 evalInputDelta=-64.54124477988938
New Minimum: -524.47804410671 > -569.0610687790899
WOLF (strong): th(2083.333333333335)=-569.0610687790899; dx=0.0030250281618354516 evalInputDelta=44.583024672379906
END: th(694.4444444444449)=-568.6360325375099; dx=-0.036532191533525084 evalInputDelta=44.157988430799946
Fitness changed from -524.47804410671 to -569.0610687790899
Iteration 12 complete. Error: -569.0610687790899 Total: 0.5748; Orientation: 0.0274; Line Search: 0.4428
Adding measurement 23a2a21 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.511e+04, gradient 2.783e-01, dot -0.409; [41f5cd7f-4301-4143-812e-51dbf09ac9c1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -569.0610687790899, -110.27209334329561, -68.11216550546422, -16.72231817939632
LBFGS Accumulation History: 3 points
Removed measurement 23a2a21 to history. Total: 3
th(0)=-569.0610687790899;dx=-0.07599730853295333
New Minimum: -569.0610687790899 > -649.9801679666849
END: th(1496.1352014110314)=-649.9801679666849; dx=-0.012524444499129123 evalInputDelta=80.91909918759507
Fitness changed from -569.0610687790899 to -649.9801679666849
Iteration 13 complete. Error: -649.9801679666849 Total: 0.3573; Orientation: 0.0300; Line Search: 0.2206
Adding measurement 425fc442 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.205e+06, gradient 2.181e-01, dot -0.588; [41f5cd7f-4301-4143-812e-51dbf09ac9c1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -649.9801679666849, -110.27209334329561, -68.11216550546422, -16.72231817939632
LBFGS Accumulation History: 3 points
Removed measurement 425fc442 to history. Total: 3
th(0)=-649.9801679666849;dx=-0.04651423728776031
New Minimum: -649.9801679666849 > -708.8827917928323
END: th(3223.3255788977654)=-708.8827917928323; dx=-0.007033624311587674 evalInputDelta=58.90262382614742
Fitness changed from -649.9801679666849 to -708.8827917928323
Iteration 14 complete. Error: -708.8827917928323 Total: 0.3516; Orientation: 0.0282; Line Search: 0.2179
Adding measurement 3a7e605c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.885e+05, gradient 2.684e-01, dot -0.450; [41f5cd7f-4301-4143-812e-51dbf09ac9c1 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -708.8827917928323, -110.27209334329561, -68.11216550546422, -16.72231817939632
LBFGS Accumulation History: 3 points
Removed measurement 3a7e605c to history. Total: 3
th(0)=-708.8827917928323;dx=-0.0698638895003896
Armijo: th(6944.44444444445)=-653.6193464089018; dx=0.013408025760167136 evalInputDelta=-55.2634453839305
New Minimum: -708.8827917928323 > -784.3857867784194
WOLF (strong): th(3472.222222222225)=-784.3857867784194; dx=0.007945434681774298 evalInputDelta=75.50299498558707
New Minimum: -784.3857867784194 > -785.5481764347747
END: th(1157.4074074074083)=-785.5481764347747; dx=-0.029530468940020708 evalInputDelta=76.66538464194241
Fitness changed from -708.8827917928323 to -785.5481764347747
Iteration 15 complete. Error: -785.5481764347747 Total: 0.5690; Orientation: 0.0266; Line Search: 0.4348
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/9d221d6f-7de2-42ab-b12c-3a69ff76a448.jpg)
Final threshold in iteration 16: -785.5481764347747 (> -Infinity) after 7.578s (< 5400.000s)

Returns

    -785.5481764347747