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 2185.53 seconds (11.318 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: 3644986183046
Reset training subject: 3694288599777
Adding measurement 1207d379 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-4.611219435930252;dx=-1.6049203158477652E-7
New Minimum: -4.611219435930252 > -4.611219644546509
WOLFE (weak): th(2.154434690031884)=-4.611219644546509; dx=-1.488759338012349E-7 evalInputDelta=2.086162567138672E-7
New Minimum: -4.611219644546509 > -4.611220121383667
WOLFE (weak): th(4.308869380063768)=-4.611220121383667; dx=-1.4887485006964157E-7 evalInputDelta=6.854534149169922E-7
New Minimum: -4.611220121383667 > -4.611221626400948
WOLFE (weak): th(12.926608140191302)=-4.611221626400948; dx=-1.4886475147002012E-7 evalInputDelta=2.1904706954956055E-6
New Minimum: -4.611221626400948 > -4.611228168010712
WOLFE (weak): th(51.70643256076521)=-4.611228168010712; dx=-1.488605985026351E-7 evalInputDelta=8.732080459594727E-6
New Minimum: -4.611228168010712 > -4.611262932419777
WOLFE (weak): th(258.53216280382605)=-4.611262932419777; dx=-1.4886741000986837E-7 evalInputDelta=4.349648952484131E-5
New Minimum: -4.611262932419777 > -4.611479848623276
WOLFE (weak): th(1551.1929768229563)=-4.611479848623276; dx=-1.49841345100838E-7 evalInputDelta=2.6041269302368164E-4
New Minimum: -4.611479848623276 > -4.613041251897812
WOLFE (weak): th(10858.350837760694)=-4.613041251897812; dx=-1.4960260891156807E-7 evalInputDelta=0.0018218159675598145
New Minimum: -4.613041251897812 > -4.625737890601158
END: th(86866.80670208555)=-4.625737890601158; dx=-1.351665142007258E-7 evalInputDelta=0.014518454670906067
Fitness changed from -4.611219435930252 to -4.625737890601158
Iteration 1 complete. Error: -4.625737890601158 Total: 588.2225; Orientation: 0.0917; Line Search: 440.7597
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/c1f02786-a913-4369-a0a6-9ac475e32dbc.jpg)

    Adding measurement 1ad1936a to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=-4.625737890601158;dx=-1.4832665756104826E-7
    New Minimum: -4.625737890601158 > -4.656735569238663
    WOLFE (weak): th(187148.86177126726)=-4.656735569238663; dx=-1.45337215662189E-7 evalInputDelta=0.030997678637504578
    New Minimum: -4.656735569238663 > -4.687080219388008
    WOLFE (weak): th(374297.7235425345)=-4.687080219388008; dx=-1.4313071445068173E-7 evalInputDelta=0.061342328786849976
    New Minimum: -4.687080219388008 > -4.801697492599487
    END: th(1122893.1706276035)=-4.801697492599487; dx=-1.2923083860680572E-7 evalInputDelta=0.17595960199832916
    Fitness changed from -4.625737890601158 to -4.801697492599487
    Iteration 2 complete. Error: -4.801697492599487 Total: 245.1713; Orientation: 0.0878; Line Search: 195.7505
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/d71ebf0b-fbcf-40ec-9f9c-732483ebb411.jpg)

    Adding measurement 1de4a681 to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=-4.801697492599487;dx=-1.1997144653745727E-7
    New Minimum: -4.801697492599487 > -5.091360330581665
    END: th(2419200.0000000005)=-5.091360330581665; dx=-9.341540883295998E-8 evalInputDelta=0.28966283798217773
    Fitness changed from -4.801697492599487 to -5.091360330581665
    Iteration 3 complete. Error: -5.091360330581665 Total: 149.1396; Orientation: 0.0898; Line Search: 98.7051
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/dab0bb07-4243-443c-8d2b-70644e48dc39.jpg)

    Adding measurement 603d539e to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.996e+03, gradient 2.899e-04, dot -0.920; [412e7caf-b45e-4abc-9504-31bbf6310ddf = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -5.091360330581665, -4.801697492599487, -4.625737890601158, -4.611219435930252
    LBFGS Accumulation History: 3 points
    Removed measurement 603d539e to history. Total: 3
    th(0)=-5.091360330581665;dx=-8.467173785706071E-8
    New Minimum: -5.091360330581665 > -5.5107595175504684
    END: th(5212008.402125134)=-5.5107595175504684; dx=-6.036797045528631E-8 evalInputDelta=0.4193991869688034
    Fitness changed from -5.091360330581665 to -5.5107595175504684
    Iteration 4 complete. Error: -5.5107595175504684 Total: 150.5912; Orientation: 2.3161; Line Search: 98.8181
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/bb21e59c-9c9b-4838-9649-734b7830909f.jpg)

    Adding measurement 1a4786da to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.347e+03, gradient 2.335e-04, dot -0.844; [412e7caf-b45e-4abc-9504-31bbf6310ddf = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -5.5107595175504684, -4.801697492599487, -4.625737890601158, -4.611219435930252
    LBFGS Accumulation History: 3 points
    Removed measurement 1a4786da to history. Total: 3
    th(0)=-5.5107595175504684;dx=-5.4996693909142165E-8
    New Minimum: -5.5107595175504684 > -6.07105179131031
    END: th(1.1228931706276037E7)=-6.07105179131031; dx=-3.50891182152616E-8 evalInputDelta=0.5602922737598419
    Fitness changed from -5.5107595175504684 to -6.07105179131031
    Iteration 5 complete. Error: -6.07105179131031 Total: 150.2580; Orientation: 2.2645; Line Search: 98.1854
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/42bda524-a824-4e0e-bdfb-129266bb2309.jpg)

    Adding measurement 7ea1fba0 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.940e+03, gradient 1.813e-04, dot -0.779; [412e7caf-b45e-4abc-9504-31bbf6310ddf = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -6.07105179131031, -4.801697492599487, -4.625737890601158, -4.611219435930252
    LBFGS Accumulation History: 3 points
    Removed measurement 7ea1fba0 to history. Total: 3
    th(0)=-6.07105179131031;dx=-3.2861697149521974E-8
    New Minimum: -6.07105179131031 > -6.695747077465057
    END: th(2.4192000000000004E7)=-6.695747077465057; dx=-1.6398718841788704E-8 evalInputDelta=0.624695286154747
    Fitness changed from -6.07105179131031 to -6.695747077465057
    Iteration 6 complete. Error: -6.695747077465057 Total: 151.9822; Orientation: 2.2649; Line Search: 99.5447
    Adding measurement 45eb5f51 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.262e+03, gradient 1.537e-04, dot -0.593; [412e7caf-b45e-4abc-9504-31bbf6310ddf = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -6.695747077465057, -4.801697492599487, -4.625737890601158, -4.611219435930252
    LBFGS Accumulation History: 3 points
    Removed measurement 45eb5f51 to history. Total: 3
    th(0)=-6.695747077465057;dx=-2.3606950274148296E-8
    New Minimum: -6.695747077465057 > -6.964358925819397
    END: th(5.212008402125134E7)=-6.964358925819397; dx=-1.502657517108367E-9 evalInputDelta=0.2686118483543396
    Fitness changed from -6.695747077465057 to -6.964358925819397
    Iteration 7 complete. Error: -6.964358925819397 Total: 150.0370; Orientation: 2.2435; Line Search: 99.1091
    Adding measurement 6eaea320 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.110e+03, gradient 2.880e-04, dot -0.136; [412e7caf-b45e-4abc-9504-31bbf6310ddf = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -6.964358925819397, -4.801697492599487, -4.625737890601158, -4.611219435930252
    LBFGS Accumulation History: 3 points
    Removed measurement 6eaea320 to history. Total: 3
    th(0)=-6.964358925819397;dx=-8.290729338792175E-8
    Armijo: th(1.1228931706276038E8)=-5.27262619137764; dx=1.7648358746205522E-8 evalInputDelta=-1.6917327344417572
    Armijo: th(5.614465853138019E7)=-6.569804787635803; dx=1.5175991070316377E-8 evalInputDelta=-0.39455413818359375
    New Minimum: -6.964358925819397 > -7.192675232887268
    WOLF (strong): th(1.871488617712673E7)=-7.192675232887268; dx=7.975709786819732E-9 evalInputDelta=0.2283163070678711
    New Minimum: -7.192675232887268 > -7.207624971866608
    END: th(4678721.544281683)=-7.207624971866608; dx=-1.998797449266003E-8 evalInputDelta=0.2432660460472107
    Fitness changed from -6.964358925819397 to -7.207624971866608
    Iteration 8 complete. Error: -7.207624971866608 Total: 299.2149; Orientation: 3.1266; Line Search: 246.9727
    Adding measurement 71679b8b to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.660e+03, gradient 1.325e-04, dot -0.319; [412e7caf-b45e-4abc-9504-31bbf6310ddf = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -7.207624971866608, -4.801697492599487, -4.625737890601158, -4.611219435930252
    LBFGS Accumulation History: 3 points
    Removed measurement 71679b8b to history. Total: 3
    th(0)=-7.207624971866608;dx=-1.7531225802662733E-8
    New Minimum: -7.207624971866608 > -7.344050198793411
    END: th(1.0080000000000004E7)=-7.344050198793411; dx=-7.46128096101636E-9 evalInputDelta=0.1364252269268036
    Fitness changed from -7.207624971866608 to -7.344050198793411
    Iteration 9 complete. Error: -7.344050198793411 Total: 151.1996; Orientation: 2.2089; Line Search: 99.7942
    Adding measurement 71e15be to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.435e+03, gradient 9.102e-05, dot -0.428; [412e7caf-b45e-4abc-9504-31bbf6310ddf = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -7.344050198793411, -4.801697492599487, -4.625737890601158, -4.611219435930252
    LBFGS Accumulation History: 3 points
    Removed measurement 71e15be to history. Total: 3
    th(0)=-7.344050198793411;dx=-8.288448133332045E-9
    New Minimum: -7.344050198793411 > -7.485781744122505
    END: th(2.1716701675521396E7)=-7.485781744122505; dx=-3.913927744321401E-9 evalInputDelta=0.14173154532909393
    Fitness changed from -7.344050198793411 to -7.485781744122505
    Iteration 10 complete. Error: -7.485781744122505 Total: 148.4971; Orientation: 2.2408; Line Search: 97.6329
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/b3265259-60c9-4981-a86f-126db93ce845.jpg)

    Final threshold in iteration 11: -7.485781744122505 (> -Infinity) after 2185.526s (< 5400.000s)

Returns

    -7.485781744122505