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 209.02 seconds (1.729 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: 4573904042187
Reset training subject: 4577838349079
Adding measurement 533a91fa to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.2532707750797272;dx=-5.3833486058547E-7
New Minimum: -0.2532707750797272 > -0.25327084958553314
WOLFE (weak): th(2.154434690031884)=-0.25327084958553314; dx=-5.113117402841816E-7 evalInputDelta=7.450580596923828E-8
New Minimum: -0.25327084958553314 > -0.25327129662036896
WOLFE (weak): th(4.308869380063768)=-0.25327129662036896; dx=-5.113108692077656E-7 evalInputDelta=5.21540641784668E-7
New Minimum: -0.25327129662036896 > -0.25327394902706146
WOLFE (weak): th(12.926608140191302)=-0.25327394902706146; dx=-5.113115210118279E-7 evalInputDelta=3.1739473342895508E-6
New Minimum: -0.25327394902706146 > -0.25328393280506134
WOLFE (weak): th(51.70643256076521)=-0.25328393280506134; dx=-5.113155998195633E-7 evalInputDelta=1.315772533416748E-5
New Minimum: -0.25328393280506134 > -0.25333692133426666
WOLFE (weak): th(258.53216280382605)=-0.25333692133426666; dx=-5.112724114095627E-7 evalInputDelta=6.614625453948975E-5
New Minimum: -0.25333692133426666 > -0.2536671906709671
WOLFE (weak): th(1551.1929768229563)=-0.2536671906709671; dx=-5.110606882644302E-7 evalInputDelta=3.964155912399292E-4
New Minimum: -0.2536671906709671 > -0.2560424655675888
WOLFE (weak): th(10858.350837760694)=-0.2560424655675888; dx=-5.096086372826251E-7 evalInputDelta=0.0027716904878616333
New Minimum: -0.2560424655675888 > -0.27520227432250977
WOLFE (weak): th(86866.80670208555)=-0.27520227432250977; dx=-4.985501550718466E-7 evalInputDelta=0.021931499242782593
New Minimum: -0.27520227432250977 > -0.43026281893253326
END: th(781801.26031877)=-0.43026281893253326; dx=-3.935453754646205E-7 evalInputDelta=0.1769920438528061
Fitness changed from -0.2532707750797272 to -0.43026281893253326
Iteration 1 complete. Error: -0.43026281893253326 Total: 55.5387; Orientation: 0.0455; Line Search: 43.5734
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/59bc6854-cdc5-4d4c-b894-2556b52b3850.jpg)

    Adding measurement 3ca52151 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=-0.43026281893253326;dx=-3.46762475113725E-7
    New Minimum: -0.43026281893253326 > -0.6725683361291885
    END: th(1684339.7559414052)=-0.6725683361291885; dx=-2.3232986725207945E-7 evalInputDelta=0.24230551719665527
    Fitness changed from -0.43026281893253326 to -0.6725683361291885
    Iteration 2 complete. Error: -0.6725683361291885 Total: 12.5242; Orientation: 0.0446; Line Search: 8.3715
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/5a247697-ef57-4142-9b64-69c1e88c9a40.jpg)

    Adding measurement 199aa9d8 to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=-0.6725683361291885;dx=-2.1078055215894857E-7
    New Minimum: -0.6725683361291885 > -0.9642234444618225
    END: th(3628800.0)=-0.9642234444618225; dx=-1.1905024283667284E-7 evalInputDelta=0.29165510833263397
    Fitness changed from -0.6725683361291885 to -0.9642234444618225
    Iteration 3 complete. Error: -0.9642234444618225 Total: 13.3517; Orientation: 0.0457; Line Search: 9.0801
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/a403aef0-fec5-4ae9-9d75-d01f77117b39.jpg)

    Adding measurement 2d43d521 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.394e+03, gradient 3.660e-04, dot -0.823; [043ea883-a38b-4c4e-bc26-621475e10204 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.9642234444618225, -0.6725683361291885, -0.43026281893253326, -0.2532707750797272
    LBFGS Accumulation History: 3 points
    Removed measurement 2d43d521 to history. Total: 3
    th(0)=-0.9642234444618225;dx=-1.3397466193349457E-7
    New Minimum: -0.9642234444618225 > -1.2640132158994675
    END: th(7818012.6031877)=-1.2640132158994675; dx=-4.2869644748590466E-8 evalInputDelta=0.29978977143764496
    Fitness changed from -0.9642234444618225 to -1.2640132158994675
    Iteration 4 complete. Error: -1.2640132158994675 Total: 13.9586; Orientation: 1.0306; Line Search: 8.6183
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/e2d96b9e-f393-439c-8fc8-88affe26e3d6.jpg)

    Adding measurement 4df14488 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.874e+03, gradient 3.335e-04, dot -0.597; [043ea883-a38b-4c4e-bc26-621475e10204 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.2640132158994675, -0.6725683361291885, -0.43026281893253326, -0.2532707750797272
    LBFGS Accumulation History: 3 points
    Removed measurement 4df14488 to history. Total: 3
    th(0)=-1.2640132158994675;dx=-1.1121582941883787E-7
    New Minimum: -1.2640132158994675 > -1.4189196527004242
    WOLF (strong): th(1.684339755941405E7)=-1.4189196527004242; dx=1.4860289584196172E-8 evalInputDelta=0.15490643680095673
    New Minimum: -1.4189196527004242 > -1.4491565376520157
    END: th(8421698.779707026)=-1.4491565376520157; dx=-4.394055389920257E-9 evalInputDelta=0.18514332175254822
    Fitness changed from -1.2640132158994675 to -1.4491565376520157
    Iteration 5 complete. Error: -1.4491565376520157 Total: 18.3355; Orientation: 0.9839; Line Search: 13.2308
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/67dfa12d-f0b6-46e2-bce4-16bfc7c190a2.jpg)

    Adding measurement 7dbaeb4 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.928e+03, gradient 3.184e-04, dot -0.493; [043ea883-a38b-4c4e-bc26-621475e10204 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.4491565376520157, -0.6725683361291885, -0.43026281893253326, -0.2532707750797272
    LBFGS Accumulation History: 3 points
    Removed measurement 7dbaeb4 to history. Total: 3
    th(0)=-1.4491565376520157;dx=-1.0136155531775401E-7
    New Minimum: -1.4491565376520157 > -1.451979175209999
    WOLF (strong): th(1.8144E7)=-1.451979175209999; dx=3.854657872464194E-8 evalInputDelta=0.0028226375579833984
    New Minimum: -1.451979175209999 > -1.6010881960391998
    WOLF (strong): th(9072000.0)=-1.6010881960391998; dx=1.628407564268355E-8 evalInputDelta=0.15193165838718414
    END: th(3024000.0)=-1.5602919906377792; dx=-4.725246362119368E-8 evalInputDelta=0.11113545298576355
    Fitness changed from -1.4491565376520157 to -1.6010881960391998
    Iteration 6 complete. Error: -1.6010881960391998 Total: 21.9929; Orientation: 1.0092; Line Search: 16.8216
    Adding measurement 375d1baf to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.725e+03, gradient 2.992e-04, dot -0.436; [043ea883-a38b-4c4e-bc26-621475e10204 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.6010881960391998, -0.6725683361291885, -0.43026281893253326, -0.2532707750797272
    LBFGS Accumulation History: 3 points
    Removed measurement 375d1baf to history. Total: 3
    th(0)=-1.6010881960391998;dx=-8.951041746035398E-8
    New Minimum: -1.6010881960391998 > -1.7305104285478592
    END: th(6515010.502656417)=-1.7305104285478592; dx=-5.6008116610663245E-9 evalInputDelta=0.12942223250865936
    Fitness changed from -1.6010881960391998 to -1.7305104285478592
    Iteration 7 complete. Error: -1.7305104285478592 Total: 14.3671; Orientation: 0.9883; Line Search: 8.8030
    Adding measurement 14f0b369 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.048e+03, gradient 2.004e-04, dot -0.544; [043ea883-a38b-4c4e-bc26-621475e10204 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.7305104285478592, -0.6725683361291885, -0.43026281893253326, -0.2532707750797272
    LBFGS Accumulation History: 3 points
    Removed measurement 14f0b369 to history. Total: 3
    th(0)=-1.7305104285478592;dx=-4.017961284086818E-8
    New Minimum: -1.7305104285478592 > -1.8179379105567932
    WOLF (strong): th(1.4036164632845046E7)=-1.8179379105567932; dx=9.487943905026617E-9 evalInputDelta=0.08742748200893402
    New Minimum: -1.8179379105567932 > -1.8179533034563065
    END: th(7018082.316422523)=-1.8179533034563065; dx=-1.0908970664313226E-8 evalInputDelta=0.08744287490844727
    Fitness changed from -1.7305104285478592 to -1.8179533034563065
    Iteration 8 complete. Error: -1.8179533034563065 Total: 18.0434; Orientation: 0.9930; Line Search: 12.6603
    Adding measurement 5df37732 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.177e+03, gradient 1.722e-04, dot -0.570; [043ea883-a38b-4c4e-bc26-621475e10204 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.8179533034563065, -0.6725683361291885, -0.43026281893253326, -0.2532707750797272
    LBFGS Accumulation History: 3 points
    Removed measurement 5df37732 to history. Total: 3
    th(0)=-1.8179533034563065;dx=-2.9651196059106146E-8
    New Minimum: -1.8179533034563065 > -1.8909458816051483
    WOLF (strong): th(1.5120000000000004E7)=-1.8909458816051483; dx=1.1092192015745046E-9 evalInputDelta=0.07299257814884186
    END: th(7560000.000000002)=-1.882365569472313; dx=-6.996924184032497E-9 evalInputDelta=0.06441226601600647
    Fitness changed from -1.8179533034563065 to -1.8909458816051483
    Iteration 9 complete. Error: -1.8909458816051483 Total: 18.9472; Orientation: 0.9766; Line Search: 13.6387
    Adding measurement 2afa0977 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.620e+03, gradient 2.184e-04, dot -0.380; [043ea883-a38b-4c4e-bc26-621475e10204 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.8909458816051483, -0.6725683361291885, -0.43026281893253326, -0.2532707750797272
    LBFGS Accumulation History: 3 points
    Removed measurement 2afa0977 to history. Total: 3
    th(0)=-1.8909458816051483;dx=-4.7696114028900416E-8
    New Minimum: -1.8909458816051483 > -1.8985206633806229
    WOLF (strong): th(1.6287526256641045E7)=-1.8985206633806229; dx=2.645722174215365E-8 evalInputDelta=0.007574781775474548
    New Minimum: -1.8985206633806229 > -1.9714493080973625
    WOLF (strong): th(8143763.128320523)=-1.9714493080973625; dx=4.750901250864936E-9 evalInputDelta=0.0805034264922142
    END: th(2714587.709440174)=-1.9426698833703995; dx=-2.830779277173302E-8 evalInputDelta=0.05172400176525116
    Fitness changed from -1.8909458816051483 to -1.9714493080973625
    Iteration 10 complete. Error: -1.9714493080973625 Total: 21.8918; Orientation: 1.0010; Line Search: 16.7846
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/d6df265e-2bc2-458e-a108-246e10689171.jpg)

    Final threshold in iteration 11: -1.9714493080973625 (> -Infinity) after 209.018s (< 5400.000s)

Returns

    -1.9714493080973625