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

Code from BasicOptimizer.scala:75 executed in 33.45 seconds (0.560 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: 905579280029500
    Reset training subject: 905579792423300
    Adding measurement 72015156 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.7948784530162811;dx=-2.6153322468395754E-7
    New Minimum: 1.7948784530162811 > 1.7948780953884125
    WOLFE (weak): th(2.154434690031884)=1.7948780953884125; dx=-2.6153323500100455E-7 evalInputDelta=3.5762786865234375E-7
    New Minimum: 1.7948780953884125 > 1.794877365231514
    WOLFE (weak): th(4.308869380063768)=1.794877365231514; dx=-2.6153327302690357E-7 evalInputDelta=1.087784767150879E-6
    New Minimum: 1.794877365231514 > 1.7948750853538513
    WOLFE (weak): th(12.926608140191302)=1.7948750853538513; dx=-2.615328730144612E-7 evalInputDelta=3.3676624298095703E-6
    New Minimum: 1.7948750853538513 > 1.794864982366562
    WOLFE (weak): th(51.70643256076521)=1.794864982366562; dx=-2.615329979993116E-7 evalInputDelta=1.3470649719238281E-5
    New Minimum: 1.794864982366562 > 1.794810727238655
    WOLFE (weak): th(258.53216280382605)=1.794810727238655; dx=-2.615028035574283E-7 evalInputDelta=6.77257776260376E-5
    New Minimum: 1.794810727238655 > 1.7944728136062622
    WOLFE (weak): th(1551.1929768229563)=1.7944728136062622; dx=-2.61514799049201E-7 evalInputDelta=4.056394100189209E-4
    New Minimum: 1.7944728136062622 > 1.7920367121696472
    WOLFE (weak): th(10858.350837760694)=1.7920367121696472; dx=-2.618935594331886E-7 evalInputDelta=0.002841740846633911
    New Minimum: 1.7920367121696472 > 1.772078961133957
    WOLFE (weak): th(86866.80670208555)=1.772078961133957; dx=-2.6211873997640013E-7 evalInputDelta=0.02279949188232422
    New Minimum: 1.772078961133957 > 1.6033691465854645
    END: th(781801.26031877)=1.6033691465854645; dx=-2.2066293190830404E-7 evalInputDelta=0.19150930643081665
    Fitness changed from 1.7948784530162811 to 1.6033691465854645
    Iteration 1 complete. Error: 1.6033691465854645 Total: 6.4899; Orientation: 0.0035; Line Search: 4.9718
    <a id="p-3"></a>Iteration 1
    <a id="p-2"></a>![Iteration 1](etc/42beec5b-a75e-4a

...skipping 10289 bytes...

    ta=0.0015474185347557068
    Fitness changed from -0.33924517035484314 to -0.34228915721178055
    Iteration 13 complete. Error: -0.34228915721178055 Total: 3.1521; Orientation: 0.1039; Line Search: 2.5538
    Adding measurement 370a935f to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.521e+03, gradient 2.030e-05, dot -0.643; [c182d263-e3f3-42a9-af16-884359de5fbe = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.321623757481575, -0.32841235399246216, -0.33924517035484314, -0.34228915721178055
    LBFGS Accumulation History: 3 points
    Removed measurement 23cfdfa2 to history. Total: 4
    th(0)=-0.34228915721178055;dx=-4.122129110203499E-10
    New Minimum: -0.34228915721178055 > -0.34502118825912476
    END: th(9747336.550586838)=-0.34502118825912476; dx=-1.5169109444267596E-10 evalInputDelta=0.0027320310473442078
    Fitness changed from -0.34228915721178055 to -0.34502118825912476
    Iteration 14 complete. Error: -0.34502118825912476 Total: 1.6621; Orientation: 0.1048; Line Search: 1.0595
    Adding measurement 611a91df to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.059e+03, gradient 1.301e-05, dot -0.954; [c182d263-e3f3-42a9-af16-884359de5fbe = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.32841235399246216, -0.33924517035484314, -0.34228915721178055, -0.34502118825912476
    LBFGS Accumulation History: 3 points
    Removed measurement 1db9c2cf to history. Total: 4
    th(0)=-0.34502118825912476;dx=-1.6935293294962526E-10
    New Minimum: -0.34502118825912476 > -0.34832555055618286
    END: th(2.1000000000000007E7)=-0.34832555055618286; dx=-1.522001137839909E-10 evalInputDelta=0.0033043622970581055
    Fitness changed from -0.34502118825912476 to -0.34832555055618286
    Iteration 15 complete. Error: -0.34832555055618286 Total: 1.5714; Orientation: 0.1044; Line Search: 0.9689
    <a id="p-15"></a>Iteration 15
    <a id="p-14"></a>![Iteration 15](etc/38503717-6e02-4c97-a496-6fce6dbdc3ca.jpg)
    
    Final threshold in iteration 16: -0.34832555055618286 (> -Infinity) after 33.450s (< 1800.000s)
    

Returns:

    -0.34832555055618286