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 133.06 seconds (1.638 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: 326575568094200
Reset training subject: 326578396196400
Adding measurement 73ca34e7 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-28.07376552084803;dx=-2.2059092706318262E-5
New Minimum: -28.07376552084803 > -28.073815980653897
WOLFE (weak): th(2.154434690031884)=-28.073815980653897; dx=-2.0133899510860916E-5 evalInputDelta=5.0459805866154284E-5
New Minimum: -28.073815980653897 > -28.073865366759048
WOLFE (weak): th(4.308869380063768)=-28.073865366759048; dx=-2.0143146335217435E-5 evalInputDelta=9.984591101641627E-5
New Minimum: -28.073865366759048 > -28.07406291031089
WOLFE (weak): th(12.926608140191302)=-28.07406291031089; dx=-2.0136855582310117E-5 evalInputDelta=2.9738946285817747E-4
New Minimum: -28.07406291031089 > -28.07495398623014
WOLFE (weak): th(51.70643256076521)=-28.07495398623014; dx=-2.0137522529129402E-5 evalInputDelta=0.0011884653821070401
New Minimum: -28.07495398623014 > -28.07970841813072
WOLFE (weak): th(258.53216280382605)=-28.07970841813072; dx=-2.0135979181505582E-5 evalInputDelta=0.005942897282690041
New Minimum: -28.07970841813072 > -28.10942335835939
WOLFE (weak): th(1551.1929768229563)=-28.10942335835939; dx=-2.0135139052670138E-5 evalInputDelta=0.03565783751135854
New Minimum: -28.10942335835939 > -28.322045598147973
WOLFE (weak): th(10858.350837760694)=-28.322045598147973; dx=-1.988668512224723E-5 evalInputDelta=0.24828007729994184
New Minimum: -28.322045598147973 > -30.00540759309331
END: th(86866.80670208555)=-30.00540759309331; dx=-1.8942263372154532E-5 evalInputDelta=1.9316420722452783
Fitness changed from -28.07376552084803 to -30.00540759309331
Iteration 1 complete. Error: -30.00540759309331 Total: 32.7607; Orientation: 0.2446; Line Search: 24.2454
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/b1b322a9-e632-44b3-aa7a-abe06ecc9489.jpg)
Adding measurement 5b3755f4 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-30.00540759309331;dx=-1.8796859097674856E-5
New Minimum: -30.00540759309331 > -33.842206099127075
WOLFE (weak): th(187148.86177126726)=-33.842206099127075; dx=-1.7021061218687968E-5 evalInputDelta=3.836798506033766
New Minimum: -33.842206099127075 > -37.21338272415763
END: th(374297.7235425345)=-37.21338272415763; dx=-1.4550345071078895E-5 evalInputDelta=7.207975131064323
Fitness changed from -30.00540759309331 to -37.21338272415763
Iteration 2 complete. Error: -37.21338272415763 Total: 11.2646; Orientation: 0.0440; Line Search: 8.1877
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/2fb14924-55dd-4d75-91b7-918b0cb7fb28.jpg)
Adding measurement 13d10057 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-37.21338272415763;dx=-1.5342174509776458E-5
New Minimum: -37.21338272415763 > -48.6881887803864
END: th(806400.0000000001)=-48.6881887803864; dx=-9.303392658010324E-6 evalInputDelta=11.474806056228765
Fitness changed from -37.21338272415763 to -48.6881887803864
Iteration 3 complete. Error: -48.6881887803864 Total: 8.6588; Orientation: 0.0464; Line Search: 5.3227
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/9e93ad11-b776-4c38-9215-3950beecb720.jpg)
Adding measurement 69ac5752 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.521e+04, gradient 3.443e-03, dot -0.672; [a74d9859-02ca-471b-9f49-e48bb0f263d3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -48.6881887803864, -37.21338272415763, -30.00540759309331, -28.07376552084803
LBFGS Accumulation History: 3 points
Removed measurement 69ac5752 to history. Total: 3
th(0)=-48.6881887803864;dx=-1.1853455523048523E-5
New Minimum: -48.6881887803864 > -63.787266096215845
END: th(1737336.1340417115)=-63.787266096215845; dx=-4.330192730936033E-6 evalInputDelta=15.099077315829447
Fitness changed from -48.6881887803864 to -63.787266096215845
Iteration 4 complete. Error: -63.787266096215845 Total: 9.6600; Orientation: 1.2556; Line Search: 5.3557
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/a9b088d5-1b48-44a5-a2b9-9f7de1a0c0cf.jpg)
Adding measurement 630c3af3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.606e+04, gradient 3.513e-03, dot -0.443; [a74d9859-02ca-471b-9f49-e48bb0f263d3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -63.787266096215845, -37.21338272415763, -30.00540759309331, -28.07376552084803
LBFGS Accumulation History: 3 points
Removed measurement 630c3af3 to history. Total: 3
th(0)=-63.787266096215845;dx=-1.2335945146854528E-5
New Minimum: -63.787266096215845 > -76.49564565707591
WOLF (strong): th(3742977.235425346)=-76.49564565707591; dx=2.452362390118273E-7 evalInputDelta=12.708379560860067
END: th(1871488.617712673)=-75.43195442141443; dx=-1.7542111657200102E-6 evalInputDelta=11.644688325198587
Fitness changed from -63.787266096215845 to -76.49564565707591
Iteration 5 complete. Error: -76.49564565707591 Total: 12.1906; Orientation: 1.0544; Line Search: 7.9282
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/110a1c57-02e4-4b75-be5b-ae614396f9be.jpg)
Adding measurement 7fb02606 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.530e+04, gradient 4.163e-03, dot -0.247; [a74d9859-02ca-471b-9f49-e48bb0f263d3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -76.49564565707591, -37.21338272415763, -30.00540759309331, -28.07376552084803
LBFGS Accumulation History: 3 points
Removed measurement 7fb02606 to history. Total: 3
th(0)=-76.49564565707591;dx=-1.7323312314247347E-5
New Minimum: -76.49564565707591 > -91.20049155824309
WOLF (strong): th(4032000.0000000014)=-91.20049155824309; dx=4.328244375741895E-6 evalInputDelta=14.704845901167175
New Minimum: -91.20049155824309 > -96.45704851030851
END: th(2016000.0000000007)=-96.45704851030851; dx=-1.2539150415673177E-6 evalInputDelta=19.9614028532326
Fitness changed from -76.49564565707591 to -96.45704851030851
Iteration 6 complete. Error: -96.45704851030851 Total: 12.0469; Orientation: 1.1105; Line Search: 7.9566
Adding measurement 227c0cf7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.879e+04, gradient 3.317e-03, dot -0.366; [a74d9859-02ca-471b-9f49-e48bb0f263d3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -96.45704851030851, -37.21338272415763, -30.00540759309331, -28.07376552084803
LBFGS Accumulation History: 3 points
Removed measurement 227c0cf7 to history. Total: 3
th(0)=-96.45704851030851;dx=-1.1001411823443899E-5
New Minimum: -96.45704851030851 > -105.92239527438815
WOLF (strong): th(4343340.335104279)=-105.92239527438815; dx=2.8603283420754063E-6 evalInputDelta=9.46534676407964
New Minimum: -105.92239527438815 > -109.63154418442619
END: th(2171670.1675521396)=-109.63154418442619; dx=-8.549508772484662E-7 evalInputDelta=13.17449567411768
Fitness changed from -96.45704851030851 to -109.63154418442619
Iteration 7 complete. Error: -109.63154418442619 Total: 11.3907; Orientation: 1.0274; Line Search: 7.7419
Adding measurement b21cbbf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.211e+04, gradient 3.173e-03, dot -0.412; [a74d9859-02ca-471b-9f49-e48bb0f263d3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -109.63154418442619, -37.21338272415763, -30.00540759309331, -28.07376552084803
LBFGS Accumulation History: 3 points
Removed measurement b21cbbf to history. Total: 3
th(0)=-109.63154418442619;dx=-1.005631781777132E-5
New Minimum: -109.63154418442619 > -114.11648780507397
WOLF (strong): th(4678721.544281683)=-114.11648780507397; dx=2.947364964664306E-6 evalInputDelta=4.484943620647783
New Minimum: -114.11648780507397 > -120.06363114612974
WOLF (strong): th(2339360.7721408415)=-120.06363114612974; dx=5.764392745982739E-7 evalInputDelta=10.432086961703547
END: th(779786.9240469472)=-116.53662200323566; dx=-5.702060658601732E-6 evalInputDelta=6.905077818809474
Fitness changed from -109.63154418442619 to -120.06363114612974
Iteration 8 complete. Error: -120.06363114612974 Total: 13.9953; Orientation: 1.1012; Line Search: 10.3292
Adding measurement 5ed1bc4f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.633e+04, gradient 3.307e-03, dot -0.374; [a74d9859-02ca-471b-9f49-e48bb0f263d3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -120.06363114612974, -37.21338272415763, -30.00540759309331, -28.07376552084803
LBFGS Accumulation History: 3 points
Removed measurement 5ed1bc4f to history. Total: 3
th(0)=-120.06363114612974;dx=-1.0929773709595558E-5
New Minimum: -120.06363114612974 > -130.58894096504977
END: th(1680000.0000000007)=-130.58894096504977; dx=-7.37392604490147E-7 evalInputDelta=10.525309818920036
Fitness changed from -120.06363114612974 to -130.58894096504977
Iteration 9 complete. Error: -130.58894096504977 Total: 8.9776; Orientation: 1.0485; Line Search: 5.1715
Adding measurement 12b34bd5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.002e+04, gradient 2.604e-03, dot -0.495; [a74d9859-02ca-471b-9f49-e48bb0f263d3 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -130.58894096504977, -37.21338272415763, -30.00540759309331, -28.07376552084803
LBFGS Accumulation History: 3 points
Removed measurement 12b34bd5 to history. Total: 3
th(0)=-130.58894096504977;dx=-6.774488271016762E-6
New Minimum: -130.58894096504977 > -138.4801399718046
WOLF (strong): th(3619450.279253566)=-138.4801399718046; dx=1.1428715055120005E-6 evalInputDelta=7.8911990067548174
New Minimum: -138.4801399718046 > -138.73680726770414
END: th(1809725.139626783)=-138.73680726770414; dx=-1.5803141544979015E-6 evalInputDelta=8.147866302654364
Fitness changed from -130.58894096504977 to -138.73680726770414
Iteration 10 complete. Error: -138.73680726770414 Total: 11.5832; Orientation: 1.0480; Line Search: 7.8804
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/9bbbbdc5-4239-4dda-8e1e-f55d5f1bca5f.jpg)
Final threshold in iteration 11: -138.73680726770414 (> -Infinity) after 133.044s (< 5400.000s)

Returns

    -138.73680726770414