Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Iteration 15 Iteration 15

Iteration 20 Iteration 20

Iteration 25 Iteration 25

Iteration 30 Iteration 30

Code from BasicOptimizer.scala:75 executed in 984.43 seconds (11.612 gc):

    val lineSearchInstance: LineSearchStrategy = lineSearchFactory
    IterativeTrainer.wrap(trainable)
      .setOrientation(orientation())
      .setMonitor(new TrainingMonitor() {
        override def clear(): Unit = trainingMonitor.clear()
  
        override def log(msg: String): Unit = trainingMonitor.log(msg)
  
        override def onStepFail(currentPoint: Step): Boolean = {
          BasicOptimizer.this.onStepFail(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, currentPoint)
          trainingMonitor.onStepComplete(currentPoint)
          super.onStepComplete(currentPoint)
        }
      })
      .setTimeout(trainingMinutes, TimeUnit.MINUTES)
      .setMaxIterations(trainingIterations)
      .setLineSearchFactory((_: CharSequence) => lineSearchInstance)
      .setTerminateThreshold(java.lang.Double.NEGATIVE_INFINITY)
      .runAndFree
      .asInstanceOf[lang.Double]

Logging:

    Reset training subject: 1239289969732200
    Reset training subject: 1239297868458700
    Adding measurement 7641c4e7 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=5.2439339044818265;dx=-2.995655035006707E-5
    New Minimum: 5.2439339044818265 > 5.243905798070407
    WOLFE (weak): th(2.154434690031884)=5.243905798070407; dx=-2.995641919651887E-5 evalInputDelta=2.8106411419592803E-5
    New Minimum: 5.243905798070407 > 5.243877601707357
    WOLFE (weak): th(4.308869380063768)=5.243877601707357; dx=-2.9958029771709434E-5 evalInputDelta=5.6302774469330075E-5
    New Minimum: 5.243877601707357 > 5.243764776240179
    WOLFE (weak): th(12.926608140191302)=5.243764776240179; dx=-2.9957792892064056E-5 evalInputDelta=1.691282416471651E-4
    New Minimum: 5.243764776240179 > 5.2432574107158345
    WOLFE (weak): th(51.70643256076521)=5.2432574107158345; dx=-2.995160331604574E-5 evalInputDelta=6.764937659919923E-4
    New Minimum: 5.2432574107158345 > 5.240552924172696
    WOLFE (weak): th(258.53216280382605)=5.240552924172696; dx=-2.9910798577952355E-5 evalInputDelta=0.003380980309130699
    New Minimum: 5.240552924172696 > 5.223733734522269
    WOLFE (weak): th(1551.1929768229563)=5.223733734522269; dx=-2.967540859905341E-5 evalInputDelta=0.020200169959557535
    New Minimum: 5.223733734522269 > 5.106598349012777
    WOLFE (weak): th(10858.350837760694)=5.106598349012777; dx=-2.7858824630075606E-5 evalInputDelta=0.13733555546904963
    New Minimum: 5.106598349012777 > 4.399380427755434
    END: th(86866.80670208555)=4.399380427755434; dx=-1.640411479675862E-5 evalInputDelta=0.8445534767263929
    Fitness changed from 5.2439339044818265 to 4.399380427755434
    Iteration 1 complete. Error: 4.399380427755434 Total: 94.9831; Orientation: 0.0068; Line Search: 71.1528
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/7abf97b1-13e7-438a-b3e1-ff5d10432673.jpg)
    
    Adding measurement 4e3bc13b to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=4.399380427755434;dx=-1.1783150602618542E-5
    New Minimu

...skipping 24094 bytes...

    gradient 2.118e-04, dot -0.673; [696a64f5-116f-43db-abfc-971c035c74b0 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.2887444783773414, 0.2633771726880232, 0.2443362017265336, 0.23051537156828172
    LBFGS Accumulation History: 3 points
    Removed measurement 3380313d to history. Total: 4
    th(0)=0.23051537156828172;dx=-4.4849620578054186E-8
    Armijo: th(7834471.893154295)=0.24821130653159607; dx=-5.974464905704826E-9 evalInputDelta=-0.01769593496331434
    New Minimum: 0.23051537156828172 > 0.22018228831523956
    END: th(3917235.9465771476)=0.22018228831523956; dx=-7.169229461001133E-9 evalInputDelta=0.010333083253042163
    Fitness changed from 0.23051537156828172 to 0.22018228831523956
    Iteration 29 complete. Error: 0.22018228831523956 Total: 31.8754; Orientation: 0.2006; Line Search: 23.8441
    Adding measurement 6e2764c9 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.719e+03, gradient 2.550e-04, dot -0.566; [696a64f5-116f-43db-abfc-971c035c74b0 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.2633771726880232, 0.2443362017265336, 0.23051537156828172, 0.22018228831523956
    LBFGS Accumulation History: 3 points
    Removed measurement 7d44e3c7 to history. Total: 4
    th(0)=0.22018228831523956;dx=-6.50169891786168E-8
    Armijo: th(8439429.01234569)=0.37900152240583984; dx=6.174514302520682E-8 evalInputDelta=-0.15881923409060028
    Armijo: th(4219714.506172845)=0.23458175109496182; dx=2.892638004773989E-8 evalInputDelta=-0.01439946277972226
    New Minimum: 0.22018228831523956 > 0.2020648575835875
    END: th(1406571.502057615)=0.2020648575835875; dx=-2.2536312761025127E-8 evalInputDelta=0.018117430731652062
    Fitness changed from 0.22018228831523956 to 0.2020648575835875
    Iteration 30 complete. Error: 0.2020648575835875 Total: 40.1672; Orientation: 0.2046; Line Search: 31.7830
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/34ddbf63-462a-4f32-bf5b-d0eef8db0be5.jpg)
    
    Final threshold in iteration 31: 0.2020648575835875 (> -Infinity) after 984.420s (< 3600.000s)
    

Returns:

    0.2020648575835875