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 211.02 seconds (1.826 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: 10485232318606
Reset training subject: 10489248116693
Adding measurement 26f19f23 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.38845549523830414;dx=-5.173080488435614E-7
New Minimum: -0.38845549523830414 > -0.3884558081626892
WOLFE (weak): th(2.154434690031884)=-0.3884558081626892; dx=-4.7504726486934023E-7 evalInputDelta=3.129243850708008E-7
New Minimum: -0.3884558081626892 > -0.3884562700986862
WOLFE (weak): th(4.308869380063768)=-0.3884562700986862; dx=-4.7501922132075143E-7 evalInputDelta=7.748603820800781E-7
New Minimum: -0.3884562700986862 > -0.3884584605693817
WOLFE (weak): th(12.926608140191302)=-0.3884584605693817; dx=-4.7501221785832417E-7 evalInputDelta=2.9653310775756836E-6
New Minimum: -0.3884584605693817 > -0.38846781849861145
WOLFE (weak): th(51.70643256076521)=-0.38846781849861145; dx=-4.75016127705595E-7 evalInputDelta=1.2323260307312012E-5
New Minimum: -0.38846781849861145 > -0.3885168731212616
WOLFE (weak): th(258.53216280382605)=-0.3885168731212616; dx=-4.749885685248206E-7 evalInputDelta=6.13778829574585E-5
New Minimum: -0.3885168731212616 > -0.3888237923383713
WOLFE (weak): th(1551.1929768229563)=-0.3888237923383713; dx=-4.748404892994864E-7 evalInputDelta=3.6829710006713867E-4
New Minimum: -0.3888237923383713 > -0.39103148877620697
WOLFE (weak): th(10858.350837760694)=-0.39103148877620697; dx=-4.7395451900122906E-7 evalInputDelta=0.002575993537902832
New Minimum: -0.39103148877620697 > -0.4088766574859619
END: th(86866.80670208555)=-0.4088766574859619; dx=-4.6524425658720457E-7 evalInputDelta=0.020421162247657776
Fitness changed from -0.38845549523830414 to -0.4088766574859619
Iteration 1 complete. Error: -0.4088766574859619 Total: 51.4795; Orientation: 0.0447; Line Search: 39.0146
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/d143777f-8023-4d08-a8a0-84d275dd6f8c.jpg)

    Adding measurement 536178ca to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=-0.4088766574859619;dx=-4.5830969110955166E-7
    New Minimum: -0.4088766574859619 > -0.4507691562175751
    WOLFE (weak): th(187148.86177126726)=-0.4507691562175751; dx=-4.369329434188116E-7 evalInputDelta=0.04189249873161316
    New Minimum: -0.4507691562175751 > -0.49062401056289673
    WOLFE (weak): th(374297.7235425345)=-0.49062401056289673; dx=-4.149958131905365E-7 evalInputDelta=0.08174735307693481
    New Minimum: -0.49062401056289673 > -0.6289734542369843
    END: th(1122893.1706276035)=-0.6289734542369843; dx=-3.255437019543798E-7 evalInputDelta=0.22009679675102234
    Fitness changed from -0.4088766574859619 to -0.6289734542369843
    Iteration 2 complete. Error: -0.6289734542369843 Total: 21.7855; Orientation: 0.0453; Line Search: 17.6304
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/b0aa9dfd-7243-473a-b665-cb5f8219da68.jpg)

    Adding measurement 211b012b to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=-0.6289734542369843;dx=-2.8347555746097267E-7
    New Minimum: -0.6289734542369843 > -0.8987981975078583
    END: th(2419200.0000000005)=-0.8987981975078583; dx=-1.7014182246454988E-7 evalInputDelta=0.269824743270874
    Fitness changed from -0.6289734542369843 to -0.8987981975078583
    Iteration 3 complete. Error: -0.8987981975078583 Total: 12.9028; Orientation: 0.0433; Line Search: 8.4235
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/aaa772fd-d54a-4e92-acb6-a08e37123f5b.jpg)

    Adding measurement 68068642 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.003e+03, gradient 3.917e-04, dot -0.812; [53389d4b-bfc6-446f-96a2-847e34dbba28 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.8987981975078583, -0.6289734542369843, -0.4088766574859619, -0.38845549523830414
    LBFGS Accumulation History: 3 points
    Removed measurement 68068642 to history. Total: 3
    th(0)=-0.8987981975078583;dx=-1.5346243379974255E-7
    New Minimum: -0.8987981975078583 > -1.1899223923683167
    END: th(5212008.402125134)=-1.1899223923683167; dx=-7.835603631304288E-8 evalInputDelta=0.2911241948604584
    Fitness changed from -0.8987981975078583 to -1.1899223923683167
    Iteration 4 complete. Error: -1.1899223923683167 Total: 13.9748; Orientation: 1.0253; Line Search: 8.7789
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/c5a7dc62-f8a4-4ef0-aeff-a15d207b21c4.jpg)

    Adding measurement 56e398fb to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.803e+03, gradient 3.017e-04, dot -0.681; [53389d4b-bfc6-446f-96a2-847e34dbba28 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.1899223923683167, -0.6289734542369843, -0.4088766574859619, -0.38845549523830414
    LBFGS Accumulation History: 3 points
    Removed measurement 56e398fb to history. Total: 3
    th(0)=-1.1899223923683167;dx=-9.103729601409483E-8
    New Minimum: -1.1899223923683167 > -1.4662536531686783
    END: th(1.1228931706276037E7)=-1.4662536531686783; dx=-2.340974779154805E-8 evalInputDelta=0.27633126080036163
    Fitness changed from -1.1899223923683167 to -1.4662536531686783
    Iteration 5 complete. Error: -1.4662536531686783 Total: 14.2946; Orientation: 1.0313; Line Search: 8.8002
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/5ce7677b-bb19-4e63-9c2c-7900e5cc6dd2.jpg)

    Adding measurement 726d35b8 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.754e+03, gradient 2.839e-04, dot -0.391; [53389d4b-bfc6-446f-96a2-847e34dbba28 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.4662536531686783, -0.6289734542369843, -0.4088766574859619, -0.38845549523830414
    LBFGS Accumulation History: 3 points
    Removed measurement 726d35b8 to history. Total: 3
    th(0)=-1.4662536531686783;dx=-8.062301786550314E-8
    New Minimum: -1.4662536531686783 > -1.5551731139421463
    WOLF (strong): th(2.4192000000000004E7)=-1.5551731139421463; dx=1.663101067478068E-8 evalInputDelta=0.08891946077346802
    New Minimum: -1.5551731139421463 > -1.6257729232311249
    WOLF (strong): th(1.2096000000000002E7)=-1.6257729232311249; dx=3.83254365592949E-9 evalInputDelta=0.1595192700624466
    END: th(4032000.0000000005)=-1.5795332044363022; dx=-3.502956076192953E-8 evalInputDelta=0.1132795512676239
    Fitness changed from -1.4662536531686783 to -1.6257729232311249
    Iteration 6 complete. Error: -1.6257729232311249 Total: 22.6413; Orientation: 1.0272; Line Search: 17.4707
    Adding measurement 288ee780 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.735e+03, gradient 2.719e-04, dot -0.305; [53389d4b-bfc6-446f-96a2-847e34dbba28 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.6257729232311249, -0.6289734542369843, -0.4088766574859619, -0.38845549523830414
    LBFGS Accumulation History: 3 points
    Removed measurement 288ee780 to history. Total: 3
    th(0)=-1.6257729232311249;dx=-7.394881095207734E-8
    New Minimum: -1.6257729232311249 > -1.7781275808811188
    END: th(8686680.670208557)=-1.7781275808811188; dx=-6.0735259567671445E-9 evalInputDelta=0.1523546576499939
    Fitness changed from -1.6257729232311249 to -1.7781275808811188
    Iteration 7 complete. Error: -1.7781275808811188 Total: 14.3079; Orientation: 1.0055; Line Search: 8.7592
    Adding measurement 738391c5 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.111e+03, gradient 1.909e-04, dot -0.431; [53389d4b-bfc6-446f-96a2-847e34dbba28 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.7781275808811188, -0.6289734542369843, -0.4088766574859619, -0.38845549523830414
    LBFGS Accumulation History: 3 points
    Removed measurement 738391c5 to history. Total: 3
    th(0)=-1.7781275808811188;dx=-3.6454906001216016E-8
    New Minimum: -1.7781275808811188 > -1.8723936975002289
    WOLF (strong): th(1.8714886177126728E7)=-1.8723936975002289; dx=9.100508557487981E-9 evalInputDelta=0.09426611661911011
    New Minimum: -1.8723936975002289 > -1.8779283612966537
    END: th(9357443.088563364)=-1.8779283612966537; dx=-8.342322868112794E-9 evalInputDelta=0.09980078041553497
    Fitness changed from -1.7781275808811188 to -1.8779283612966537
    Iteration 8 complete. Error: -1.8779283612966537 Total: 19.2637; Orientation: 1.4053; Line Search: 13.1890
    Adding measurement 6ac00592 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.381e+03, gradient 1.658e-04, dot -0.472; [53389d4b-bfc6-446f-96a2-847e34dbba28 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.8779283612966537, -0.6289734542369843, -0.4088766574859619, -0.38845549523830414
    LBFGS Accumulation History: 3 points
    Removed measurement 6ac00592 to history. Total: 3
    th(0)=-1.8779283612966537;dx=-2.7505121737967962E-8
    New Minimum: -1.8779283612966537 > -1.9469109624624252
    WOLF (strong): th(2.0160000000000004E7)=-1.9469109624624252; dx=4.053245828325222E-9 evalInputDelta=0.06898260116577148
    New Minimum: -1.9469109624624252 > -1.9505929201841354
    END: th(1.0080000000000002E7)=-1.9505929201841354; dx=-3.921923425926912E-9 evalInputDelta=0.07266455888748169
    Fitness changed from -1.8779283612966537 to -1.9505929201841354
    Iteration 9 complete. Error: -1.9505929201841354 Total: 18.8209; Orientation: 1.0345; Line Search: 13.4417
    Adding measurement 74d0e41c to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.378e+03, gradient 1.642e-04, dot -0.425; [53389d4b-bfc6-446f-96a2-847e34dbba28 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.9505929201841354, -0.6289734542369843, -0.4088766574859619, -0.38845549523830414
    LBFGS Accumulation History: 3 points
    Removed measurement 74d0e41c to history. Total: 3
    th(0)=-1.9505929201841354;dx=-2.6960021342166286E-8
    New Minimum: -1.9505929201841354 > -1.9769268780946732
    WOLF (strong): th(2.1716701675521392E7)=-1.9769268780946732; dx=8.61600278474765E-9 evalInputDelta=0.02633395791053772
    New Minimum: -1.9769268780946732 > -2.0091234147548676
    WOLF (strong): th(1.0858350837760696E7)=-2.0091234147548676; dx=1.603215348496672E-9 evalInputDelta=0.05853049457073212
    END: th(3619450.2792535652)=-1.9885979443788528; dx=-1.514001252176773E-8 evalInputDelta=0.03800502419471741
    Fitness changed from -1.9505929201841354 to -2.0091234147548676
    Iteration 10 complete. Error: -2.0091234147548676 Total: 21.4753; Orientation: 1.0190; Line Search: 16.4653
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/846f4b7f-1fec-4dbf-b394-16a014893024.jpg)

    Final threshold in iteration 11: -2.0091234147548676 (> -Infinity) after 211.014s (< 5400.000s)

Returns

    -2.0091234147548676