Code from BasicOptimizer.scala:88 executed in 464.59 seconds (4.693 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: 9786205609199
    Reset training subject: 9794735977734
    Adding measurement 5f11e8c2 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=0.278674453496933;dx=-2.809716399218376E-8
    Armijo: th(2.154434690031884)=0.278674453496933; dx=-2.809478529514345E-8 evalInputDelta=0.0
    Armijo: th(1.077217345015942)=0.27867448329925537; dx=-2.7999338649962275E-8 evalInputDelta=-2.9802322387695312E-8
    Armijo: th(0.3590724483386473)=0.278674453496933; dx=-2.808489038312798E-8 evalInputDelta=0.0
    Armijo: th(0.08976811208466183)=0.278674453496933; dx=-2.809377213624657E-8 evalInputDelta=0.0
    Armijo: th(0.017953622416932366)=0.278674453496933; dx=-2.8078506169771572E-8 evalInputDelta=0.0
    Armijo: th(0.002992270402822061)=0.27867454290390015; dx=-2.8089537663045152E-8 evalInputDelta=-8.940696716308594E-8
    WOLFE (weak): th(4.2746720040315154E-4)=0.278674453496933; dx=-2.809179203513988E-8 evalInputDelta=0.0
    Armijo: th(0.0017098688016126062)=0.27867448329925537; dx=-2.8081536479941475E-8 evalInputDelta=-2.9802322387695312E-8
    Armijo: th(0.001068668001007879)=0.27867448329925537; dx=-2.8028921777469748E-8 evalInputDelta=-2.9802322387695312E-8
    Armijo: th(7.480676007055152E-4)=0.27867448329925537; dx=-2.8093417958807418E-8 evalInputDelta=-2.9802322387695312E-8
    Armijo: th(5.877674005543334E-4)=0.27867451310157776; dx=-2.8097443002893437E-8 evalInputDelta=-5.9604644775390625E-8
    Armijo: th(5.076173004787425E-4)=0.27867448329925537; dx=-2.8091778009421656E-8 evalInputDelta=-2.9802322387695312E-8
    Armijo: th(4.67542250440947E-4)=0.27867448329925537; dx=-2.8097841425781043E-8 evalInputDelta=-2.9802322387695312E-8
    Armijo: th(4.475047254220493E-4)=0.27867448329925537; dx=-2.7911850331301734E-8 evalInputDelta=-2.9802322387695312E-8
    WOLFE (weak): th(4.374859629126004E-4)=0.278674453496933; dx=-2.808659211134153E-8 evalInputDelta=0.0
    Armijo: th(4.4249534416732485E-4)=0.27867448329925537; dx=-2.8093539833103102E-8 evalInputDelta=-2.9802322387695312E-8
    WOLFE (weak): th(4.39990653539

...skipping 2206 bytes...

    .350275724904018E-4)=0.278674453496933; dx=-2.809607960025853E-8 evalInputDelta=0.0
    Armijo: th(4.5480155305814736E-4)=0.27867448329925537; dx=-2.8082136911785857E-8 evalInputDelta=-2.9802322387695312E-8
    Armijo: th(4.449145627742746E-4)=0.27867448329925537; dx=-2.8092425829771575E-8 evalInputDelta=-2.9802322387695312E-8
    WOLFE (weak): th(4.399710676323382E-4)=0.278674453496933; dx=-2.8091175736421842E-8 evalInputDelta=0.0
    Armijo: th(4.4244281520330637E-4)=0.27867448329925537; dx=-2.810346151612033E-8 evalInputDelta=-2.9802322387695312E-8
    Armijo: th(4.4120694141782226E-4)=0.27867448329925537; dx=-2.80938705738381E-8 evalInputDelta=-2.9802322387695312E-8
    Armijo: th(4.405890045250802E-4)=0.27867448329925537; dx=-2.8088849951636172E-8 evalInputDelta=-2.9802322387695312E-8
    WOLFE (weak): th(4.4028003607870917E-4)=0.278674453496933; dx=-2.808568980396627E-8 evalInputDelta=0.0
    WOLFE (weak): th(4.404345203018947E-4)=0.278674453496933; dx=-2.8092142223821928E-8 evalInputDelta=0.0
    WOLFE (weak): th(4.4051176241348747E-4)=0.278674453496933; dx=-2.8057524166585387E-8 evalInputDelta=0.0
    WOLFE (weak): th(4.4055038346928384E-4)=0.278674453496933; dx=-2.808830518807642E-8 evalInputDelta=0.0
    Armijo: th(4.40569693997182E-4)=0.27867448329925537; dx=-2.8090253685165533E-8 evalInputDelta=-2.9802322387695312E-8
    Armijo: th(4.405600387332329E-4)=0.27867448329925537; dx=-2.8086332523802446E-8 evalInputDelta=-2.9802322387695312E-8
    WOLFE (weak): th(4.4055521110125835E-4)=0.278674453496933; dx=-2.8099689721634547E-8 evalInputDelta=0.0
    Armijo: th(4.405576249172456E-4)=0.27867448329925537; dx=-2.809343551288386E-8 evalInputDelta=-2.9802322387695312E-8
    mu ~= nu (4.4055521110125835E-4): th(0.0)=0.278674453496933
    Fitness changed from 0.278674453496933 to 0.278674453496933
    Static Iteration Total: 197.1513; Orientation: 0.0352; Line Search: 180.2787
    Iteration 2 failed. Error: 0.278674453496933
    Previous Error: 0.0 -> 0.278674453496933
    Optimization terminated 2
    Final threshold in iteration 2: 0.278674453496933 (> -Infinity) after 464.593s (< 3600.000s)
    

Returns:

    0.278674453496933