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 201.58 seconds (2.882 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: 21688710777758
Reset training subject: 21692862936137
Adding measurement 10f04d8d to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.5552583187818527;dx=-7.773052314210863E-7
New Minimum: -0.5552583187818527 > -0.5552589893341064
END: th(2.154434690031884)=-0.5552589893341064; dx=-6.743815199952116E-7 evalInputDelta=6.705522537231445E-7
Fitness changed from -0.5552583187818527 to -0.5552589893341064
Iteration 1 complete. Error: -0.5552589893341064 Total: 21.7735; Orientation: 0.0453; Line Search: 8.8018
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/7f75822c-2e4f-45b1-ac2b-a53141a5d3ba.jpg)

    Adding measurement 3b2d787c to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=-0.5552589893341064;dx=-6.743817069822414E-7
    New Minimum: -0.5552589893341064 > -0.5552607178688049
    WOLFE (weak): th(4.641588833612779)=-0.5552607178688049; dx=-6.743801278827213E-7 evalInputDelta=1.7285346984863281E-6
    New Minimum: -0.5552607178688049 > -0.5552622377872467
    WOLFE (weak): th(9.283177667225559)=-0.5552622377872467; dx=-6.743797924847861E-7 evalInputDelta=3.248453140258789E-6
    New Minimum: -0.5552622377872467 > -0.5552685260772705
    WOLFE (weak): th(27.849533001676676)=-0.5552685260772705; dx=-6.743935357841974E-7 evalInputDelta=9.5367431640625E-6
    New Minimum: -0.5552685260772705 > -0.5552966296672821
    WOLFE (weak): th(111.3981320067067)=-0.5552966296672821; dx=-6.743691910775397E-7 evalInputDelta=3.764033317565918E-5
    New Minimum: -0.5552966296672821 > -0.555446982383728
    WOLFE (weak): th(556.9906600335335)=-0.555446982383728; dx=-6.742624825652205E-7 evalInputDelta=1.8799304962158203E-4
    New Minimum: -0.555446982383728 > -0.5563852488994598
    WOLFE (weak): th(3341.9439602012008)=-0.5563852488994598; dx=-6.736086947611029E-7 evalInputDelta=0.0011262595653533936
    New Minimum: -0.5563852488994598 > -0.5631141066551208
    WOLFE (weak): th(23393.607721408407)=-0.5631141066551208; dx=-6.687453899733373E-7 evalInputDelta=0.007855117321014404
    New Minimum: -0.5631141066551208 > -0.6161324828863144
    WOLFE (weak): th(187148.86177126726)=-0.6161324828863144; dx=-6.250702983220071E-7 evalInputDelta=0.06087349355220795
    New Minimum: -0.6161324828863144 > -0.939361497759819
    END: th(1684339.7559414054)=-0.939361497759819; dx=-2.760087639846918E-7 evalInputDelta=0.3841025084257126
    Fitness changed from -0.5552589893341064 to -0.939361497759819
    Iteration 2 complete. Error: -0.939361497759819 Total: 50.0498; Orientation: 0.0735; Line Search: 45.6967
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/7ad2551d-9dce-4d92-9272-b2593192c8e3.jpg)

    Adding measurement 23859c96 to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=-0.939361497759819;dx=-2.7345490830493596E-7
    New Minimum: -0.939361497759819 > -1.2651716768741608
    END: th(3628800.0000000005)=-1.2651716768741608; dx=-1.1026438207951921E-7 evalInputDelta=0.32581017911434174
    Fitness changed from -0.939361497759819 to -1.2651716768741608
    Iteration 3 complete. Error: -1.2651716768741608 Total: 12.3655; Orientation: 0.0461; Line Search: 8.1992
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/cdf0c7ce-faaf-47ab-af5d-ebd2da0d4527.jpg)

    Adding measurement 3199d60 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.679e+03, gradient 3.856e-04, dot -0.583; [aa1fefe3-63b6-4fa7-b4a8-3c6963997e63 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.2651716768741608, -0.939361497759819, -0.5552589893341064, -0.5552583187818527
    LBFGS Accumulation History: 3 points
    Removed measurement 3199d60 to history. Total: 3
    th(0)=-1.2651716768741608;dx=-1.487207218544701E-7
    New Minimum: -1.2651716768741608 > -1.544793263077736
    END: th(7818012.603187701)=-1.544793263077736; dx=-2.657601898979329E-8 evalInputDelta=0.27962158620357513
    Fitness changed from -1.2651716768741608 to -1.544793263077736
    Iteration 4 complete. Error: -1.544793263077736 Total: 13.5774; Orientation: 1.0206; Line Search: 8.4466
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/90a1d785-9fbe-45af-a0cd-bbe8f95924b4.jpg)

    Adding measurement 2464fc96 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.476e+03, gradient 3.527e-04, dot -0.346; [aa1fefe3-63b6-4fa7-b4a8-3c6963997e63 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.544793263077736, -0.939361497759819, -0.5552589893341064, -0.5552583187818527
    LBFGS Accumulation History: 3 points
    Removed measurement 2464fc96 to history. Total: 3
    th(0)=-1.544793263077736;dx=-1.2436332203971512E-7
    New Minimum: -1.544793263077736 > -1.6370312049984932
    WOLF (strong): th(1.6843397559414055E7)=-1.6370312049984932; dx=2.5372550521142735E-8 evalInputDelta=0.0922379419207573
    New Minimum: -1.6370312049984932 > -1.7157766819000244
    WOLF (strong): th(8421698.779707028)=-1.7157766819000244; dx=6.206865843064558E-9 evalInputDelta=0.1709834188222885
    END: th(2807232.926569009)=-1.6645903885364532; dx=-5.254963567069497E-8 evalInputDelta=0.11979712545871735
    Fitness changed from -1.544793263077736 to -1.7157766819000244
    Iteration 5 complete. Error: -1.7157766819000244 Total: 22.3408; Orientation: 1.0279; Line Search: 16.8439
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/6fbf360a-94f5-4943-a905-a4a36eff0839.jpg)

    Adding measurement 10c8b8f to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.545e+03, gradient 3.121e-04, dot -0.281; [aa1fefe3-63b6-4fa7-b4a8-3c6963997e63 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.7157766819000244, -0.939361497759819, -0.5552589893341064, -0.5552583187818527
    LBFGS Accumulation History: 3 points
    Removed measurement 10c8b8f to history. Total: 3
    th(0)=-1.7157766819000244;dx=-9.738500862389928E-8
    New Minimum: -1.7157766819000244 > -1.8615245148539543
    END: th(6048000.000000001)=-1.8615245148539543; dx=-1.4643434998358148E-8 evalInputDelta=0.1457478329539299
    Fitness changed from -1.7157766819000244 to -1.8615245148539543
    Iteration 6 complete. Error: -1.8615245148539543 Total: 14.0841; Orientation: 1.4695; Line Search: 8.1703
    Adding measurement 68f5ab00 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.037e+03, gradient 2.140e-04, dot -0.456; [aa1fefe3-63b6-4fa7-b4a8-3c6963997e63 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.8615245148539543, -0.939361497759819, -0.5552589893341064, -0.5552583187818527
    LBFGS Accumulation History: 3 points
    Removed measurement 68f5ab00 to history. Total: 3
    th(0)=-1.8615245148539543;dx=-4.579052048751489E-8
    New Minimum: -1.8615245148539543 > -1.9644944742321968
    WOLF (strong): th(1.3030021005312836E7)=-1.9644944742321968; dx=5.979811072083937E-9 evalInputDelta=0.10296995937824249
    END: th(6515010.502656418)=-1.9543266892433167; dx=-1.376756425480255E-8 evalInputDelta=0.09280217438936234
    Fitness changed from -1.8615245148539543 to -1.9644944742321968
    Iteration 7 complete. Error: -1.9644944742321968 Total: 16.9901; Orientation: 1.0472; Line Search: 11.8813
    Adding measurement 799d2f0a to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.597e+03, gradient 2.833e-04, dot -0.215; [aa1fefe3-63b6-4fa7-b4a8-3c6963997e63 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.9644944742321968, -0.939361497759819, -0.5552589893341064, -0.5552583187818527
    LBFGS Accumulation History: 3 points
    Removed measurement 799d2f0a to history. Total: 3
    th(0)=-1.9644944742321968;dx=-8.024325021136628E-8
    New Minimum: -1.9644944742321968 > -1.9737305790185928
    WOLF (strong): th(1.4036164632845048E7)=-1.9737305790185928; dx=3.056553314299742E-8 evalInputDelta=0.009236104786396027
    New Minimum: -1.9737305790185928 > -2.054645426571369
    WOLF (strong): th(7018082.316422524)=-2.054645426571369; dx=9.189775886342287E-9 evalInputDelta=0.09015095233917236
    END: th(2339360.7721408415)=-2.0315575152635574; dx=-3.6043844847675566E-8 evalInputDelta=0.06706304103136063
    Fitness changed from -1.9644944742321968 to -2.054645426571369
    Iteration 8 complete. Error: -2.054645426571369 Total: 23.1310; Orientation: 1.0303; Line Search: 17.7491
    Adding measurement 4834c6a7 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.970e+03, gradient 1.971e-04, dot -0.340; [aa1fefe3-63b6-4fa7-b4a8-3c6963997e63 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -2.054645426571369, -0.939361497759819, -0.5552589893341064, -0.5552583187818527
    LBFGS Accumulation History: 3 points
    Removed measurement 4834c6a7 to history. Total: 3
    th(0)=-2.054645426571369;dx=-3.885147432432543E-8
    New Minimum: -2.054645426571369 > -2.1154367476701736
    END: th(5040000.000000002)=-2.1154367476701736; dx=-1.0993782770539763E-8 evalInputDelta=0.060791321098804474
    Fitness changed from -2.054645426571369 to -2.1154367476701736
    Iteration 9 complete. Error: -2.1154367476701736 Total: 13.4474; Orientation: 0.9942; Line Search: 8.5583
    Adding measurement 708716a7 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.232e+03, gradient 1.429e-04, dot -0.491; [aa1fefe3-63b6-4fa7-b4a8-3c6963997e63 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -2.1154367476701736, -0.939361497759819, -0.5552589893341064, -0.5552583187818527
    LBFGS Accumulation History: 3 points
    Removed measurement 708716a7 to history. Total: 3
    th(0)=-2.1154367476701736;dx=-2.0420678225525968E-8
    New Minimum: -2.1154367476701736 > -2.171787589788437
    END: th(1.0858350837760698E7)=-2.171787589788437; dx=-3.131416610922809E-9 evalInputDelta=0.056350842118263245
    Fitness changed from -2.1154367476701736 to -2.171787589788437
    Iteration 10 complete. Error: -2.171787589788437 Total: 13.7483; Orientation: 1.4822; Line Search: 8.3209
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/60073cb9-f472-48f1-987e-81ff762947a5.jpg)

    Final threshold in iteration 11: -2.171787589788437 (> -Infinity) after 201.582s (< 5400.000s)

Returns

    -2.171787589788437