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:88 executed in 376.96 seconds (3.776 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: 2448509538360
    Reset training subject: 2451128906059
    Adding measurement 49fbcbb7 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=1.8273265361785889;dx=-1.4853620231441415E-7
    New Minimum: 1.8273265361785889 > 1.827326014637947
    WOLFE (weak): th(2.154434690031884)=1.827326014637947; dx=-1.4624272785972103E-7 evalInputDelta=5.21540641784668E-7
    New Minimum: 1.827326014637947 > 1.82732555270195
    WOLFE (weak): th(4.308869380063768)=1.82732555270195; dx=-1.4624673808388834E-7 evalInputDelta=9.834766387939453E-7
    New Minimum: 1.82732555270195 > 1.8273232579231262
    WOLFE (weak): th(12.926608140191302)=1.8273232579231262; dx=-1.462036956319051E-7 evalInputDelta=3.2782554626464844E-6
    New Minimum: 1.8273232579231262 > 1.8273135423660278
    WOLFE (weak): th(51.70643256076521)=1.8273135423660278; dx=-1.462788474224694E-7 evalInputDelta=1.2993812561035156E-5
    New Minimum: 1.8273135423660278 > 1.8272607028484344
    WOLFE (weak): th(258.53216280382605)=1.8272607028484344; dx=-1.461846696918268E-7 evalInputDelta=6.583333015441895E-5
    New Minimum: 1.8272607028484344 > 1.82693150639534
    WOLFE (weak): th(1551.1929768229563)=1.82693150639534; dx=-1.462313001588656E-7 evalInputDelta=3.9502978324890137E-4
    New Minimum: 1.82693150639534 > 1.82456174492836
    WOLFE (weak): th(10858.350837760694)=1.82456174492836; dx=-1.4618992018150454E-7 evalInputDelta=0.002764791250228882
    New Minimum: 1.82456174492836 > 1.8052614778280258
    WOLFE (weak): th(86866.80670208555)=1.8052614778280258; dx=-1.4528378639643218E-7 evalInputDelta=0.02206505835056305
    New Minimum: 1.8052614778280258 > 1.6352656781673431
    WOLFE (weak): th(781801.26031877)=1.6352656781673431; dx=-1.358924263670056E-7 evalInputDelta=0.19206085801124573
    New Minimum: 1.6352656781673431 > 0.5799292623996735
    END: th(7818012.6031877)=0.5799292623996735; dx=-5.923373589804338E-8 evalInputDelta=1.2473972737789154
    Fitness changed from 1.8273265361785889 to 0.5799292623996735
    Iteration 1 complete. Error: 0.5799292623996735 Total: 

...skipping 25703 bytes...

    ent 2.801e-05, dot -0.588; [51c23e9c-4e3e-4c96-92df-5dfada7cc693 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.6790078952908516, -0.3005317151546478, 0.5799292623996735, 1.8273265361785889
    LBFGS Accumulation History: 3 points
    Removed measurement 31c2fd4d to history. Total: 3
    th(0)=-1.6790078952908516;dx=-7.818238435035302E-10
    New Minimum: -1.6790078952908516 > -1.6825672835111618
    WOLF (strong): th(1.4689634799664306E7)=-1.6825672835111618; dx=2.333846999353163E-11 evalInputDelta=0.003559388220310211
    New Minimum: -1.6825672835111618 > -1.6835192367434502
    END: th(7344817.399832153)=-1.6835192367434502; dx=-2.369118448080952E-10 evalInputDelta=0.004511341452598572
    Fitness changed from -1.6790078952908516 to -1.6835192367434502
    Iteration 29 complete. Error: -1.6835192367434502 Total: 12.2421; Orientation: 0.3278; Line Search: 9.1777
    Adding measurement 5e143413 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.032e+03, gradient 2.883e-05, dot -0.566; [51c23e9c-4e3e-4c96-92df-5dfada7cc693 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.6835192367434502, -0.3005317151546478, 0.5799292623996735, 1.8273265361785889
    LBFGS Accumulation History: 3 points
    Removed measurement 5e143413 to history. Total: 3
    th(0)=-1.6835192367434502;dx=-8.280419940707827E-10
    New Minimum: -1.6835192367434502 > -1.6854217201471329
    WOLF (strong): th(1.5823929398148172E7)=-1.6854217201471329; dx=8.090396312414729E-11 evalInputDelta=0.0019024834036827087
    New Minimum: -1.6854217201471329 > -1.6875796169042587
    END: th(7911964.699074086)=-1.6875796169042587; dx=-1.1941903054536388E-10 evalInputDelta=0.004060380160808563
    Fitness changed from -1.6835192367434502 to -1.6875796169042587
    Iteration 30 complete. Error: -1.6875796169042587 Total: 11.6271; Orientation: 0.3508; Line Search: 8.7270
    <a id="p-21"></a>Iteration 30
    <a id="p-20"></a>![Iteration 30](etc/3cff27eb-b377-4dee-b9f3-e69c63a716e8.jpg)
    
    Final threshold in iteration 31: -1.6875796169042587 (> -Infinity) after 376.963s (< 3600.000s)
    

Returns:

    -1.6875796169042587