Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

BasicOptimizer.scala:89 executed in 196.65 seconds (1.903 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: 20269625127304
Reset training subject: 20273471479584
Adding measurement 1f87edcb to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.19880275428295135;dx=-7.775431402695215E-7
New Minimum: -0.19880275428295135 > -0.19880342483520508
WOLFE (weak): th(2.154434690031884)=-0.19880342483520508; dx=-7.16772478856943E-7 evalInputDelta=6.705522537231445E-7
New Minimum: -0.19880342483520508 > -0.1988043338060379
WOLFE (weak): th(4.308869380063768)=-0.1988043338060379; dx=-7.167704522679463E-7 evalInputDelta=1.5795230865478516E-6
New Minimum: -0.1988043338060379 > -0.19880737364292145
WOLFE (weak): th(12.926608140191302)=-0.19880737364292145; dx=-7.167716939588049E-7 evalInputDelta=4.6193599700927734E-6
New Minimum: -0.19880737364292145 > -0.1988213211297989
WOLFE (weak): th(51.70643256076521)=-0.1988213211297989; dx=-7.167690179269231E-7 evalInputDelta=1.856684684753418E-5
New Minimum: -0.1988213211297989 > -0.1988953948020935
WOLFE (weak): th(258.53216280382605)=-0.1988953948020935; dx=-7.167404106582008E-7 evalInputDelta=9.264051914215088E-5
New Minimum: -0.1988953948020935 > -0.1993585079908371
WOLFE (weak): th(1551.1929768229563)=-0.1993585079908371; dx=-7.164447848314927E-7 evalInputDelta=5.557537078857422E-4
New Minimum: -0.1993585079908371 > -0.2026873230934143
WOLFE (weak): th(10858.350837760694)=-0.2026873230934143; dx=-7.143219005097673E-7 evalInputDelta=0.0038845688104629517
New Minimum: -0.2026873230934143 > -0.2294604331254959
END: th(86866.80670208555)=-0.2294604331254959; dx=-6.94386139021941E-7 evalInputDelta=0.030657678842544556
Fitness changed from -0.19880275428295135 to -0.2294604331254959
Iteration 1 complete. Error: -0.2294604331254959 Total: 51.7065; Orientation: 0.0447; Line Search: 39.0442
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/04665fe6-23b6-46a9-b0aa-4b51223f720d.jpg)

    Adding measurement 27b200ea to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=-0.2294604331254959;dx=-6.778740682913542E-7
    New Minimum: -0.2294604331254959 > -0.29078951478004456
    WOLFE (weak): th(187148.86177126726)=-0.29078951478004456; dx=-6.327135021194252E-7 evalInputDelta=0.061329081654548645
    New Minimum: -0.29078951478004456 > -0.3477610945701599
    END: th(374297.7235425345)=-0.3477610945701599; dx=-5.852910472777465E-7 evalInputDelta=0.118300661444664
    Fitness changed from -0.2294604331254959 to -0.3477610945701599
    Iteration 2 complete. Error: -0.3477610945701599 Total: 17.7752; Orientation: 0.0448; Line Search: 13.7624
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/cdb40596-8ab6-4143-9798-902101fb1e87.jpg)

    Adding measurement 47d2c62c to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=-0.3477610945701599;dx=-5.33012246459575E-7
    New Minimum: -0.3477610945701599 > -0.5356693416833878
    END: th(806400.0000000001)=-0.5356693416833878; dx=-4.000507183366459E-7 evalInputDelta=0.18790824711322784
    Fitness changed from -0.3477610945701599 to -0.5356693416833878
    Iteration 3 complete. Error: -0.5356693416833878 Total: 13.0422; Orientation: 0.0477; Line Search: 8.4004
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/74d55264-36c9-4fbc-b23e-a3ba09c9bd14.jpg)

    Adding measurement bb84d97 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.038e+03, gradient 5.905e-04, dot -0.920; [d46cfe8e-21d7-4136-951a-c16fba20d42e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.5356693416833878, -0.3477610945701599, -0.2294604331254959, -0.19880275428295135
    LBFGS Accumulation History: 3 points
    Removed measurement bb84d97 to history. Total: 3
    th(0)=-0.5356693416833878;dx=-3.487346418524798E-7
    New Minimum: -0.5356693416833878 > -0.7841472625732422
    END: th(1737336.1340417115)=-0.7841472625732422; dx=-2.2807285313091562E-7 evalInputDelta=0.24847792088985443
    Fitness changed from -0.5356693416833878 to -0.7841472625732422
    Iteration 4 complete. Error: -0.7841472625732422 Total: 13.8878; Orientation: 1.0253; Line Search: 8.6043
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/0e5ff968-1dd7-4d8b-9412-5a5ad37ef12c.jpg)

    Adding measurement 518ace12 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.603e+03, gradient 4.555e-04, dot -0.819; [d46cfe8e-21d7-4136-951a-c16fba20d42e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.7841472625732422, -0.3477610945701599, -0.2294604331254959, -0.19880275428295135
    LBFGS Accumulation History: 3 points
    Removed measurement 518ace12 to history. Total: 3
    th(0)=-0.7841472625732422;dx=-2.0749445928267034E-7
    New Minimum: -0.7841472625732422 > -1.0770389437675476
    END: th(3742977.235425346)=-1.0770389437675476; dx=-1.1442937326191658E-7 evalInputDelta=0.2928916811943054
    Fitness changed from -0.7841472625732422 to -1.0770389437675476
    Iteration 5 complete. Error: -1.0770389437675476 Total: 14.2347; Orientation: 1.0408; Line Search: 8.5747
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/c68ea205-1dc9-49b8-93c7-60a572da2993.jpg)

    Adding measurement 58a219fd to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.562e+03, gradient 3.561e-04, dot -0.703; [d46cfe8e-21d7-4136-951a-c16fba20d42e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.0770389437675476, -0.3477610945701599, -0.2294604331254959, -0.19880275428295135
    LBFGS Accumulation History: 3 points
    Removed measurement 58a219fd to history. Total: 3
    th(0)=-1.0770389437675476;dx=-1.2679798046082378E-7
    New Minimum: -1.0770389437675476 > -1.375816896557808
    END: th(8064000.000000003)=-1.375816896557808; dx=-3.9867299562266765E-8 evalInputDelta=0.2987779527902603
    Fitness changed from -1.0770389437675476 to -1.375816896557808
    Iteration 6 complete. Error: -1.375816896557808 Total: 14.4458; Orientation: 1.0676; Line Search: 9.2533
    Adding measurement 16c0218b to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.542e+03, gradient 3.108e-04, dot -0.460; [d46cfe8e-21d7-4136-951a-c16fba20d42e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.375816896557808, -0.3477610945701599, -0.2294604331254959, -0.19880275428295135
    LBFGS Accumulation History: 3 points
    Removed measurement 16c0218b to history. Total: 3
    th(0)=-1.375816896557808;dx=-9.662682634742783E-8
    New Minimum: -1.375816896557808 > -1.5346902906894684
    WOLF (strong): th(1.7373361340417117E7)=-1.5346902906894684; dx=1.0641507833439288E-8 evalInputDelta=0.15887339413166046
    New Minimum: -1.5346902906894684 > -1.5481866151094437
    END: th(8686680.670208558)=-1.5481866151094437; dx=-7.287835987812235E-9 evalInputDelta=0.17236971855163574
    Fitness changed from -1.375816896557808 to -1.5481866151094437
    Iteration 7 complete. Error: -1.5481866151094437 Total: 17.9828; Orientation: 1.0147; Line Search: 12.5782
    Adding measurement 4d8864c3 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.549e+03, gradient 2.866e-04, dot -0.374; [d46cfe8e-21d7-4136-951a-c16fba20d42e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.5481866151094437, -0.3477610945701599, -0.2294604331254959, -0.19880275428295135
    LBFGS Accumulation History: 3 points
    Removed measurement 4d8864c3 to history. Total: 3
    th(0)=-1.5481866151094437;dx=-8.21336288116961E-8
    New Minimum: -1.5481866151094437 > -1.591147005558014
    WOLF (strong): th(1.871488617712673E7)=-1.591147005558014; dx=2.721877822129332E-8 evalInputDelta=0.04296039044857025
    New Minimum: -1.591147005558014 > -1.6877955347299576
    WOLF (strong): th(9357443.088563366)=-1.6877955347299576; dx=6.884024655099201E-9 evalInputDelta=0.13960891962051392
    END: th(3119147.6961877886)=-1.6429791748523712; dx=-4.0355999678331953E-8 evalInputDelta=0.09479255974292755
    Fitness changed from -1.5481866151094437 to -1.6877955347299576
    Iteration 8 complete. Error: -1.6877955347299576 Total: 22.2568; Orientation: 1.3822; Line Search: 16.8397
    Adding measurement 7b064ed5 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.567e+03, gradient 2.647e-04, dot -0.323; [d46cfe8e-21d7-4136-951a-c16fba20d42e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.6877955347299576, -0.3477610945701599, -0.2294604331254959, -0.19880275428295135
    LBFGS Accumulation History: 3 points
    Removed measurement 7b064ed5 to history. Total: 3
    th(0)=-1.6877955347299576;dx=-7.00564765052226E-8
    New Minimum: -1.6877955347299576 > -1.7979431599378586
    END: th(6720000.000000003)=-1.7979431599378586; dx=-6.8128281339298165E-9 evalInputDelta=0.110147625207901
    Fitness changed from -1.6877955347299576 to -1.7979431599378586
    Iteration 9 complete. Error: -1.7979431599378586 Total: 13.1234; Orientation: 1.0230; Line Search: 8.1798
    Adding measurement 32d9aa07 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.731e+03, gradient 1.980e-04, dot -0.424; [d46cfe8e-21d7-4136-951a-c16fba20d42e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.7979431599378586, -0.3477610945701599, -0.2294604331254959, -0.19880275428295135
    LBFGS Accumulation History: 3 points
    Removed measurement 32d9aa07 to history. Total: 3
    th(0)=-1.7979431599378586;dx=-3.920940693189197E-8
    New Minimum: -1.7979431599378586 > -1.8426229804754257
    WOLF (strong): th(1.4477801117014265E7)=-1.8426229804754257; dx=1.6807079358403064E-8 evalInputDelta=0.04467982053756714
    New Minimum: -1.8426229804754257 > -1.8711925745010376
    END: th(7238900.558507132)=-1.8711925745010376; dx=-3.4824333224939974E-9 evalInputDelta=0.07324941456317902
    Fitness changed from -1.7979431599378586 to -1.8711925745010376
    Iteration 10 complete. Error: -1.8711925745010376 Total: 18.1176; Orientation: 1.1306; Line Search: 12.2414
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/890ea7a3-1c8c-4162-8e2c-42a9fcc90290.jpg)

    Final threshold in iteration 11: -1.8711925745010376 (> -Infinity) after 196.645s (< 5400.000s)

Returns

    -1.8711925745010376