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 300.40 seconds (6.660 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: 588097821534600
Reset training subject: 588103932298400
Adding measurement 443af41c to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-36.22922594276103;dx=-1.9689985055056068E-6
New Minimum: -36.22922594276103 > -36.22923011217088
END: th(2.154434690031884)=-36.22923011217088; dx=-1.7287552438207667E-6 evalInputDelta=4.169409848486794E-6
Fitness changed from -36.22922594276103 to -36.22923011217088
Iteration 1 complete. Error: -36.22923011217088 Total: 30.7012; Orientation: 0.1523; Line Search: 12.4574
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/32fe0536-7203-4fd0-87ad-848d0d82ac6d.jpg)
Adding measurement 189b68fb to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-36.22923011217088;dx=-1.7295918385945838E-6
New Minimum: -36.22923011217088 > -36.22923845098915
WOLFE (weak): th(4.641588833612779)=-36.22923845098915; dx=-1.7280165731671695E-6 evalInputDelta=8.338818268782688E-6
New Minimum: -36.22923845098915 > -36.2292467898055
WOLFE (weak): th(9.283177667225559)=-36.2292467898055; dx=-1.7273499617282648E-6 evalInputDelta=1.667763461909999E-5
New Minimum: -36.2292467898055 > -36.22928222975357
WOLFE (weak): th(27.849533001676676)=-36.22928222975357; dx=-1.7265932807517715E-6 evalInputDelta=5.211758269041411E-5
New Minimum: -36.22928222975357 > -36.22944066674455
WOLFE (weak): th(111.3981320067067)=-36.22944066674455; dx=-1.7258950931285594E-6 evalInputDelta=2.1055457366969677E-4
New Minimum: -36.22944066674455 > -36.2302828728027
WOLFE (weak): th(556.9906600335335)=-36.2302828728027; dx=-1.7253833938625112E-6 evalInputDelta=0.0010527606318149196
New Minimum: -36.2302828728027 > -36.235542048486806
WOLFE (weak): th(3341.9439602012008)=-36.235542048486806; dx=-1.724746665900854E-6 evalInputDelta=0.006311936315924527
New Minimum: -36.235542048486806 > -36.27338643690175
WOLFE (weak): th(23393.607721408407)=-36.27338643690175; dx=-1.7232590447162462E-6 evalInputDelta=0.04415632473087072
New Minimum: -36.27338643690175 > -36.58036479729194
WOLFE (weak): th(187148.86177126726)=-36.58036479729194; dx=-1.7018001341104207E-6 evalInputDelta=0.3511346851210604
New Minimum: -36.58036479729194 > -39.186564259363514
END: th(1684339.7559414054)=-39.186564259363514; dx=-1.4713060425284462E-6 evalInputDelta=2.9573341471926327
Fitness changed from -36.22923011217088 to -39.186564259363514
Iteration 2 complete. Error: -39.186564259363514 Total: 68.4091; Orientation: 0.1245; Line Search: 61.1348
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/77c2dc83-2270-4875-b4a5-156f23108a25.jpg)
Adding measurement 30c92b38 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-39.186564259363514;dx=-1.4005369766576875E-6
New Minimum: -39.186564259363514 > -43.79006523861025
END: th(3628800.0000000005)=-43.79006523861025; dx=-9.465215831536162E-7 evalInputDelta=4.603500979246732
Fitness changed from -39.186564259363514 to -43.79006523861025
Iteration 3 complete. Error: -43.79006523861025 Total: 19.1098; Orientation: 0.1329; Line Search: 11.9879
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/5164e414-da91-4ba4-8085-f9e6eb04a89e.jpg)
Adding measurement 46e26ac8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.059e+04, gradient 9.569e-04, dot -0.810; [9b5b7433-3d6d-40c8-821b-81b9836d4320 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -43.79006523861025, -39.186564259363514, -36.22923011217088, -36.22922594276103
LBFGS Accumulation History: 3 points
Removed measurement 46e26ac8 to history. Total: 3
th(0)=-43.79006523861025;dx=-9.142790404205485E-7
New Minimum: -43.79006523861025 > -49.71220611917028
END: th(7818012.603187701)=-49.71220611917028; dx=-5.022805035820842E-7 evalInputDelta=5.922140880560036
Fitness changed from -43.79006523861025 to -49.71220611917028
Iteration 4 complete. Error: -49.71220611917028 Total: 22.1668; Orientation: 2.4827; Line Search: 12.6578
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/2db2adcf-f575-4840-804c-d890a3341904.jpg)
Adding measurement 2a45986 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.003e+04, gradient 8.341e-04, dot -0.609; [9b5b7433-3d6d-40c8-821b-81b9836d4320 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -49.71220611917028, -39.186564259363514, -36.22923011217088, -36.22922594276103
LBFGS Accumulation History: 3 points
Removed measurement 2a45986 to history. Total: 3
th(0)=-49.71220611917028;dx=-6.952336526253275E-7
New Minimum: -49.71220611917028 > -55.975109902809145
END: th(1.6843397559414055E7)=-55.975109902809145; dx=-1.563366903049937E-7 evalInputDelta=6.262903783638862
Fitness changed from -49.71220611917028 to -55.975109902809145
Iteration 5 complete. Error: -55.975109902809145 Total: 21.9234; Orientation: 2.4646; Line Search: 12.2295
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/ea7fba0f-43fe-4795-b6c2-fc32efb25795.jpg)
Adding measurement 1f015f58 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.217e+04, gradient 9.824e-04, dot -0.347; [9b5b7433-3d6d-40c8-821b-81b9836d4320 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -55.975109902809145, -39.186564259363514, -36.22923011217088, -36.22922594276103
LBFGS Accumulation History: 3 points
Removed measurement 1f015f58 to history. Total: 3
th(0)=-55.975109902809145;dx=-9.649756025326218E-7
Armijo: th(3.628800000000001E7)=-54.800577945864944; dx=1.953795293552957E-7 evalInputDelta=-1.1745319569442003
New Minimum: -55.975109902809145 > -59.67821457106337
WOLF (strong): th(1.8144000000000004E7)=-59.67821457106337; dx=2.2148303456646746E-7 evalInputDelta=3.703104668254227
New Minimum: -59.67821457106337 > -60.413374480274186
END: th(6048000.000000001)=-60.413374480274186; dx=-3.505838909466833E-7 evalInputDelta=4.438264577465041
Fitness changed from -55.975109902809145 to -60.413374480274186
Iteration 6 complete. Error: -60.413374480274186 Total: 34.4198; Orientation: 2.4327; Line Search: 24.7772
Adding measurement 40a4cbc5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.063e+04, gradient 7.053e-04, dot -0.620; [9b5b7433-3d6d-40c8-821b-81b9836d4320 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -60.413374480274186, -39.186564259363514, -36.22923011217088, -36.22922594276103
LBFGS Accumulation History: 3 points
Removed measurement 40a4cbc5 to history. Total: 3
th(0)=-60.413374480274186;dx=-4.966107620060341E-7
New Minimum: -60.413374480274186 > -64.70750782056587
END: th(1.3030021005312836E7)=-64.70750782056587; dx=-1.691423755383891E-7 evalInputDelta=4.29413334029168
Fitness changed from -60.413374480274186 to -64.70750782056587
Iteration 7 complete. Error: -64.70750782056587 Total: 20.8451; Orientation: 2.4139; Line Search: 12.3411
Adding measurement 11b93a16 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.651e+04, gradient 8.028e-04, dot -0.503; [9b5b7433-3d6d-40c8-821b-81b9836d4320 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -64.70750782056587, -39.186564259363514, -36.22923011217088, -36.22922594276103
LBFGS Accumulation History: 3 points
Removed measurement 11b93a16 to history. Total: 3
th(0)=-64.70750782056587;dx=-6.443286842887487E-7
New Minimum: -64.70750782056587 > -66.07518700732271
WOLF (strong): th(2.8072329265690096E7)=-66.07518700732271; dx=1.2724308992624175E-7 evalInputDelta=1.3676791867568454
New Minimum: -66.07518700732271 > -67.95041607850698
WOLF (strong): th(1.4036164632845048E7)=-67.95041607850698; dx=4.950294333851645E-8 evalInputDelta=3.24290825794111
END: th(4678721.544281683)=-67.18133473186718; dx=-3.1969622020787616E-7 evalInputDelta=2.473826911301316
Fitness changed from -64.70750782056587 to -67.95041607850698
Iteration 8 complete. Error: -67.95041607850698 Total: 33.9002; Orientation: 2.4592; Line Search: 25.0455
Adding measurement c5790ac to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.840e+04, gradient 9.122e-04, dot -0.386; [9b5b7433-3d6d-40c8-821b-81b9836d4320 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -67.95041607850698, -39.186564259363514, -36.22923011217088, -36.22922594276103
LBFGS Accumulation History: 3 points
Removed measurement c5790ac to history. Total: 3
th(0)=-67.95041607850698;dx=-8.319281333909757E-7
New Minimum: -67.95041607850698 > -72.60745099649886
WOLF (strong): th(1.0080000000000004E7)=-72.60745099649886; dx=6.3042801961202364E-9 evalInputDelta=4.657034917991879
END: th(5040000.000000002)=-71.52977682198289; dx=-4.4084218304847114E-7 evalInputDelta=3.5793607434759167
Fitness changed from -67.95041607850698 to -72.60745099649886
Iteration 9 complete. Error: -72.60745099649886 Total: 27.3116; Orientation: 2.4982; Line Search: 18.7578
Adding measurement 80d6402 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.939e+04, gradient 7.235e-04, dot -0.530; [9b5b7433-3d6d-40c8-821b-81b9836d4320 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -72.60745099649886, -39.186564259363514, -36.22923011217088, -36.22922594276103
LBFGS Accumulation History: 3 points
Removed measurement 80d6402 to history. Total: 3
th(0)=-72.60745099649886;dx=-5.228342569362853E-7
New Minimum: -72.60745099649886 > -75.72761930120859
END: th(1.0858350837760698E7)=-75.72761930120859; dx=-5.002819504744659E-8 evalInputDelta=3.120168304709736
Fitness changed from -72.60745099649886 to -75.72761930120859
Iteration 10 complete. Error: -75.72761930120859 Total: 20.5686; Orientation: 2.4381; Line Search: 12.3052
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/dc52cf53-012b-4d26-97d6-f731f731c061.jpg)
Final threshold in iteration 11: -75.72761930120859 (> -Infinity) after 300.404s (< 5400.000s)

Returns

    -75.72761930120859