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 233.80 seconds (3.067 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: 4390940894447
Reset training subject: 4396046583664
Adding measurement 72f9c6cf to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-13.933361545205116;dx=-2.8684663704900114E-6
New Minimum: -13.933361545205116 > -13.93336834013462
WOLFE (weak): th(2.154434690031884)=-13.93336834013462; dx=-2.6147462447815782E-6 evalInputDelta=6.794929504394531E-6
New Minimum: -13.93336834013462 > -13.9333755671978
WOLFE (weak): th(4.308869380063768)=-13.9333755671978; dx=-2.6149073949036873E-6 evalInputDelta=1.4021992683410645E-5
New Minimum: -13.9333755671978 > -13.933402970433235
WOLFE (weak): th(12.926608140191302)=-13.933402970433235; dx=-2.61494519587248E-6 evalInputDelta=4.1425228118896484E-5
New Minimum: -13.933402970433235 > -13.933526024222374
WOLFE (weak): th(51.70643256076521)=-13.933526024222374; dx=-2.6146615686231703E-6 evalInputDelta=1.6447901725769043E-4
New Minimum: -13.933526024222374 > -13.93418374657631
WOLFE (weak): th(258.53216280382605)=-13.93418374657631; dx=-2.6140792207204452E-6 evalInputDelta=8.222013711929321E-4
New Minimum: -13.93418374657631 > -13.938289672136307
WOLFE (weak): th(1551.1929768229563)=-13.938289672136307; dx=-2.6098748312917017E-6 evalInputDelta=0.004928126931190491
New Minimum: -13.938289672136307 > -13.96765561401844
END: th(10858.350837760694)=-13.96765561401844; dx=-2.5784318080773374E-6 evalInputDelta=0.034294068813323975
Fitness changed from -13.933361545205116 to -13.96765561401844
Iteration 1 complete. Error: -13.96765561401844 Total: 56.0165; Orientation: 0.0279; Line Search: 40.4542
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/dadc66d5-3639-473a-80d7-100b1ed31d35.jpg)

    Adding measurement 2f4f06bc to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=-13.96765561401844;dx=-2.5377907262114017E-6
    New Minimum: -13.96765561401844 > -14.038507834076881
    WOLFE (weak): th(23393.607721408407)=-14.038507834076881; dx=-2.4499840767375028E-6 evalInputDelta=0.07085222005844116
    New Minimum: -14.038507834076881 > -14.106786131858826
    WOLFE (weak): th(46787.215442816814)=-14.106786131858826; dx=-2.3574131788121087E-6 evalInputDelta=0.13913051784038544
    New Minimum: -14.106786131858826 > -14.348156660795212
    END: th(140361.64632845044)=-14.348156660795212; dx=-1.891323251615611E-6 evalInputDelta=0.38050104677677155
    Fitness changed from -13.96765561401844 to -14.348156660795212
    Iteration 2 complete. Error: -14.348156660795212 Total: 25.2855; Orientation: 0.0276; Line Search: 20.1839
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/71747eab-33ed-42d3-b156-109f4239690c.jpg)

    Adding measurement 21d9b37e to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=-14.348156660795212;dx=-1.7081603925432436E-6
    New Minimum: -14.348156660795212 > -14.850025728344917
    END: th(302400.00000000006)=-14.850025728344917; dx=-1.0719335907989322E-6 evalInputDelta=0.5018690675497055
    Fitness changed from -14.348156660795212 to -14.850025728344917
    Iteration 3 complete. Error: -14.850025728344917 Total: 15.2207; Orientation: 0.0294; Line Search: 9.9848
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/a8774371-0a5f-4b80-8030-c1eb327cfaab.jpg)

    Adding measurement 35e9d116 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 7.116e+02, gradient 1.084e-03, dot -0.760; [b27fd051-5e47-4561-84e0-8b28eb2c7614 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -14.850025728344917, -14.348156660795212, -13.96765561401844, -13.933361545205116
    LBFGS Accumulation History: 3 points
    Removed measurement 35e9d116 to history. Total: 3
    th(0)=-14.850025728344917;dx=-1.1741665903188197E-6
    New Minimum: -14.850025728344917 > -15.44374331831932
    END: th(651501.0502656418)=-15.44374331831932; dx=-5.60579465291709E-7 evalInputDelta=0.5937175899744034
    Fitness changed from -14.850025728344917 to -15.44374331831932
    Iteration 4 complete. Error: -15.44374331831932 Total: 16.0024; Orientation: 0.6008; Line Search: 10.2323
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/b7d8f76c-6ff6-43a8-9d8a-80bff97bf123.jpg)

    Adding measurement 90bd4d to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 7.886e+02, gradient 9.777e-04, dot -0.632; [b27fd051-5e47-4561-84e0-8b28eb2c7614 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -15.44374331831932, -14.348156660795212, -13.96765561401844, -13.933361545205116
    LBFGS Accumulation History: 3 points
    Removed measurement 90bd4d to history. Total: 3
    th(0)=-15.44374331831932;dx=-9.547587321716245E-7
    New Minimum: -15.44374331831932 > -16.112983137369156
    END: th(1403616.4632845046)=-16.112983137369156; dx=-2.1225511608316827E-7 evalInputDelta=0.6692398190498352
    Fitness changed from -15.44374331831932 to -16.112983137369156
    Iteration 5 complete. Error: -16.112983137369156 Total: 15.7135; Orientation: 0.6058; Line Search: 9.7503
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/71355d3e-f041-4d1d-a2a1-5ccb8d553394.jpg)

    Adding measurement 2d9df51d to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 8.798e+02, gradient 9.141e-04, dot -0.424; [b27fd051-5e47-4561-84e0-8b28eb2c7614 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -16.112983137369156, -14.348156660795212, -13.96765561401844, -13.933361545205116
    LBFGS Accumulation History: 3 points
    Removed measurement 2d9df51d to history. Total: 3
    th(0)=-16.112983137369156;dx=-8.348284941528262E-7
    New Minimum: -16.112983137369156 > -16.560284048318863
    WOLF (strong): th(3024000.0000000005)=-16.560284048318863; dx=6.069164177955336E-8 evalInputDelta=0.44730091094970703
    New Minimum: -16.560284048318863 > -16.67192953824997
    END: th(1512000.0000000002)=-16.67192953824997; dx=-1.7555483896100056E-8 evalInputDelta=0.5589464008808136
    Fitness changed from -16.112983137369156 to -16.67192953824997
    Iteration 6 complete. Error: -16.67192953824997 Total: 21.1419; Orientation: 0.6264; Line Search: 14.8907
    Adding measurement 76b2ea9 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.054e+03, gradient 9.220e-04, dot -0.342; [b27fd051-5e47-4561-84e0-8b28eb2c7614 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -16.67192953824997, -14.348156660795212, -13.96765561401844, -13.933361545205116
    LBFGS Accumulation History: 3 points
    Removed measurement 76b2ea9 to history. Total: 3
    th(0)=-16.67192953824997;dx=-8.49500428435077E-7
    Armijo: th(3257505.251328209)=-16.59809759259224; dx=2.621713710890085E-7 evalInputDelta=-0.0738319456577301
    New Minimum: -16.67192953824997 > -17.129823714494705
    WOLF (strong): th(1628752.6256641045)=-17.129823714494705; dx=1.5629497100420193E-7 evalInputDelta=0.4578941762447357
    END: th(542917.5418880348)=-17.07780370116234; dx=-3.6778685231423144E-7 evalInputDelta=0.4058741629123688
    Fitness changed from -16.67192953824997 to -17.129823714494705
    Iteration 7 complete. Error: -17.129823714494705 Total: 26.0590; Orientation: 0.6032; Line Search: 20.4439
    Adding measurement 7086ba1d to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.148e+03, gradient 9.220e-04, dot -0.297; [b27fd051-5e47-4561-84e0-8b28eb2c7614 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -17.129823714494705, -14.348156660795212, -13.96765561401844, -13.933361545205116
    LBFGS Accumulation History: 3 points
    Removed measurement 7086ba1d to history. Total: 3
    th(0)=-17.129823714494705;dx=-8.49394909776679E-7
    New Minimum: -17.129823714494705 > -17.62478420138359
    WOLF (strong): th(1169680.3860704205)=-17.62478420138359; dx=3.88734092051399E-8 evalInputDelta=0.4949604868888855
    END: th(584840.1930352102)=-17.542727828025818; dx=-3.1459636829024196E-7 evalInputDelta=0.41290411353111267
    Fitness changed from -17.129823714494705 to -17.62478420138359
    Iteration 8 complete. Error: -17.62478420138359 Total: 21.5804; Orientation: 0.5972; Line Search: 15.8524
    Adding measurement 6770fc5c to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.527e+03, gradient 6.452e-04, dot -0.455; [b27fd051-5e47-4561-84e0-8b28eb2c7614 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -17.62478420138359, -14.348156660795212, -13.96765561401844, -13.933361545205116
    LBFGS Accumulation History: 3 points
    Removed measurement 6770fc5c to history. Total: 3
    th(0)=-17.62478420138359;dx=-4.1596938276954115E-7
    New Minimum: -17.62478420138359 > -17.97129988670349
    END: th(1260000.0000000002)=-17.97129988670349; dx=-5.257706381202302E-8 evalInputDelta=0.3465156853199005
    Fitness changed from -17.62478420138359 to -17.97129988670349
    Iteration 9 complete. Error: -17.97129988670349 Total: 15.8128; Orientation: 0.6013; Line Search: 10.1200
    Adding measurement 7c4384c3 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.844e+03, gradient 5.365e-04, dot -0.563; [b27fd051-5e47-4561-84e0-8b28eb2c7614 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -17.97129988670349, -14.348156660795212, -13.96765561401844, -13.933361545205116
    LBFGS Accumulation History: 3 points
    Removed measurement 7c4384c3 to history. Total: 3
    th(0)=-17.97129988670349;dx=-2.8754731271695446E-7
    New Minimum: -17.97129988670349 > -18.158998668193817
    WOLF (strong): th(2714587.709440174)=-18.158998668193817; dx=6.096038362579354E-8 evalInputDelta=0.18769878149032593
    New Minimum: -18.158998668193817 > -18.215390592813492
    END: th(1357293.854720087)=-18.215390592813492; dx=-3.706174604169946E-8 evalInputDelta=0.2440907061100006
    Fitness changed from -17.97129988670349 to -18.215390592813492
    Iteration 10 complete. Error: -18.215390592813492 Total: 20.7095; Orientation: 0.5958; Line Search: 15.3061
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/cc6ee550-beee-43bc-bfc5-ba8f788d2ce4.jpg)

    Final threshold in iteration 11: -18.215390592813492 (> -Infinity) after 233.803s (< 5400.000s)

Returns

    -18.215390592813492