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:88 executed in 128.65 seconds (2.425 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: 14513090358588
Reset training subject: 14516222963872
Adding measurement 1f245e57 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=30.04620105959475;dx=-1.1552875376736337E-4
New Minimum: 30.04620105959475 > 30.045326855033636
WOLFE (weak): th(2.154434690031884)=30.045326855033636; dx=-1.1734935577244909E-4 evalInputDelta=8.742045611143112E-4
New Minimum: 30.045326855033636 > 30.04444975592196
WOLFE (weak): th(4.308869380063768)=30.04444975592196; dx=-1.1353583934797334E-4 evalInputDelta=0.0017513036727905273
New Minimum: 30.04444975592196 > 30.04093086719513
WOLFE (weak): th(12.926608140191302)=30.04093086719513; dx=-1.1763610320796578E-4 evalInputDelta=0.00527019239962101
New Minimum: 30.04093086719513 > 30.02531909570098
WOLFE (weak): th(51.70643256076521)=30.02531909570098; dx=-1.1480789352579085E-4 evalInputDelta=0.02088196389377117
New Minimum: 30.02531909570098 > 29.94312670826912
WOLFE (weak): th(258.53216280382605)=29.94312670826912; dx=-1.1238771551704793E-4 evalInputDelta=0.10307435132563114
New Minimum: 29.94312670826912 > 29.40691889822483
WOLFE (weak): th(1551.1929768229563)=29.40691889822483; dx=-1.1809838021056576E-4 evalInputDelta=0.6392821613699198
New Minimum: 29.40691889822483 > 26.03864924609661
END: th(10858.350837760694)=26.03864924609661; dx=-6.400391552470179E-5 evalInputDelta=4.007551813498139
Fitness changed from 30.04620105959475 to 26.03864924609661
Iteration 1 complete. Error: 26.03864924609661 Total: 34.3455; Orientation: 0.0027; Line Search: 24.9418
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/7386b205-99a5-446e-af68-cc0ee51934b3.jpg)

    Adding measurement 4822dd52 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=26.03864924609661;dx=-6.627158738505878E-5
    New Minimum: 26.03864924609661 > 22.432331811636686
    END: th(23393.607721408407)=22.432331811636686; dx=-2.351230844121584E-5 evalInputDelta=3.6063174344599247
    Fitness changed from 26.03864924609661 to 22.432331811636686
    Iteration 2 complete. Error: 22.432331811636686 Total: 10.7502; Orientation: 0.0029; Line Search: 7.5871
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/9846b896-b90f-433a-b6b3-2d4d655e1ee7.jpg)

    Adding measurement 13c9198b to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=22.432331811636686;dx=-1.9530707712398925E-5
    New Minimum: 22.432331811636686 > 20.254970889538527
    END: th(50400.00000000001)=20.254970889538527; dx=-1.1163949008170508E-5 evalInputDelta=2.17736092209816
    Fitness changed from 22.432331811636686 to 20.254970889538527
    Iteration 3 complete. Error: 20.254970889538527 Total: 9.4811; Orientation: 0.0024; Line Search: 6.3152
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/624f46b8-b353-48e0-b4f0-d2b0e974e4e0.jpg)

    Adding measurement 67808692 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.145e+02, gradient 3.906e-03, dot -0.728; [8e404331-132f-4379-97d7-8b8fd3444062 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 20.254970889538527, 22.432331811636686, 26.03864924609661, 30.04620105959475
    LBFGS Accumulation History: 3 points
    Removed measurement 67808692 to history. Total: 3
    th(0)=20.254970889538527;dx=-1.4017908930595169E-5
    New Minimum: 20.254970889538527 > 17.664998330175877
    END: th(108583.50837760697)=17.664998330175877; dx=-6.516491077514787E-6 evalInputDelta=2.58997255936265
    Fitness changed from 20.254970889538527 to 17.664998330175877
    Iteration 4 complete. Error: 17.664998330175877 Total: 9.4178; Orientation: 0.0651; Line Search: 6.2348
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/0b80948e-d20f-44ee-a75c-15233c1473f7.jpg)

    Adding measurement 2c8ca3d1 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 5.902e+02, gradient 3.542e-03, dot -0.572; [8e404331-132f-4379-97d7-8b8fd3444062 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 17.664998330175877, 22.432331811636686, 26.03864924609661, 30.04620105959475
    LBFGS Accumulation History: 3 points
    Removed measurement 2c8ca3d1 to history. Total: 3
    th(0)=17.664998330175877;dx=-1.0486598575029736E-5
    New Minimum: 17.664998330175877 > 14.38103774189949
    END: th(233936.07721408413)=14.38103774189949; dx=-3.7723734367416124E-6 evalInputDelta=3.2839605882763863
    Fitness changed from 17.664998330175877 to 14.38103774189949
    Iteration 5 complete. Error: 14.38103774189949 Total: 9.4269; Orientation: 0.0665; Line Search: 6.2560
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/c9f8c617-fb6f-4f41-a17d-f1b3829af194.jpg)

    Adding measurement 3b337e14 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 7.923e+02, gradient 2.442e-03, dot -0.526; [8e404331-132f-4379-97d7-8b8fd3444062 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 14.38103774189949, 22.432331811636686, 26.03864924609661, 30.04620105959475
    LBFGS Accumulation History: 3 points
    Removed measurement 3b337e14 to history. Total: 3
    th(0)=14.38103774189949;dx=-5.435147032937419E-6
    New Minimum: 14.38103774189949 > 10.607590645551682
    END: th(504000.0000000002)=10.607590645551682; dx=-1.9526899126045374E-6 evalInputDelta=3.773447096347809
    Fitness changed from 14.38103774189949 to 10.607590645551682
    Iteration 6 complete. Error: 10.607590645551682 Total: 9.4114; Orientation: 0.0645; Line Search: 6.2031
    Adding measurement 70309d9a to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 9.483e+02, gradient 1.664e-03, dot -0.534; [8e404331-132f-4379-97d7-8b8fd3444062 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 10.607590645551682, 22.432331811636686, 26.03864924609661, 30.04620105959475
    LBFGS Accumulation History: 3 points
    Removed measurement 70309d9a to history. Total: 3
    th(0)=10.607590645551682;dx=-2.342994940348351E-6
    New Minimum: 10.607590645551682 > 7.480647951364517
    END: th(1085835.0837760698)=7.480647951364517; dx=-7.17056828281119E-7 evalInputDelta=3.1269426941871643
    Fitness changed from 10.607590645551682 to 7.480647951364517
    Iteration 7 complete. Error: 7.480647951364517 Total: 9.4916; Orientation: 0.0677; Line Search: 6.2290
    Adding measurement 109a33ab to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 8.004e+02, gradient 1.114e-03, dot -0.454; [8e404331-132f-4379-97d7-8b8fd3444062 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 7.480647951364517, 22.432331811636686, 26.03864924609661, 30.04620105959475
    LBFGS Accumulation History: 3 points
    Removed measurement 109a33ab to history. Total: 3
    th(0)=7.480647951364517;dx=-1.1791271116299977E-6
    New Minimum: 7.480647951364517 > 5.662367641925812
    END: th(2339360.7721408415)=5.662367641925812; dx=-2.182692257330571E-7 evalInputDelta=1.8182803094387054
    Fitness changed from 7.480647951364517 to 5.662367641925812
    Iteration 8 complete. Error: 5.662367641925812 Total: 9.6755; Orientation: 0.1563; Line Search: 6.4026
    Adding measurement 26f9e3c0 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 5.256e+02, gradient 9.055e-04, dot -0.258; [8e404331-132f-4379-97d7-8b8fd3444062 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 5.662367641925812, 22.432331811636686, 26.03864924609661, 30.04620105959475
    LBFGS Accumulation History: 3 points
    Removed measurement 26f9e3c0 to history. Total: 3
    th(0)=5.662367641925812;dx=-7.728691002359082E-7
    Armijo: th(5040000.000000002)=5.974854052066803; dx=5.597434346360722E-8 evalInputDelta=-0.3124864101409912
    New Minimum: 5.662367641925812 > 4.878249973058701
    END: th(2520000.000000001)=4.878249973058701; dx=-1.4260116610505677E-7 evalInputDelta=0.7841176688671112
    Fitness changed from 5.662367641925812 to 4.878249973058701
    Iteration 9 complete. Error: 4.878249973058701 Total: 13.9567; Orientation: 0.1552; Line Search: 9.4429
    Adding measurement 2f0f1384 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.459e+02, gradient 7.779e-04, dot -0.204; [8e404331-132f-4379-97d7-8b8fd3444062 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 4.878249973058701, 22.432331811636686, 26.03864924609661, 30.04620105959475
    LBFGS Accumulation History: 3 points
    Removed measurement 2f0f1384 to history. Total: 3
    th(0)=4.878249973058701;dx=-5.544992273726784E-7
    Armijo: th(5429175.418880349)=5.46743431687355; dx=2.5016982801757126E-8 evalInputDelta=-0.5891843438148499
    New Minimum: 4.878249973058701 > 4.449302330613136
    END: th(2714587.7094401745)=4.449302330613136; dx=-8.313526596521328E-8 evalInputDelta=0.42894764244556427
    Fitness changed from 4.878249973058701 to 4.449302330613136
    Iteration 10 complete. Error: 4.449302330613136 Total: 12.6667; Orientation: 0.1796; Line Search: 9.3868
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/bc490114-2a18-4a8e-ad69-163d531bf517.jpg)

    Final threshold in iteration 11: 4.449302330613136 (> -Infinity) after 128.645s (< 5400.000s)

Returns

    4.449302330613136