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 205.30 seconds (2.197 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: 22040012183332
Reset training subject: 22044878227638
Adding measurement 18876e41 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.5958753079175949;dx=-7.740419418288611E-7
New Minimum: -0.5958753079175949 > -0.5958759635686874
END: th(2.154434690031884)=-0.5958759635686874; dx=-6.659190416810257E-7 evalInputDelta=6.556510925292969E-7
Fitness changed from -0.5958753079175949 to -0.5958759635686874
Iteration 1 complete. Error: -0.5958759635686874 Total: 22.3745; Orientation: 0.0464; Line Search: 8.3225
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/75c1f2ba-8a86-4b08-aa45-b07fe5f7773e.jpg)

    Adding measurement 3bd18c55 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=-0.5958759635686874;dx=-6.659111805120282E-7
    New Minimum: -0.5958759635686874 > -0.5958776324987411
    WOLFE (weak): th(4.641588833612779)=-0.5958776324987411; dx=-6.659063533298242E-7 evalInputDelta=1.6689300537109375E-6
    New Minimum: -0.5958776324987411 > -0.5958791524171829
    WOLFE (weak): th(9.283177667225559)=-0.5958791524171829; dx=-6.659059760459864E-7 evalInputDelta=3.1888484954833984E-6
    New Minimum: -0.5958791524171829 > -0.595885306596756
    WOLFE (weak): th(27.849533001676676)=-0.595885306596756; dx=-6.659024067235045E-7 evalInputDelta=9.34302806854248E-6
    New Minimum: -0.595885306596756 > -0.5959131419658661
    WOLFE (weak): th(111.3981320067067)=-0.5959131419658661; dx=-6.65874971129403E-7 evalInputDelta=3.71783971786499E-5
    New Minimum: -0.5959131419658661 > -0.5960614681243896
    WOLFE (weak): th(556.9906600335335)=-0.5960614681243896; dx=-6.65743542969726E-7 evalInputDelta=1.8550455570220947E-4
    New Minimum: -0.5960614681243896 > -0.5969878435134888
    WOLFE (weak): th(3341.9439602012008)=-0.5969878435134888; dx=-6.648458992093591E-7 evalInputDelta=0.0011118799448013306
    New Minimum: -0.5969878435134888 > -0.6036272943019867
    WOLFE (weak): th(23393.607721408407)=-0.6036272943019867; dx=-6.597900214848344E-7 evalInputDelta=0.007751330733299255
    New Minimum: -0.6036272943019867 > -0.655862957239151
    WOLFE (weak): th(187148.86177126726)=-0.655862957239151; dx=-6.157757325603559E-7 evalInputDelta=0.05998699367046356
    New Minimum: -0.655862957239151 > -0.9745832234621048
    END: th(1684339.7559414054)=-0.9745832234621048; dx=-2.72283532912851E-7 evalInputDelta=0.37870725989341736
    Fitness changed from -0.5958759635686874 to -0.9745832234621048
    Iteration 2 complete. Error: -0.9745832234621048 Total: 48.2263; Orientation: 0.0444; Line Search: 44.1864
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/ea8c3d70-4f68-4dc2-9b80-22f99ef7e30c.jpg)

    Adding measurement 44b12b4d to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=-0.9745832234621048;dx=-2.6744328288769065E-7
    New Minimum: -0.9745832234621048 > -1.2913855612277985
    END: th(3628800.0000000005)=-1.2913855612277985; dx=-1.077517864254178E-7 evalInputDelta=0.31680233776569366
    Fitness changed from -0.9745832234621048 to -1.2913855612277985
    Iteration 3 complete. Error: -1.2913855612277985 Total: 12.9905; Orientation: 0.0440; Line Search: 8.6914
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/7dd61722-ee27-4930-94b1-4d92ca0a0991.jpg)

    Adding measurement 6f4dcc8c to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.638e+03, gradient 3.775e-04, dot -0.587; [fb68e5a9-48b5-4cbd-8b0e-8c19c20e9376 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.2913855612277985, -0.9745832234621048, -0.5958759635686874, -0.5958753079175949
    LBFGS Accumulation History: 3 points
    Removed measurement 6f4dcc8c to history. Total: 3
    th(0)=-1.2913855612277985;dx=-1.4247051510152576E-7
    New Minimum: -1.2913855612277985 > -1.5651039630174637
    END: th(7818012.603187701)=-1.5651039630174637; dx=-2.6856187552296626E-8 evalInputDelta=0.2737184017896652
    Fitness changed from -1.2913855612277985 to -1.5651039630174637
    Iteration 4 complete. Error: -1.5651039630174637 Total: 14.0796; Orientation: 1.0207; Line Search: 8.6477
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/a8c96573-b975-437d-a27b-16c707cce1b7.jpg)

    Adding measurement 30b27f60 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.490e+03, gradient 3.477e-04, dot -0.358; [fb68e5a9-48b5-4cbd-8b0e-8c19c20e9376 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.5651039630174637, -0.9745832234621048, -0.5958759635686874, -0.5958753079175949
    LBFGS Accumulation History: 3 points
    Removed measurement 30b27f60 to history. Total: 3
    th(0)=-1.5651039630174637;dx=-1.2090897040636147E-7
    New Minimum: -1.5651039630174637 > -1.6637654900550842
    WOLF (strong): th(1.6843397559414055E7)=-1.6637654900550842; dx=2.2469758267258765E-8 evalInputDelta=0.09866152703762054
    New Minimum: -1.6637654900550842 > -1.7315607368946075
    WOLF (strong): th(8421698.779707028)=-1.7315607368946075; dx=5.335481795421086E-9 evalInputDelta=0.16645677387714386
    END: th(2807232.926569009)=-1.6817970648407936; dx=-5.1481542254462055E-8 evalInputDelta=0.11669310182332993
    Fitness changed from -1.5651039630174637 to -1.7315607368946075
    Iteration 5 complete. Error: -1.7315607368946075 Total: 23.5132; Orientation: 1.3403; Line Search: 17.8965
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/df29e562-7a98-43f6-baad-d7ce0d5a4052.jpg)

    Adding measurement 1512409d to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.592e+03, gradient 3.095e-04, dot -0.291; [fb68e5a9-48b5-4cbd-8b0e-8c19c20e9376 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.7315607368946075, -0.9745832234621048, -0.5958759635686874, -0.5958753079175949
    LBFGS Accumulation History: 3 points
    Removed measurement 1512409d to history. Total: 3
    th(0)=-1.7315607368946075;dx=-9.577276717369816E-8
    New Minimum: -1.7315607368946075 > -1.875015951693058
    END: th(6048000.000000001)=-1.875015951693058; dx=-1.4420212109037278E-8 evalInputDelta=0.14345521479845047
    Fitness changed from -1.7315607368946075 to -1.875015951693058
    Iteration 6 complete. Error: -1.875015951693058 Total: 14.1942; Orientation: 1.0064; Line Search: 8.6221
    Adding measurement 6a797ee3 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.054e+03, gradient 2.098e-04, dot -0.470; [fb68e5a9-48b5-4cbd-8b0e-8c19c20e9376 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.875015951693058, -0.9745832234621048, -0.5958759635686874, -0.5958753079175949
    LBFGS Accumulation History: 3 points
    Removed measurement 6a797ee3 to history. Total: 3
    th(0)=-1.875015951693058;dx=-4.403627475954045E-8
    New Minimum: -1.875015951693058 > -1.9849495589733124
    WOLF (strong): th(1.3030021005312836E7)=-1.9849495589733124; dx=3.6749660822950743E-9 evalInputDelta=0.10993360728025436
    END: th(6515010.502656418)=-1.9682150930166245; dx=-1.527800639846254E-8 evalInputDelta=0.09319914132356644
    Fitness changed from -1.875015951693058 to -1.9849495589733124
    Iteration 7 complete. Error: -1.9849495589733124 Total: 18.7216; Orientation: 1.0666; Line Search: 12.6617
    Adding measurement 5a003a82 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.689e+03, gradient 2.617e-04, dot -0.244; [fb68e5a9-48b5-4cbd-8b0e-8c19c20e9376 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.9849495589733124, -0.9745832234621048, -0.5958759635686874, -0.5958753079175949
    LBFGS Accumulation History: 3 points
    Removed measurement 5a003a82 to history. Total: 3
    th(0)=-1.9849495589733124;dx=-6.849240850755634E-8
    New Minimum: -1.9849495589733124 > -2.017070524394512
    WOLF (strong): th(1.4036164632845048E7)=-2.017070524394512; dx=2.4111123655970206E-8 evalInputDelta=0.0321209654211998
    New Minimum: -2.017070524394512 > -2.0742562487721443
    WOLF (strong): th(7018082.316422524)=-2.0742562487721443; dx=3.1452697707361327E-9 evalInputDelta=0.08930668979883194
    END: th(2339360.7721408415)=-2.044496387243271; dx=-3.399574232840515E-8 evalInputDelta=0.059546828269958496
    Fitness changed from -1.9849495589733124 to -2.0742562487721443
    Iteration 8 complete. Error: -2.0742562487721443 Total: 22.5754; Orientation: 1.0183; Line Search: 17.3408
    Adding measurement 7700815b to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.072e+03, gradient 1.818e-04, dot -0.387; [fb68e5a9-48b5-4cbd-8b0e-8c19c20e9376 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -2.0742562487721443, -0.9745832234621048, -0.5958759635686874, -0.5958753079175949
    LBFGS Accumulation History: 3 points
    Removed measurement 7700815b to history. Total: 3
    th(0)=-2.0742562487721443;dx=-3.303606372156399E-8
    New Minimum: -2.0742562487721443 > -2.130121059715748
    END: th(5040000.000000002)=-2.130121059715748; dx=-1.192116172428625E-8 evalInputDelta=0.055864810943603516
    Fitness changed from -2.0742562487721443 to -2.130121059715748
    Iteration 9 complete. Error: -2.130121059715748 Total: 13.5760; Orientation: 1.0263; Line Search: 8.1666
    Adding measurement 21ee6063 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.296e+03, gradient 1.375e-04, dot -0.522; [fb68e5a9-48b5-4cbd-8b0e-8c19c20e9376 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -2.130121059715748, -0.9745832234621048, -0.5958759635686874, -0.5958753079175949
    LBFGS Accumulation History: 3 points
    Removed measurement 21ee6063 to history. Total: 3
    th(0)=-2.130121059715748;dx=-1.890485334100454E-8
    New Minimum: -2.130121059715748 > -2.18971536308527
    END: th(1.0858350837760698E7)=-2.18971536308527; dx=-5.49108410925631E-9 evalInputDelta=0.059594303369522095
    Fitness changed from -2.130121059715748 to -2.18971536308527
    Iteration 10 complete. Error: -2.18971536308527 Total: 14.9722; Orientation: 1.0138; Line Search: 9.5969
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/ab53f788-3e7d-4595-9695-70cf1eefc110.jpg)

    Final threshold in iteration 11: -2.18971536308527 (> -Infinity) after 205.301s (< 5400.000s)

Returns

    -2.18971536308527