Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Code from BasicOptimizer.scala:88 executed in 711.06 seconds (4.446 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: 7106125879923
    Reset training subject: 7119672252003
    Adding measurement 24b0b535 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=8.713045872747898;dx=-4.017360173791164E-7
    New Minimum: 8.713045872747898 > 8.713045865297318
    WOLFE (weak): th(2.154434690031884)=8.713045865297318; dx=-4.01730001109633E-7 evalInputDelta=7.450580596923828E-9
    New Minimum: 8.713045865297318 > 8.713044799864292
    WOLFE (weak): th(4.308869380063768)=8.713044799864292; dx=-4.0171648640008864E-7 evalInputDelta=1.0728836059570312E-6
    New Minimum: 8.713044799864292 > 8.71304015815258
    WOLFE (weak): th(12.926608140191302)=8.71304015815258; dx=-4.0171655074069405E-7 evalInputDelta=5.714595317840576E-6
    New Minimum: 8.71304015815258 > 8.713020391762257
    WOLFE (weak): th(51.70643256076521)=8.713020391762257; dx=-4.01717079588738E-7 evalInputDelta=2.5480985641479492E-5
    New Minimum: 8.713020391762257 > 8.71291971206665
    WOLFE (weak): th(258.53216280382605)=8.71291971206665; dx=-4.017093810912743E-7 evalInputDelta=1.2616068124771118E-4
    New Minimum: 8.71291971206665 > 8.712287791073322
    WOLFE (weak): th(1551.1929768229563)=8.712287791073322; dx=-4.0165575322775944E-7 evalInputDelta=7.580816745758057E-4
    New Minimum: 8.712287791073322 > 8.707738891243935
    WOLFE (weak): th(10858.350837760694)=8.707738891243935; dx=-4.0135940597824343E-7 evalInputDelta=0.0053069815039634705
    New Minimum: 8.707738891243935 > 8.670726537704468
    WOLFE (weak): th(86866.80670208555)=8.670726537704468; dx=-3.9846520076166934E-7 evalInputDelta=0.04231933504343033
    New Minimum: 8.670726537704468 > 8.346711859107018
    WOLFE (weak): th(781801.26031877)=8.346711859107018; dx=-3.6327280032608544E-7 evalInputDelta=0.3663340136408806
    New Minimum: 8.346711859107018 > 6.485224798321724
    END: th(7818012.6031877)=6.485224798321724; dx=-1.2760845813182142E-7 evalInputDelta=2.227821074426174
    Fitness changed from 8.713045872747898 to 6.485224798321724
    Iteration 1 complete. Error: 6.485224798321724 Total: 201.0595; Orientati

...skipping 6199 bytes...

    g measurement 50124d12 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 9.212e+03, gradient 1.650e-04, dot -0.462; [6dddee94-9424-4507-a6b3-6cdf5ec0f9a6 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.7904808595776558, 4.494132943451405, 6.485224798321724, 8.713045872747898
    LBFGS Accumulation History: 3 points
    Removed measurement 50124d12 to history. Total: 3
    th(0)=0.7904808595776558;dx=-2.7235055460899075E-8
    Armijo: th(3.7800000000000015E7)=1.1174487173557281; dx=2.2418144187880063E-8 evalInputDelta=-0.32696785777807236
    New Minimum: 0.7904808595776558 > 0.679730162024498
    WOLF (strong): th(1.8900000000000007E7)=0.679730162024498; dx=8.598099827939432E-9 evalInputDelta=0.1107506975531578
    New Minimum: 0.679730162024498 > 0.6527133360505104
    END: th(6300000.000000003)=0.6527133360505104; dx=-1.2658782262361293E-8 evalInputDelta=0.13776752352714539
    Fitness changed from 0.7904808595776558 to 0.6527133360505104
    Iteration 9 complete. Error: 0.6527133360505104 Total: 72.4351; Orientation: 1.5413; Line Search: 56.7823
    Adding measurement 1f78d4e8 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 8.614e+03, gradient 1.229e-04, dot -0.534; [6dddee94-9424-4507-a6b3-6cdf5ec0f9a6 = 1.000/1.000e+00]
    Orientation rejected. Popping history element from 0.6527133360505104, 4.494132943451405, 6.485224798321724, 8.713045872747898
    LBFGS Accumulation History: 3 points
    Removed measurement 1f78d4e8 to history. Total: 3
    th(0)=0.6527133360505104;dx=-1.5094575701285865E-8
    New Minimum: 0.6527133360505104 > 0.5166931226849556
    END: th(1.3572938547200873E7)=0.5166931226849556; dx=-9.012926766273764E-9 evalInputDelta=0.1360202133655548
    Fitness changed from 0.6527133360505104 to 0.5166931226849556
    Iteration 10 complete. Error: 0.5166931226849556 Total: 44.5235; Orientation: 1.5349; Line Search: 29.1947
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/aa71fc62-09d0-4765-b41f-a9817b42fc02.jpg)
    
    Final threshold in iteration 11: 0.5166931226849556 (> -Infinity) after 711.061s (< 3600.000s)
    

Returns:

    0.5166931226849556