Code from BasicOptimizer.scala:88 executed in 8532.31 seconds (67.626 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: 5286627081851
    Reset training subject: 5440776558462
    Adding measurement 348099ac to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=-7.461451463062977;dx=-2.2848401223051418E-7
    Armijo: th(2.154434690031884)=-7.461451463062977; dx=-2.218894709909753E-7 evalInputDelta=0.0
    Armijo: th(1.077217345015942)=-7.461451463062977; dx=-2.2188947099292942E-7 evalInputDelta=0.0
    Armijo: th(0.3590724483386473)=-7.461451463062977; dx=-2.2178504046695887E-7 evalInputDelta=0.0
    Armijo: th(0.08976811208466183)=-7.461451463062977; dx=-2.2187557205005658E-7 evalInputDelta=0.0
    Armijo: th(0.017953622416932366)=-7.461451463062977; dx=-2.2188947100839343E-7 evalInputDelta=0.0
    Armijo: th(0.002992270402822061)=-7.461451463062977; dx=-2.2191969900384128E-7 evalInputDelta=0.0
    WOLFE (weak): th(4.2746720040315154E-4)=-7.461451463062977; dx=-2.2188285934879098E-7 evalInputDelta=0.0
    WOLFE (weak): th(0.0017098688016126062)=-7.461451463062977; dx=-2.2176284045345896E-7 evalInputDelta=0.0
    Armijo: th(0.0023510696022173336)=-7.461451463062977; dx=-2.2188947099375464E-7 evalInputDelta=0.0
    Armijo: th(0.00203046920191497)=-7.461451463062977; dx=-2.2200137080909725E-7 evalInputDelta=0.0
    WOLFE (weak): th(0.001870169001763788)=-7.461451463062977; dx=-2.2188921204981839E-7 evalInputDelta=0.0
    Armijo: th(0.001950319101839379)=-7.461451463062977; dx=-2.2200497297319299E-7 evalInputDelta=0.0
    WOLFE (weak): th(0.0019102440518015836)=-7.461451463062977; dx=-2.2188921204571538E-7 evalInputDelta=0.0
    WOLFE (weak): th(0.0019302815768204814)=-7.461451463062977; dx=-2.2179268369601816E-7 evalInputDelta=0.0
    WOLFE (weak): th(0.0019403003393299303)=-7.461451463062977; dx=-2.2176258149456037E-7 evalInputDelta=0.0
    Armijo: th(0.0019453097205846545)=-7.461451463062977; dx=-2.2176461320796403E-7 evalInputDelta=0.0
    WOLFE (weak): th(0.0019428050299572924)=-7.461451463062977; dx=-2.2184719580374436E-7 evalInputDelta=0.0
    Armijo: th(0.0019440573752709735)=-7.461451463062977; dx=-2.218369407221218E-7 evalI

...skipping 1663 bytes...

    dx=-2.218343897282845E-7 evalInputDelta=0.0
    Armijo: th(0.01046856929392458)=-7.461451463062977; dx=-2.2181996218047424E-7 evalInputDelta=0.0
    WOLFE (weak): th(0.009421712364532122)=-7.461451463062977; dx=-2.2183246740454105E-7 evalInputDelta=0.0
    Armijo: th(0.00994514082922835)=-7.461451463062977; dx=-2.2183525439328631E-7 evalInputDelta=0.0
    WOLFE (weak): th(0.009683426596880236)=-7.461451463062977; dx=-2.2176777962091768E-7 evalInputDelta=0.0
    Armijo: th(0.009814283713054293)=-7.461451463062977; dx=-2.218318665619926E-7 evalInputDelta=0.0
    Armijo: th(0.009748855154967265)=-7.461451463062977; dx=-2.218326336372313E-7 evalInputDelta=0.0
    WOLFE (weak): th(0.009716140875923752)=-7.461451463062977; dx=-2.2180668236835436E-7 evalInputDelta=0.0
    Armijo: th(0.009732498015445509)=-7.461451463062977; dx=-2.2184743976244841E-7 evalInputDelta=0.0
    Armijo: th(0.00972431944568463)=-7.461451463062977; dx=-2.2183246740416227E-7 evalInputDelta=0.0
    Armijo: th(0.009720230160804191)=-7.461451463062977; dx=-2.2179735107657192E-7 evalInputDelta=0.0
    WOLFE (weak): th(0.00971818551836397)=-7.461451463062977; dx=-2.2183701048174222E-7 evalInputDelta=0.0
    WOLFE (weak): th(0.00971920783958408)=-7.461451463062977; dx=-2.2183263362143016E-7 evalInputDelta=0.0
    Armijo: th(0.009719719000194135)=-7.461451463062977; dx=-2.217616293935883E-7 evalInputDelta=0.0
    Armijo: th(0.009719463419889107)=-7.461451463062977; dx=-2.219260540645462E-7 evalInputDelta=0.0
    Armijo: th(0.009719335629736594)=-7.461451463062977; dx=-2.2183263364389578E-7 evalInputDelta=0.0
    WOLFE (weak): th(0.009719271734660338)=-7.461451463062977; dx=-2.217373883241473E-7 evalInputDelta=0.0
    mu ~= nu (0.009719271734660338): th(0.0)=-7.461451463062977
    Fitness changed from -7.461451463062977 to -7.461451463062977
    Static Iteration Total: 3860.2260; Orientation: 1.2171; Line Search: 3557.7379
    Iteration 2 failed. Error: -7.461451463062977
    Previous Error: 0.0 -> -7.461451463062977
    Optimization terminated 2
    Final threshold in iteration 2: -7.461451463062977 (> -Infinity) after 8532.307s (< 5400.000s)
    

Returns:

    -7.461451463062977