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 2330.17 seconds (12.106 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: 6239467966695
Reset training subject: 6288513103913
Adding measurement fa57df0 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-4.211720898747444;dx=-2.479186944569765E-7
New Minimum: -4.211720898747444 > -4.211721166968346
WOLFE (weak): th(2.154434690031884)=-4.211721166968346; dx=-2.2810696703002494E-7 evalInputDelta=2.682209014892578E-7
New Minimum: -4.211721166968346 > -4.21172171831131
END: th(4.308869380063768)=-4.21172171831131; dx=-2.0904467722268268E-7 evalInputDelta=8.195638656616211E-7
Fitness changed from -4.211720898747444 to -4.21172171831131
Iteration 1 complete. Error: -4.21172171831131 Total: 294.1555; Orientation: 0.0873; Line Search: 146.9284
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/2ca5133d-632c-4497-aa58-361ee8208eef.jpg)

    Adding measurement 260049ba to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=-4.21172171831131;dx=-1.898424026473577E-7
    New Minimum: -4.21172171831131 > -4.21172396838665
    WOLFE (weak): th(9.283177667225559)=-4.21172396838665; dx=-1.898213899382703E-7 evalInputDelta=2.250075340270996E-6
    New Minimum: -4.21172396838665 > -4.211726173758507
    WOLFE (weak): th(18.566355334451117)=-4.211726173758507; dx=-2.069921948214589E-7 evalInputDelta=4.455447196960449E-6
    New Minimum: -4.211726173758507 > -4.21173483133316
    WOLFE (weak): th(55.69906600335335)=-4.21173483133316; dx=-2.101567621689615E-7 evalInputDelta=1.3113021850585938E-5
    New Minimum: -4.21173483133316 > -4.211774155497551
    WOLFE (weak): th(222.7962640134134)=-4.211774155497551; dx=-2.1014690902676732E-7 evalInputDelta=5.24371862411499E-5
    New Minimum: -4.211774155497551 > -4.211982727050781
    WOLFE (weak): th(1113.981320067067)=-4.211982727050781; dx=-2.0895315166287067E-7 evalInputDelta=2.6100873947143555E-4
    New Minimum: -4.211982727050781 > -4.213286399841309
    WOLFE (weak): th(6683.8879204024015)=-4.213286399841309; dx=-2.0882206426312015E-7 evalInputDelta=0.0015646815299987793
    New Minimum: -4.213286399841309 > -4.222647249698639
    WOLFE (weak): th(46787.215442816814)=-4.222647249698639; dx=-2.0781640463140864E-7 evalInputDelta=0.010925531387329102
    New Minimum: -4.222647249698639 > -4.297250807285309
    WOLFE (weak): th(374297.7235425345)=-4.297250807285309; dx=-1.984053174750082E-7 evalInputDelta=0.08552908897399902
    New Minimum: -4.297250807285309 > -4.819967731833458
    END: th(3368679.511882811)=-4.819967731833458; dx=-1.1721670562283389E-7 evalInputDelta=0.6082460135221481
    Fitness changed from -4.21172171831131 to -4.819967731833458
    Iteration 2 complete. Error: -4.819967731833458 Total: 541.7932; Orientation: 0.0870; Line Search: 492.0141
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/336fff99-94b6-4e1b-a71a-12dc10fdd61a.jpg)

    Adding measurement 794b0829 to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=-4.819967731833458;dx=-1.1645325242965311E-7
    New Minimum: -4.819967731833458 > -5.509668678045273
    END: th(7257600.000000001)=-5.509668678045273; dx=-5.932899075280531E-8 evalInputDelta=0.6897009462118149
    Fitness changed from -4.819967731833458 to -5.509668678045273
    Iteration 3 complete. Error: -5.509668678045273 Total: 148.8393; Orientation: 0.0867; Line Search: 98.1278
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/93f46cf0-8078-4b8e-a06a-931a4528449d.jpg)

    Adding measurement 52e89947 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.401e+03, gradient 2.545e-04, dot -0.666; [25a0a2ef-9b93-4456-8d2f-6b10231d0c09 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -5.509668678045273, -4.819967731833458, -4.21172171831131, -4.211720898747444
    LBFGS Accumulation History: 3 points
    Removed measurement 52e89947 to history. Total: 3
    th(0)=-5.509668678045273;dx=-6.495414740242119E-8
    New Minimum: -5.509668678045273 > -6.2510494738817215
    END: th(1.5636025206375401E7)=-6.2510494738817215; dx=-2.8062231941395585E-8 evalInputDelta=0.7413807958364487
    Fitness changed from -5.509668678045273 to -6.2510494738817215
    Iteration 4 complete. Error: -6.2510494738817215 Total: 150.1412; Orientation: 2.3295; Line Search: 98.1447
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/ae4de476-72bd-4879-925c-523e62ae9be7.jpg)

    Adding measurement 4c1eb410 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.374e+03, gradient 2.046e-04, dot -0.593; [25a0a2ef-9b93-4456-8d2f-6b10231d0c09 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -6.2510494738817215, -4.819967731833458, -4.21172171831131, -4.211720898747444
    LBFGS Accumulation History: 3 points
    Removed measurement 4c1eb410 to history. Total: 3
    th(0)=-6.2510494738817215;dx=-4.1489326848051637E-8
    New Minimum: -6.2510494738817215 > -6.782912343740463
    END: th(3.368679511882811E7)=-6.782912343740463; dx=-5.495393920405027E-9 evalInputDelta=0.5318628698587418
    Fitness changed from -6.2510494738817215 to -6.782912343740463
    Iteration 5 complete. Error: -6.782912343740463 Total: 151.0940; Orientation: 2.2713; Line Search: 98.7899
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/9f6a9349-337e-4384-a701-f2304947aa44.jpg)

    Adding measurement 5d8556b8 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.879e+03, gradient 3.241e-04, dot -0.161; [25a0a2ef-9b93-4456-8d2f-6b10231d0c09 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -6.782912343740463, -4.819967731833458, -4.21172171831131, -4.211720898747444
    LBFGS Accumulation History: 3 points
    Removed measurement 5d8556b8 to history. Total: 3
    th(0)=-6.782912343740463;dx=-1.0501346606232876E-7
    Armijo: th(7.257600000000001E7)=-5.873853653669357; dx=1.7006682449186723E-8 evalInputDelta=-0.909058690071106
    Armijo: th(3.628800000000001E7)=-6.69685971736908; dx=1.5174627422480856E-8 evalInputDelta=-0.08605262637138367
    New Minimum: -6.782912343740463 > -7.054796174168587
    WOLF (strong): th(1.2096000000000002E7)=-7.054796174168587; dx=1.446775958959327E-9 evalInputDelta=0.2718838304281235
    END: th(3024000.0000000005)=-6.983523860573769; dx=-3.0261595485390176E-8 evalInputDelta=0.20061151683330536
    Fitness changed from -6.782912343740463 to -7.054796174168587
    Iteration 6 complete. Error: -7.054796174168587 Total: 297.8732; Orientation: 2.2842; Line Search: 245.0570
    Adding measurement 3bc2b439 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.208e+03, gradient 1.604e-04, dot -0.318; [25a0a2ef-9b93-4456-8d2f-6b10231d0c09 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -7.054796174168587, -4.819967731833458, -4.21172171831131, -4.211720898747444
    LBFGS Accumulation History: 3 points
    Removed measurement 3bc2b439 to history. Total: 3
    th(0)=-7.054796174168587;dx=-2.3277463856479723E-8
    New Minimum: -7.054796174168587 > -7.192599385976791
    END: th(6515010.502656418)=-7.192599385976791; dx=-1.117719116800558E-8 evalInputDelta=0.13780321180820465
    Fitness changed from -7.054796174168587 to -7.192599385976791
    Iteration 7 complete. Error: -7.192599385976791 Total: 150.5121; Orientation: 2.2175; Line Search: 99.3498
    Adding measurement 3fb1e880 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.847e+03, gradient 1.210e-04, dot -0.499; [25a0a2ef-9b93-4456-8d2f-6b10231d0c09 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -7.192599385976791, -4.819967731833458, -4.21172171831131, -4.211720898747444
    LBFGS Accumulation History: 3 points
    Removed measurement 3fb1e880 to history. Total: 3
    th(0)=-7.192599385976791;dx=-1.4203051467835758E-8
    New Minimum: -7.192599385976791 > -7.328351691365242
    END: th(1.4036164632845048E7)=-7.328351691365242; dx=-7.498923096148565E-9 evalInputDelta=0.13575230538845062
    Fitness changed from -7.192599385976791 to -7.328351691365242
    Iteration 8 complete. Error: -7.328351691365242 Total: 149.1530; Orientation: 2.2343; Line Search: 97.9120
    Adding measurement 556bcb08 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.761e+03, gradient 1.193e-04, dot -0.464; [25a0a2ef-9b93-4456-8d2f-6b10231d0c09 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -7.328351691365242, -4.819967731833458, -4.21172171831131, -4.211720898747444
    LBFGS Accumulation History: 3 points
    Removed measurement 556bcb08 to history. Total: 3
    th(0)=-7.328351691365242;dx=-1.4202802181287981E-8
    New Minimum: -7.328351691365242 > -7.362099424004555
    WOLF (strong): th(3.024000000000001E7)=-7.362099424004555; dx=1.179831884821358E-9 evalInputDelta=0.033747732639312744
    New Minimum: -7.362099424004555 > -7.4137652814388275
    WOLF (strong): th(1.5120000000000006E7)=-7.4137652814388275; dx=2.3998295621838206E-9 evalInputDelta=0.08541359007358551
    END: th(5040000.000000002)=-7.39122648537159; dx=-8.34269146485296E-9 evalInputDelta=0.06287479400634766
    Fitness changed from -7.328351691365242 to -7.4137652814388275
    Iteration 9 complete. Error: -7.4137652814388275 Total: 247.1330; Orientation: 2.2924; Line Search: 196.2738
    Adding measurement 52be1a06 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.636e+03, gradient 1.748e-04, dot -0.274; [25a0a2ef-9b93-4456-8d2f-6b10231d0c09 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -7.4137652814388275, -4.819967731833458, -4.21172171831131, -4.211720898747444
    LBFGS Accumulation History: 3 points
    Removed measurement 52be1a06 to history. Total: 3
    th(0)=-7.4137652814388275;dx=-3.0558083332109255E-8
    New Minimum: -7.4137652814388275 > -7.4981091767549515
    WOLF (strong): th(1.0858350837760698E7)=-7.4981091767549515; dx=1.3327034236996175E-9 evalInputDelta=0.08434389531612396
    New Minimum: -7.4981091767549515 > -7.499737724661827
    END: th(5429175.418880349)=-7.499737724661827; dx=-3.927970062451879E-9 evalInputDelta=0.08597244322299957
    Fitness changed from -7.4137652814388275 to -7.499737724661827
    Iteration 10 complete. Error: -7.499737724661827 Total: 198.3362; Orientation: 2.2119; Line Search: 147.1289
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/be47aec0-6cad-4edb-a25a-e73d14c7c6c5.jpg)

    Final threshold in iteration 11: -7.499737724661827 (> -Infinity) after 2330.170s (< 5400.000s)

Returns

    -7.499737724661827