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 206.19 seconds (1.883 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: 8102621956704
Reset training subject: 8106963615718
Adding measurement 1ae307d0 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.33604902029037476;dx=-5.660874360451606E-7
New Minimum: -0.33604902029037476 > -0.3360491991043091
WOLFE (weak): th(2.154434690031884)=-0.3360491991043091; dx=-5.29366445641026E-7 evalInputDelta=1.7881393432617188E-7
New Minimum: -0.3360491991043091 > -0.3360498547554016
WOLFE (weak): th(4.308869380063768)=-0.3360498547554016; dx=-5.29366511466476E-7 evalInputDelta=8.344650268554688E-7
New Minimum: -0.3360498547554016 > -0.33605246245861053
WOLFE (weak): th(12.926608140191302)=-0.33605246245861053; dx=-5.29367751633831E-7 evalInputDelta=3.4421682357788086E-6
New Minimum: -0.33605246245861053 > -0.3360626697540283
WOLFE (weak): th(51.70643256076521)=-0.3360626697540283; dx=-5.293694172493029E-7 evalInputDelta=1.3649463653564453E-5
New Minimum: -0.3360626697540283 > -0.3361174613237381
WOLFE (weak): th(258.53216280382605)=-0.3361174613237381; dx=-5.293172640489347E-7 evalInputDelta=6.844103336334229E-5
New Minimum: -0.3361174613237381 > -0.33645954728126526
WOLFE (weak): th(1551.1929768229563)=-0.33645954728126526; dx=-5.291504168373754E-7 evalInputDelta=4.1052699089050293E-4
New Minimum: -0.33645954728126526 > -0.3389188051223755
WOLFE (weak): th(10858.350837760694)=-0.3389188051223755; dx=-5.277499038982853E-7 evalInputDelta=0.0028697848320007324
New Minimum: -0.3389188051223755 > -0.3587729334831238
WOLFE (weak): th(86866.80670208555)=-0.3587729334831238; dx=-5.170508900569835E-7 evalInputDelta=0.022723913192749023
New Minimum: -0.3587729334831238 > -0.5206525921821594
END: th(781801.26031877)=-0.5206525921821594; dx=-4.1342137073297567E-7 evalInputDelta=0.18460357189178467
Fitness changed from -0.33604902029037476 to -0.5206525921821594
Iteration 1 complete. Error: -0.5206525921821594 Total: 55.6136; Orientation: 0.0447; Line Search: 42.9830
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/ea735eef-ff20-4b56-a2b2-8382e3a71f85.jpg)

    Adding measurement 7ce2a9d3 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=-0.5206525921821594;dx=-3.64248630374163E-7
    New Minimum: -0.5206525921821594 > -0.7742882370948792
    END: th(1684339.7559414052)=-0.7742882370948792; dx=-2.4250913343245463E-7 evalInputDelta=0.2536356449127197
    Fitness changed from -0.5206525921821594 to -0.7742882370948792
    Iteration 2 complete. Error: -0.7742882370948792 Total: 12.8443; Orientation: 0.0440; Line Search: 8.6838
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/98f9bec5-e01e-4838-ad95-8e2acd46308b.jpg)

    Adding measurement 7e6ee62b to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=-0.7742882370948792;dx=-2.1291847076852097E-7
    New Minimum: -0.7742882370948792 > -1.0713387429714203
    END: th(3628800.0)=-1.0713387429714203; dx=-1.21974167205603E-7 evalInputDelta=0.29705050587654114
    Fitness changed from -0.7742882370948792 to -1.0713387429714203
    Iteration 3 complete. Error: -1.0713387429714203 Total: 14.1573; Orientation: 0.0457; Line Search: 9.1249
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/cefa7b05-c74d-4ff7-a8f3-036fa9271323.jpg)

    Adding measurement 37e46067 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.117e+03, gradient 3.522e-04, dot -0.848; [6bdc09df-b487-4b17-b290-96f89ac3439f = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.0713387429714203, -0.7742882370948792, -0.5206525921821594, -0.33604902029037476
    LBFGS Accumulation History: 3 points
    Removed measurement 37e46067 to history. Total: 3
    th(0)=-1.0713387429714203;dx=-1.2404372537366197E-7
    New Minimum: -1.0713387429714203 > -1.3783474266529083
    END: th(7818012.6031877)=-1.3783474266529083; dx=-4.807564894199711E-8 evalInputDelta=0.30700868368148804
    Fitness changed from -1.0713387429714203 to -1.3783474266529083
    Iteration 4 complete. Error: -1.3783474266529083 Total: 13.9406; Orientation: 1.0423; Line Search: 8.6366
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/13ae3b0b-0b5c-44ab-9908-04b90d520ee9.jpg)

    Adding measurement 1466a113 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.772e+03, gradient 2.996e-04, dot -0.647; [6bdc09df-b487-4b17-b290-96f89ac3439f = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.3783474266529083, -0.7742882370948792, -0.5206525921821594, -0.33604902029037476
    LBFGS Accumulation History: 3 points
    Removed measurement 1466a113 to history. Total: 3
    th(0)=-1.3783474266529083;dx=-8.974169447466548E-8
    New Minimum: -1.3783474266529083 > -1.5898561030626297
    WOLF (strong): th(1.684339755941405E7)=-1.5898561030626297; dx=9.49634247195569E-10 evalInputDelta=0.21150867640972137
    END: th(8421698.779707026)=-1.565335974097252; dx=-1.555819688645277E-8 evalInputDelta=0.18698854744434357
    Fitness changed from -1.3783474266529083 to -1.5898561030626297
    Iteration 5 complete. Error: -1.5898561030626297 Total: 18.4000; Orientation: 1.4037; Line Search: 12.7443
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/f263450d-62e4-4ba1-a400-b84089e48e01.jpg)

    Adding measurement 460d0154 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.796e+03, gradient 3.198e-04, dot -0.398; [6bdc09df-b487-4b17-b290-96f89ac3439f = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.5898561030626297, -0.7742882370948792, -0.5206525921821594, -0.33604902029037476
    LBFGS Accumulation History: 3 points
    Removed measurement 460d0154 to history. Total: 3
    th(0)=-1.5898561030626297;dx=-1.0228356582420446E-7
    New Minimum: -1.5898561030626297 > -1.694021612405777
    WOLF (strong): th(1.8144E7)=-1.694021612405777; dx=3.095762883349296E-8 evalInputDelta=0.10416550934314728
    New Minimum: -1.694021612405777 > -1.7771463245153427
    END: th(9072000.0)=-1.7771463245153427; dx=-8.03147982910363E-10 evalInputDelta=0.187290221452713
    Fitness changed from -1.5898561030626297 to -1.7771463245153427
    Iteration 6 complete. Error: -1.7771463245153427 Total: 18.9254; Orientation: 1.0555; Line Search: 13.6033
    Adding measurement 5ec49a6f to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.157e+03, gradient 2.220e-04, dot -0.427; [6bdc09df-b487-4b17-b290-96f89ac3439f = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.7771463245153427, -0.7742882370948792, -0.5206525921821594, -0.33604902029037476
    LBFGS Accumulation History: 3 points
    Removed measurement 5ec49a6f to history. Total: 3
    th(0)=-1.7771463245153427;dx=-4.927718291562435E-8
    New Minimum: -1.7771463245153427 > -1.8667969405651093
    WOLF (strong): th(1.954503150796925E7)=-1.8667969405651093; dx=1.9834452125376433E-8 evalInputDelta=0.08965061604976654
    New Minimum: -1.8667969405651093 > -1.9030499458312988
    END: th(9772515.753984625)=-1.9030499458312988; dx=-7.300391867971631E-9 evalInputDelta=0.12590362131595612
    Fitness changed from -1.7771463245153427 to -1.9030499458312988
    Iteration 7 complete. Error: -1.9030499458312988 Total: 17.6912; Orientation: 1.0307; Line Search: 12.1973
    Adding measurement 470819f1 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.468e+03, gradient 1.759e-04, dot -0.475; [6bdc09df-b487-4b17-b290-96f89ac3439f = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.9030499458312988, -0.7742882370948792, -0.5206525921821594, -0.33604902029037476
    LBFGS Accumulation History: 3 points
    Removed measurement 470819f1 to history. Total: 3
    th(0)=-1.9030499458312988;dx=-3.0953956668551643E-8
    New Minimum: -1.9030499458312988 > -1.9767486304044724
    WOLF (strong): th(2.1054246949267566E7)=-1.9767486304044724; dx=7.454821746133198E-9 evalInputDelta=0.07369868457317352
    New Minimum: -1.9767486304044724 > -1.9887369498610497
    END: th(1.0527123474633783E7)=-1.9887369498610497; dx=-4.351763323753934E-9 evalInputDelta=0.08568700402975082
    Fitness changed from -1.9030499458312988 to -1.9887369498610497
    Iteration 8 complete. Error: -1.9887369498610497 Total: 18.1710; Orientation: 1.0037; Line Search: 13.2463
    Adding measurement 77972825 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.569e+03, gradient 1.628e-04, dot -0.470; [6bdc09df-b487-4b17-b290-96f89ac3439f = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.9887369498610497, -0.7742882370948792, -0.5206525921821594, -0.33604902029037476
    LBFGS Accumulation History: 3 points
    Removed measurement 77972825 to history. Total: 3
    th(0)=-1.9887369498610497;dx=-2.6518055817731802E-8
    New Minimum: -1.9887369498610497 > -2.0206395983695984
    WOLF (strong): th(2.2680000000000004E7)=-2.0206395983695984; dx=9.330867607717463E-9 evalInputDelta=0.03190264850854874
    New Minimum: -2.0206395983695984 > -2.0538975447416306
    WOLF (strong): th(1.1340000000000002E7)=-2.0538975447416306; dx=7.47052190125397E-10 evalInputDelta=0.0651605948805809
    END: th(3780000.0000000005)=-2.0287098437547684; dx=-1.5771669378893204E-8 evalInputDelta=0.03997289389371872
    Fitness changed from -1.9887369498610497 to -2.0538975447416306
    Iteration 9 complete. Error: -2.0538975447416306 Total: 21.9620; Orientation: 1.0164; Line Search: 16.6948
    Adding measurement 24488bc8 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.573e+03, gradient 1.674e-04, dot -0.421; [6bdc09df-b487-4b17-b290-96f89ac3439f = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -2.0538975447416306, -0.7742882370948792, -0.5206525921821594, -0.33604902029037476
    LBFGS Accumulation History: 3 points
    Removed measurement 24488bc8 to history. Total: 3
    th(0)=-2.0538975447416306;dx=-2.8027458928957184E-8
    New Minimum: -2.0538975447416306 > -2.1093385741114616
    END: th(8143763.128320522)=-2.1093385741114616; dx=-1.202831902288333E-9 evalInputDelta=0.055441029369831085
    Fitness changed from -2.0538975447416306 to -2.1093385741114616
    Iteration 10 complete. Error: -2.1093385741114616 Total: 14.4109; Orientation: 1.0802; Line Search: 8.7201
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/6953a1f0-4f60-40c5-9838-2ac14dcad9d0.jpg)

    Final threshold in iteration 11: -2.1093385741114616 (> -Infinity) after 206.189s (< 5400.000s)

Returns

    -2.1093385741114616