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 213.31 seconds (3.335 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: 683450388936800
Reset training subject: 683455289074900
Adding measurement 611d3b81 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-2730.3228746798427;dx=-0.00633404909554019
New Minimum: -2730.3228746798427 > -2730.337524922514
WOLFE (weak): th(2.154434690031884)=-2730.337524922514; dx=-0.006207634919647577 evalInputDelta=0.014650242671450542
New Minimum: -2730.337524922514 > -2730.35235821313
WOLFE (weak): th(4.308869380063768)=-2730.35235821313; dx=-0.006205532445432621 evalInputDelta=0.02948353328747544
New Minimum: -2730.35235821313 > -2730.411324324597
WOLFE (weak): th(12.926608140191302)=-2730.411324324597; dx=-0.006207256282641956 evalInputDelta=0.08844964475429151
New Minimum: -2730.411324324597 > -2730.6770222785412
WOLFE (weak): th(51.70643256076521)=-2730.6770222785412; dx=-0.006201173533497263 evalInputDelta=0.35414759869854606
New Minimum: -2730.6770222785412 > -2732.0924215699583
WOLFE (weak): th(258.53216280382605)=-2732.0924215699583; dx=-0.006194967558075391 evalInputDelta=1.7695468901156346
New Minimum: -2732.0924215699583 > -2740.8741306378884
WOLFE (weak): th(1551.1929768229563)=-2740.8741306378884; dx=-0.006111539315894689 evalInputDelta=10.551255958045658
New Minimum: -2740.8741306378884 > -2800.449963845096
END: th(10858.350837760694)=-2800.449963845096; dx=-0.005471136791628176 evalInputDelta=70.12708916525344
Fitness changed from -2730.3228746798427 to -2800.449963845096
Iteration 1 complete. Error: -2800.449963845096 Total: 50.3274; Orientation: 0.0994; Line Search: 36.3421
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/e279130f-b412-4f70-b971-7670d0ff5155.jpg)
Adding measurement 28200c71 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-2800.449963845096;dx=-0.00512298798355402
New Minimum: -2800.449963845096 > -2916.3297138698154
END: th(23393.607721408407)=-2916.3297138698154; dx=-0.0038892162899543115 evalInputDelta=115.87975002471921
Fitness changed from -2800.449963845096 to -2916.3297138698154
Iteration 2 complete. Error: -2916.3297138698154 Total: 14.7270; Orientation: 0.0885; Line Search: 9.3507
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/30430455-5e43-4845-890e-13ed53930213.jpg)
Adding measurement 421bec96 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-2916.3297138698154;dx=-0.003529302110074145
New Minimum: -2916.3297138698154 > -3075.844111784601
END: th(50400.00000000001)=-3075.844111784601; dx=-0.002317451218333779 evalInputDelta=159.5143979147856
Fitness changed from -2916.3297138698154 to -3075.844111784601
Iteration 3 complete. Error: -3075.844111784601 Total: 14.5510; Orientation: 0.0930; Line Search: 9.0701
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/4a7403f1-bc62-42ca-b7f3-f1e47a48e26c.jpg)
Adding measurement c13503a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.035e+04, gradient 4.871e-02, dot -0.844; [a8ef2e48-99fd-4015-bfc7-7256e5a11c09 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3075.844111784601, -2916.3297138698154, -2800.449963845096, -2730.3228746798427
LBFGS Accumulation History: 3 points
Removed measurement c13503a to history. Total: 3
th(0)=-3075.844111784601;dx=-0.0023702705173628135
New Minimum: -3075.844111784601 > -3290.5300484876293
END: th(108583.50837760697)=-3290.5300484876293; dx=-0.0014257604033733853 evalInputDelta=214.68593670302835
Fitness changed from -3075.844111784601 to -3290.5300484876293
Iteration 4 complete. Error: -3290.5300484876293 Total: 16.1080; Orientation: 1.7483; Line Search: 9.0606
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/7039229c-0357-4610-9850-c814049d892f.jpg)
Adding measurement 3b85cd3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.361e+04, gradient 4.560e-02, dot -0.721; [a8ef2e48-99fd-4015-bfc7-7256e5a11c09 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3290.5300484876293, -2916.3297138698154, -2800.449963845096, -2730.3228746798427
LBFGS Accumulation History: 3 points
Removed measurement 3b85cd3 to history. Total: 3
th(0)=-3290.5300484876293;dx=-0.0020760178486371583
New Minimum: -3290.5300484876293 > -3524.60309822255
END: th(233936.07721408413)=-3524.60309822255; dx=-4.2099175834917237E-4 evalInputDelta=234.07304973492091
Fitness changed from -3290.5300484876293 to -3524.60309822255
Iteration 5 complete. Error: -3524.60309822255 Total: 16.6710; Orientation: 1.6936; Line Search: 9.4229
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/11b73926-9855-49d2-a29f-00136f1e5e1c.jpg)
Adding measurement 304e4834 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.407e+04, gradient 5.861e-02, dot -0.419; [a8ef2e48-99fd-4015-bfc7-7256e5a11c09 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3524.60309822255, -2916.3297138698154, -2800.449963845096, -2730.3228746798427
LBFGS Accumulation History: 3 points
Removed measurement 304e4834 to history. Total: 3
th(0)=-3524.60309822255;dx=-0.0034306858481786356
Armijo: th(504000.0000000002)=-3221.5296056376696; dx=0.0010571601460975966 evalInputDelta=-303.07349258488057
New Minimum: -3524.60309822255 > -3564.939129915124
WOLF (strong): th(252000.0000000001)=-3564.939129915124; dx=0.0011305318684737373 evalInputDelta=40.33603169257367
New Minimum: -3564.939129915124 > -3693.858010265148
END: th(84000.00000000003)=-3693.858010265148; dx=-5.25567760521059E-4 evalInputDelta=169.25491204259788
Fitness changed from -3524.60309822255 to -3693.858010265148
Iteration 6 complete. Error: -3693.858010265148 Total: 25.1827; Orientation: 1.6711; Line Search: 18.1298
Adding measurement 31ffd12e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.186e+04, gradient 4.503e-02, dot -0.569; [a8ef2e48-99fd-4015-bfc7-7256e5a11c09 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3693.858010265148, -2916.3297138698154, -2800.449963845096, -2730.3228746798427
LBFGS Accumulation History: 3 points
Removed measurement 31ffd12e to history. Total: 3
th(0)=-3693.858010265148;dx=-0.0020217352887516
New Minimum: -3693.858010265148 > -3817.366893553723
WOLF (strong): th(180972.5139626783)=-3817.366893553723; dx=1.1548173814847414E-4 evalInputDelta=123.5088832885749
END: th(90486.25698133915)=-3807.928570758648; dx=-5.594630914973875E-4 evalInputDelta=114.07056049350012
Fitness changed from -3693.858010265148 to -3817.366893553723
Iteration 7 complete. Error: -3817.366893553723 Total: 20.0527; Orientation: 1.6668; Line Search: 14.0265
Adding measurement 13689e9e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.212e+04, gradient 5.888e-02, dot -0.392; [a8ef2e48-99fd-4015-bfc7-7256e5a11c09 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3817.366893553723, -2916.3297138698154, -2800.449963845096, -2730.3228746798427
LBFGS Accumulation History: 3 points
Removed measurement 13689e9e to history. Total: 3
th(0)=-3817.366893553723;dx=-0.0034625510100805288
New Minimum: -3817.366893553723 > -3856.4701476868713
WOLF (strong): th(194946.7310117368)=-3856.4701476868713; dx=0.0012963752249588218 evalInputDelta=39.10325413314831
New Minimum: -3856.4701476868713 > -3963.5861287475514
WOLF (strong): th(97473.3655058684)=-3963.5861287475514; dx=2.1531186236995858E-4 evalInputDelta=146.21923519382835
END: th(32491.121835289465)=-3914.430226737986; dx=-0.0020172482109654 evalInputDelta=97.06333318426277
Fitness changed from -3817.366893553723 to -3963.5861287475514
Iteration 8 complete. Error: -3963.5861287475514 Total: 24.2535; Orientation: 1.5923; Line Search: 18.2989
Adding measurement 4954b72e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.932e+04, gradient 4.694e-02, dot -0.499; [a8ef2e48-99fd-4015-bfc7-7256e5a11c09 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3963.5861287475514, -2916.3297138698154, -2800.449963845096, -2730.3228746798427
LBFGS Accumulation History: 3 points
Removed measurement 4954b72e to history. Total: 3
th(0)=-3963.5861287475514;dx=-0.0021984082942224942
New Minimum: -3963.5861287475514 > -4063.2149832367963
END: th(70000.00000000003)=-4063.2149832367963; dx=-6.231295369501915E-4 evalInputDelta=99.62885448924499
Fitness changed from -3963.5861287475514 to -4063.2149832367963
Iteration 9 complete. Error: -4063.2149832367963 Total: 15.1751; Orientation: 1.6336; Line Search: 9.2270
Adding measurement 13ef203c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.557e+04, gradient 3.634e-02, dot -0.660; [a8ef2e48-99fd-4015-bfc7-7256e5a11c09 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -4063.2149832367963, -2916.3297138698154, -2800.449963845096, -2730.3228746798427
LBFGS Accumulation History: 3 points
Removed measurement 13ef203c to history. Total: 3
th(0)=-4063.2149832367963;dx=-0.0013182580570379084
New Minimum: -4063.2149832367963 > -4168.071976345898
END: th(150810.42830223194)=-4168.071976345898; dx=-2.789675325488711E-4 evalInputDelta=104.85699310910195
Fitness changed from -4063.2149832367963 to -4168.071976345898
Iteration 10 complete. Error: -4168.071976345898 Total: 15.4076; Orientation: 1.5991; Line Search: 9.2626
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/52de19e2-5948-44b4-8d11-12065d0926af.jpg)
Final threshold in iteration 11: -4168.071976345898 (> -Infinity) after 213.305s (< 5400.000s)

Returns

    -4168.071976345898