Iteration 1 Iteration 1

Iteration 2 Iteration 2

Code from BasicOptimizer.scala:88 executed in 849.70 seconds (6.866 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: 7847105815474
    Reset training subject: 7856025233985
    Adding measurement 4d23a573 to history. Total: 0
    LBFGS Accumulation History: 1 points
    Constructing line search parameters: GD+Trust
    th(0)=-0.166143000125885;dx=-2.296639126113005E-8
    Armijo: th(2.154434690031884)=-0.16614297032356262; dx=-2.2964799079673282E-8 evalInputDelta=-2.9802322387695312E-8
    New Minimum: -0.166143000125885 > -0.16614305973052979
    WOLFE (weak): th(1.077217345015942)=-0.16614305973052979; dx=-2.2966746513225086E-8 evalInputDelta=5.9604644775390625E-8
    Armijo: th(1.6158260175239127)=-0.166143000125885; dx=-2.2962899948998816E-8 evalInputDelta=0.0
    Armijo: th(1.3465216812699272)=-0.166143000125885; dx=-2.2962544182234214E-8 evalInputDelta=0.0
    Armijo: th(1.2118695131429345)=-0.166143000125885; dx=-2.296661542117907E-8 evalInputDelta=0.0
    Armijo: th(1.1445434290794383)=-0.166143000125885; dx=-2.2962919292950582E-8 evalInputDelta=0.0
    WOLFE (weak): th(1.1108803870476902)=-0.1661430299282074; dx=-2.2960858742890538E-8 evalInputDelta=2.9802322387695312E-8
    Armijo: th(1.1277119080635643)=-0.16614294052124023; dx=-2.2952265586954387E-8 evalInputDelta=-5.9604644775390625E-8
    Armijo: th(1.1192961475556271)=-0.16614297032356262; dx=-2.296032322674759E-8 evalInputDelta=-2.9802322387695312E-8
    Armijo: th(1.1150882673016587)=-0.166143000125885; dx=-2.2964663872846352E-8 evalInputDelta=0.0
    WOLFE (weak): th(1.1129843271746744)=-0.1661430299282074; dx=-2.2967371587632302E-8 evalInputDelta=2.9802322387695312E-8
    Armijo: th(1.1140362972381666)=-0.16614294052124023; dx=-2.2966023611378574E-8 evalInputDelta=-5.9604644775390625E-8
    WOLFE (weak): th(1.1135103122064205)=-0.1661430299282074; dx=-2.2969728786846795E-8 evalInputDelta=2.9802322387695312E-8
    WOLFE (weak): th(1.1137733047222935)=-0.1661430299282074; dx=-2.2961426211906315E-8 evalInputDelta=2.9802322387695312E-8
    WOLFE (weak): th(1.11390480098023)=-0.1661430299282074; dx=-2.2932471883286385E-8 evalInputDelta=2.9802322387695312E-8
    Armijo: th(1.1139705491091982)=-0.16614294052124023; dx=-2.2961516

...skipping 7961 bytes...

    =-2.2837764472051147E-8 evalInputDelta=0.0
    Armijo: th(4.997403061820514E-5)=-0.16614305973052979; dx=-2.2735150786499625E-8 evalInputDelta=-2.9802322387695312E-8
    Armijo: th(4.888763864824416E-5)=-0.16614305973052979; dx=-2.285008835721884E-8 evalInputDelta=-2.9802322387695312E-8
    WOLFE (weak): th(4.8344442663263666E-5)=-0.16614308953285217; dx=-2.284843817818016E-8 evalInputDelta=0.0
    Armijo: th(4.861604065575391E-5)=-0.16614305973052979; dx=-2.2846577935399005E-8 evalInputDelta=-2.9802322387695312E-8
    Armijo: th(4.848024165950879E-5)=-0.16614305973052979; dx=-2.284457731980358E-8 evalInputDelta=-2.9802322387695312E-8
    Armijo: th(4.841234216138623E-5)=-0.16614305973052979; dx=-2.2843857842394922E-8 evalInputDelta=-2.9802322387695312E-8
    WOLFE (weak): th(4.837839241232495E-5)=-0.16614308953285217; dx=-2.2841384939860392E-8 evalInputDelta=0.0
    WOLFE (weak): th(4.839536728685559E-5)=-0.16614308953285217; dx=-2.2847754505042715E-8 evalInputDelta=0.0
    WOLFE (weak): th(4.840385472412091E-5)=-0.16614308953285217; dx=-2.2843752086661876E-8 evalInputDelta=0.0
    WOLFE (weak): th(4.840809844275357E-5)=-0.16614308953285217; dx=-2.2839979040923637E-8 evalInputDelta=0.0
    Armijo: th(4.84102203020699E-5)=-0.16614305973052979; dx=-2.2843135155409762E-8 evalInputDelta=-2.9802322387695312E-8
    Armijo: th(4.8409159372411735E-5)=-0.16614305973052979; dx=-2.284333677434101E-8 evalInputDelta=-2.9802322387695312E-8
    WOLFE (weak): th(4.8408628907582656E-5)=-0.16614308953285217; dx=-2.2848743557834693E-8 evalInputDelta=0.0
    Armijo: th(4.840889413999719E-5)=-0.16614305973052979; dx=-2.284917026926163E-8 evalInputDelta=-2.9802322387695312E-8
    mu ~= nu (4.8408628907582656E-5): th(0.0)=-0.16614308953285217
    Fitness changed from -0.16614308953285217 to -0.16614308953285217
    Static Iteration Total: 199.2472; Orientation: 0.0358; Line Search: 182.9406
    Iteration 4 failed. Error: -0.16614308953285217
    Previous Error: 0.0 -> -0.16614308953285217
    Optimization terminated 4
    Final threshold in iteration 4: -0.16614308953285217 (> -Infinity) after 849.698s (< 3600.000s)
    

Returns:

    -0.16614308953285217