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 577.44 seconds (3.430 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: 545822059506
Reset training subject: 558047197621
Adding measurement 1c0afc6b to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-18.570977799594402;dx=-1.8323471537500876E-6
New Minimum: -18.570977799594402 > -18.5709815248847
WOLFE (weak): th(2.154434690031884)=-18.5709815248847; dx=-1.8204589286420205E-6 evalInputDelta=3.725290298461914E-6
New Minimum: -18.5709815248847 > -18.570986106991768
WOLFE (weak): th(4.308869380063768)=-18.570986106991768; dx=-1.8205329083745551E-6 evalInputDelta=8.307397365570068E-6
New Minimum: -18.570986106991768 > -18.571004323661327
WOLFE (weak): th(12.926608140191302)=-18.571004323661327; dx=-1.8204556956968228E-6 evalInputDelta=2.6524066925048828E-5
New Minimum: -18.571004323661327 > -18.57108610123396
WOLFE (weak): th(51.70643256076521)=-18.57108610123396; dx=-1.8205530355247382E-6 evalInputDelta=1.0830163955688477E-4
New Minimum: -18.57108610123396 > -18.5715217217803
WOLFE (weak): th(258.53216280382605)=-18.5715217217803; dx=-1.8205288827786237E-6 evalInputDelta=5.439221858978271E-4
New Minimum: -18.5715217217803 > -18.574243292212486
WOLFE (weak): th(1551.1929768229563)=-18.574243292212486; dx=-1.8208287897407504E-6 evalInputDelta=0.003265492618083954
New Minimum: -18.574243292212486 > -18.59386184066534
WOLFE (weak): th(10858.350837760694)=-18.59386184066534; dx=-1.824223497768939E-6 evalInputDelta=0.02288404107093811
New Minimum: -18.59386184066534 > -18.755351334810257
WOLFE (weak): th(86866.80670208555)=-18.755351334810257; dx=-1.8439669425025808E-6 evalInputDelta=0.18437353521585464
New Minimum: -18.755351334810257 > -20.12570622563362
END: th(781801.26031877)=-20.12570622563362; dx=-1.4508555068745909E-6 evalInputDelta=1.554728426039219
Fitness changed from -18.570977799594402 to -20.12570622563362
Iteration 1 complete. Error: -20.12570622563362 Total: 162.7727; Orientation: 0.3451; Line Search: 125.7618
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/9f06c233-ce1c-4e91-92fa-205cccc59fdc.jpg)

    Adding measurement 1458cb25 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=-20.12570622563362;dx=-1.8480945232523039E-6
    New Minimum: -20.12570622563362 > -22.86666790395975
    END: th(1684339.7559414052)=-22.86666790395975; dx=-1.0437272736571299E-6 evalInputDelta=2.74096167832613
    Fitness changed from -20.12570622563362 to -22.86666790395975
    Iteration 2 complete. Error: -22.86666790395975 Total: 38.6774; Orientation: 0.0734; Line Search: 25.0125
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/0aeabbe2-8e87-46e5-a458-dd053aecab95.jpg)

    Adding measurement 3f824ef8 to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=-22.86666790395975;dx=-1.6541679780272798E-6
    New Minimum: -22.86666790395975 > -27.082862690091133
    END: th(3628800.0)=-27.082862690091133; dx=-6.119680338514926E-7 evalInputDelta=4.216194786131382
    Fitness changed from -22.86666790395975 to -27.082862690091133
    Iteration 3 complete. Error: -27.082862690091133 Total: 37.8787; Orientation: 0.0716; Line Search: 24.0598
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/a2de3a5a-d33e-406e-b3e0-2d7ef9dc7701.jpg)

    Adding measurement 362e981b to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.261e+04, gradient 1.168e-03, dot -0.489; [5cd72a2d-bc10-4ccb-be63-a5beac639c6a = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -27.082862690091133, -22.86666790395975, -20.12570622563362, -18.570977799594402
    LBFGS Accumulation History: 3 points
    Removed measurement 362e981b to history. Total: 3
    th(0)=-27.082862690091133;dx=-1.3651220544349159E-6
    New Minimum: -27.082862690091133 > -31.736178040504456
    END: th(7818012.6031877)=-31.736178040504456; dx=-2.1809802433159803E-7 evalInputDelta=4.6533153504133224
    Fitness changed from -27.082862690091133 to -31.736178040504456
    Iteration 4 complete. Error: -31.736178040504456 Total: 40.1941; Orientation: 1.6167; Line Search: 25.1066
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/cd20b53b-59c7-4479-bda4-3a355ba3d51b.jpg)

    Adding measurement 7ddb2f9a to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.448e+04, gradient 1.076e-03, dot -0.336; [5cd72a2d-bc10-4ccb-be63-a5beac639c6a = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -31.736178040504456, -22.86666790395975, -20.12570622563362, -18.570977799594402
    LBFGS Accumulation History: 3 points
    Removed measurement 7ddb2f9a to history. Total: 3
    th(0)=-31.736178040504456;dx=-1.157710662867107E-6
    New Minimum: -31.736178040504456 > -35.23659339547157
    WOLF (strong): th(1.684339755941405E7)=-35.23659339547157; dx=3.308540881137536E-8 evalInputDelta=3.5004153549671173
    New Minimum: -35.23659339547157 > -35.40020255744457
    END: th(8421698.779707026)=-35.40020255744457; dx=-3.384482388155367E-8 evalInputDelta=3.664024516940117
    Fitness changed from -31.736178040504456 to -35.40020255744457
    Iteration 5 complete. Error: -35.40020255744457 Total: 51.9048; Orientation: 1.5760; Line Search: 37.5421
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/35af8d64-15ef-4f6d-ad36-cccdfdd50f61.jpg)

    Adding measurement 40d0f342 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.397e+04, gradient 9.143e-04, dot -0.300; [5cd72a2d-bc10-4ccb-be63-a5beac639c6a = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -35.40020255744457, -22.86666790395975, -20.12570622563362, -18.570977799594402
    LBFGS Accumulation History: 3 points
    Removed measurement 40d0f342 to history. Total: 3
    th(0)=-35.40020255744457;dx=-8.358556145888179E-7
    New Minimum: -35.40020255744457 > -37.744542092084885
    WOLF (strong): th(1.8144E7)=-37.744542092084885; dx=1.0999145693250991E-7 evalInputDelta=2.344339534640312
    New Minimum: -37.744542092084885 > -38.65834850072861
    WOLF (strong): th(9072000.0)=-38.65834850072861; dx=9.314727475091641E-9 evalInputDelta=3.2581459432840347
    END: th(3024000.0)=-37.593138694763184; dx=-4.1781581062828956E-7 evalInputDelta=2.192936137318611
    Fitness changed from -35.40020255744457 to -38.65834850072861
    Iteration 6 complete. Error: -38.65834850072861 Total: 64.1609; Orientation: 1.5608; Line Search: 49.6275
    Adding measurement 6aaf054b to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.231e+04, gradient 7.448e-04, dot -0.312; [5cd72a2d-bc10-4ccb-be63-a5beac639c6a = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -38.65834850072861, -22.86666790395975, -20.12570622563362, -18.570977799594402
    LBFGS Accumulation History: 3 points
    Removed measurement 6aaf054b to history. Total: 3
    th(0)=-38.65834850072861;dx=-5.546499828959547E-7
    New Minimum: -38.65834850072861 > -40.97946456074715
    END: th(6515010.502656417)=-40.97946456074715; dx=-1.0305209275972274E-7 evalInputDelta=2.3211160600185394
    Fitness changed from -38.65834850072861 to -40.97946456074715
    Iteration 7 complete. Error: -40.97946456074715 Total: 39.1046; Orientation: 1.5610; Line Search: 24.7970
    Adding measurement 71be357d to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.212e+04, gradient 5.376e-04, dot -0.398; [5cd72a2d-bc10-4ccb-be63-a5beac639c6a = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -40.97946456074715, -22.86666790395975, -20.12570622563362, -18.570977799594402
    LBFGS Accumulation History: 3 points
    Removed measurement 71be357d to history. Total: 3
    th(0)=-40.97946456074715;dx=-2.889784497312404E-7
    New Minimum: -40.97946456074715 > -42.730650663375854
    END: th(1.4036164632845046E7)=-42.730650663375854; dx=-4.056473398604691E-9 evalInputDelta=1.7511861026287079
    Fitness changed from -40.97946456074715 to -42.730650663375854
    Iteration 8 complete. Error: -42.730650663375854 Total: 39.4408; Orientation: 1.5364; Line Search: 25.2373
    Adding measurement 36b4d3c0 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.979e+04, gradient 6.082e-04, dot -0.301; [5cd72a2d-bc10-4ccb-be63-a5beac639c6a = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -42.730650663375854, -22.86666790395975, -20.12570622563362, -18.570977799594402
    LBFGS Accumulation History: 3 points
    Removed measurement 36b4d3c0 to history. Total: 3
    th(0)=-42.730650663375854;dx=-3.699005861763211E-7
    Armijo: th(3.0240000000000007E7)=-42.10117757320404; dx=8.474935480890794E-8 evalInputDelta=-0.629473090171814
    New Minimum: -42.730650663375854 > -43.823049426078796
    WOLF (strong): th(1.5120000000000004E7)=-43.823049426078796; dx=9.498388080460127E-8 evalInputDelta=1.092398762702942
    New Minimum: -43.823049426078796 > -44.114131063222885
    END: th(5040000.000000001)=-44.114131063222885; dx=-1.1379705545851033E-7 evalInputDelta=1.3834803998470306
    Fitness changed from -42.730650663375854 to -44.114131063222885
    Iteration 9 complete. Error: -44.114131063222885 Total: 63.4066; Orientation: 1.5058; Line Search: 49.7888
    Adding measurement 287043c5 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.920e+04, gradient 3.978e-04, dot -0.429; [5cd72a2d-bc10-4ccb-be63-a5beac639c6a = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -44.114131063222885, -22.86666790395975, -20.12570622563362, -18.570977799594402
    LBFGS Accumulation History: 3 points
    Removed measurement 287043c5 to history. Total: 3
    th(0)=-44.114131063222885;dx=-1.5825503688937822E-7
    New Minimum: -44.114131063222885 > -45.23003017902374
    END: th(1.0858350837760696E7)=-45.23003017902374; dx=-3.6284680135633964E-8 evalInputDelta=1.1158991158008575
    Fitness changed from -44.114131063222885 to -45.23003017902374
    Iteration 10 complete. Error: -45.23003017902374 Total: 39.1661; Orientation: 1.5281; Line Search: 24.9919
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/ebb6d58a-4cc8-47cd-a53b-4648a4592615.jpg)

    Final threshold in iteration 11: -45.23003017902374 (> -Infinity) after 577.424s (< 5400.000s)

Returns

    -45.23003017902374