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 215.70 seconds (1.999 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: 2293896447262
Reset training subject: 2298999850942
Adding measurement f6b6063 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-16.920130372047424;dx=-1.2385213080949423E-6
New Minimum: -16.920130372047424 > -16.920133590698242
END: th(2.154434690031884)=-16.920133590698242; dx=-1.089828798101219E-6 evalInputDelta=3.2186508178710938E-6
Fitness changed from -16.920130372047424 to -16.920133590698242
Iteration 1 complete. Error: -16.920133590698242 Total: 24.7736; Orientation: 0.0277; Line Search: 9.7877
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/61ed6e7b-9fac-4f6b-847d-75130bcebc3f.jpg)

    Adding measurement 76578b3e to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=-16.920133590698242;dx=-1.0850430820816766E-6
    New Minimum: -16.920133590698242 > -16.920139133930206
    WOLFE (weak): th(4.641588833612779)=-16.920139133930206; dx=-1.0844701183902865E-6 evalInputDelta=5.543231964111328E-6
    New Minimum: -16.920139133930206 > -16.920145213603973
    WOLFE (weak): th(9.283177667225559)=-16.920145213603973; dx=-1.0841856623568169E-6 evalInputDelta=1.1622905731201172E-5
    New Minimum: -16.920145213603973 > -16.920169204473495
    WOLFE (weak): th(27.849533001676676)=-16.920169204473495; dx=-1.0836967292073636E-6 evalInputDelta=3.56137752532959E-5
    New Minimum: -16.920169204473495 > -16.920277684926987
    WOLFE (weak): th(111.3981320067067)=-16.920277684926987; dx=-1.0833357255054544E-6 evalInputDelta=1.4409422874450684E-4
    New Minimum: -16.920277684926987 > -16.92085862159729
    WOLFE (weak): th(556.9906600335335)=-16.92085862159729; dx=-1.082722610382618E-6 evalInputDelta=7.250308990478516E-4
    New Minimum: -16.92085862159729 > -16.92447179555893
    WOLFE (weak): th(3341.9439602012008)=-16.92447179555893; dx=-1.078648437057595E-6 evalInputDelta=0.004338204860687256
    New Minimum: -16.92447179555893 > -16.950210213661194
    WOLFE (weak): th(23393.607721408407)=-16.950210213661194; dx=-1.0585525138281576E-6 evalInputDelta=0.03007662296295166
    New Minimum: -16.950210213661194 > -17.13750895857811
    END: th(187148.86177126726)=-17.13750895857811; dx=-8.464447387745571E-7 evalInputDelta=0.21737536787986755
    Fitness changed from -16.920133590698242 to -17.13750895857811
    Iteration 2 complete. Error: -17.13750895857811 Total: 49.8900; Orientation: 0.0269; Line Search: 44.7693
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/bd77a3f3-7a51-4bc2-af0e-87aec0dec821.jpg)

    Adding measurement 3623a6a8 to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=-17.13750895857811;dx=-8.072181873576496E-7
    New Minimum: -17.13750895857811 > -17.459482818841934
    END: th(403200.00000000006)=-17.459482818841934; dx=-5.56353518449091E-7 evalInputDelta=0.32197386026382446
    Fitness changed from -17.13750895857811 to -17.459482818841934
    Iteration 3 complete. Error: -17.459482818841934 Total: 15.5302; Orientation: 0.0276; Line Search: 10.1191
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/b0f66d68-598a-44b8-9106-210ca3844a41.jpg)

    Adding measurement 67d6fe6e to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 6.666e+02, gradient 7.169e-04, dot -0.858; [46b9dfd0-54a2-449b-b583-eae903475e8b = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -17.459482818841934, -17.13750895857811, -16.920133590698242, -16.920130372047424
    LBFGS Accumulation History: 3 points
    Removed measurement 67d6fe6e to history. Total: 3
    th(0)=-17.459482818841934;dx=-5.12894278364723E-7
    New Minimum: -17.459482818841934 > -17.884170055389404
    END: th(868668.0670208557)=-17.884170055389404; dx=-3.240262450933059E-7 evalInputDelta=0.4246872365474701
    Fitness changed from -17.459482818841934 to -17.884170055389404
    Iteration 4 complete. Error: -17.884170055389404 Total: 15.9783; Orientation: 0.6049; Line Search: 9.9810
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/1b0f549f-f857-420c-968c-4ef5cfcb9c34.jpg)

    Adding measurement 56029c72 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 7.752e+02, gradient 6.242e-04, dot -0.715; [46b9dfd0-54a2-449b-b583-eae903475e8b = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -17.884170055389404, -17.13750895857811, -16.920133590698242, -16.920130372047424
    LBFGS Accumulation History: 3 points
    Removed measurement 56029c72 to history. Total: 3
    th(0)=-17.884170055389404;dx=-3.892490787389753E-7
    New Minimum: -17.884170055389404 > -18.403834879398346
    END: th(1871488.617712673)=-18.403834879398346; dx=-1.679512354688305E-7 evalInputDelta=0.5196648240089417
    Fitness changed from -17.884170055389404 to -18.403834879398346
    Iteration 5 complete. Error: -18.403834879398346 Total: 15.6301; Orientation: 0.5956; Line Search: 9.9128
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/3b21ef51-65e5-4dd0-b450-f4330477ca5d.jpg)

    Adding measurement 4e13def6 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.270e+03, gradient 6.106e-04, dot -0.507; [46b9dfd0-54a2-449b-b583-eae903475e8b = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -18.403834879398346, -17.13750895857811, -16.920133590698242, -16.920130372047424
    LBFGS Accumulation History: 3 points
    Removed measurement 4e13def6 to history. Total: 3
    th(0)=-18.403834879398346;dx=-3.7246337340935466E-7
    New Minimum: -18.403834879398346 > -18.767405927181244
    END: th(4032000.0000000014)=-18.767405927181244; dx=-6.182134027198968E-11 evalInputDelta=0.36357104778289795
    Fitness changed from -18.403834879398346 to -18.767405927181244
    Iteration 6 complete. Error: -18.767405927181244 Total: 15.9709; Orientation: 0.6161; Line Search: 9.8750
    Adding measurement 524c4b00 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 8.121e+02, gradient 9.050e-04, dot -0.136; [46b9dfd0-54a2-449b-b583-eae903475e8b = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -18.767405927181244, -17.13750895857811, -16.920133590698242, -16.920130372047424
    LBFGS Accumulation History: 3 points
    Removed measurement 524c4b00 to history. Total: 3
    th(0)=-18.767405927181244;dx=-8.176982479371396E-7
    Armijo: th(8686680.670208558)=-16.72383040189743; dx=2.771730824864258E-7 evalInputDelta=-2.0435755252838135
    Armijo: th(4343340.335104279)=-18.275440454483032; dx=2.767433397431463E-7 evalInputDelta=-0.49196547269821167
    New Minimum: -18.767405927181244 > -19.151566088199615
    WOLF (strong): th(1447780.1117014263)=-19.151566088199615; dx=6.416776674493792E-8 evalInputDelta=0.3841601610183716
    END: th(361945.0279253566)=-19.02115625143051; dx=-3.750644328512865E-7 evalInputDelta=0.2537503242492676
    Fitness changed from -18.767405927181244 to -19.151566088199615
    Iteration 7 complete. Error: -19.151566088199615 Total: 30.4982; Orientation: 0.6163; Line Search: 25.0903
    Adding measurement 42b4438b to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.158e+03, gradient 5.553e-04, dot -0.258; [46b9dfd0-54a2-449b-b583-eae903475e8b = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -19.151566088199615, -17.13750895857811, -16.920133590698242, -16.920130372047424
    LBFGS Accumulation History: 3 points
    Removed measurement 42b4438b to history. Total: 3
    th(0)=-19.151566088199615;dx=-3.08086829073386E-7
    New Minimum: -19.151566088199615 > -19.369701743125916
    END: th(779786.9240469472)=-19.369701743125916; dx=-1.673695074664097E-7 evalInputDelta=0.21813565492630005
    Fitness changed from -19.151566088199615 to -19.369701743125916
    Iteration 8 complete. Error: -19.369701743125916 Total: 15.5071; Orientation: 0.5936; Line Search: 10.0445
    Adding measurement cf9ca31 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.667e+03, gradient 3.946e-04, dot -0.467; [46b9dfd0-54a2-449b-b583-eae903475e8b = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -19.369701743125916, -17.13750895857811, -16.920133590698242, -16.920130372047424
    LBFGS Accumulation History: 3 points
    Removed measurement cf9ca31 to history. Total: 3
    th(0)=-19.369701743125916;dx=-1.5550333494252877E-7
    New Minimum: -19.369701743125916 > -19.610114872455597
    END: th(1680000.0000000007)=-19.610114872455597; dx=-8.89893782388495E-8 evalInputDelta=0.2404131293296814
    Fitness changed from -19.369701743125916 to -19.610114872455597
    Iteration 9 complete. Error: -19.610114872455597 Total: 16.0178; Orientation: 0.6142; Line Search: 10.0753
    Adding measurement 14049e66 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.988e+03, gradient 3.507e-04, dot -0.546; [46b9dfd0-54a2-449b-b583-eae903475e8b = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -19.610114872455597, -17.13750895857811, -16.920133590698242, -16.920130372047424
    LBFGS Accumulation History: 3 points
    Removed measurement 14049e66 to history. Total: 3
    th(0)=-19.610114872455597;dx=-1.2269686350497977E-7
    New Minimum: -19.610114872455597 > -19.89223837852478
    END: th(3619450.279253566)=-19.89223837852478; dx=-3.321228206012741E-8 evalInputDelta=0.28212350606918335
    Fitness changed from -19.610114872455597 to -19.89223837852478
    Iteration 10 complete. Error: -19.89223837852478 Total: 15.6414; Orientation: 0.5957; Line Search: 10.2333
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/8a295ecf-7650-4743-abeb-098b65d36f40.jpg)

    Final threshold in iteration 11: -19.89223837852478 (> -Infinity) after 215.698s (< 5400.000s)

Returns

    -19.89223837852478