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 301.62 seconds (3.742 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: 575468954803700
Reset training subject: 575475020846400
Adding measurement 73ea8a6a to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-40.578997988975445;dx=-2.1448198871923036E-6
New Minimum: -40.578997988975445 > -40.57900171145508
END: th(2.154434690031884)=-40.57900171145508; dx=-1.8499091766584617E-6 evalInputDelta=3.7224796329837773E-6
Fitness changed from -40.578997988975445 to -40.57900171145508
Iteration 1 complete. Error: -40.57900171145508 Total: 30.9230; Orientation: 0.1425; Line Search: 12.4475
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/d1099c7d-09c9-446c-8e16-547f85bd7537.jpg)
Adding measurement 65461c27 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-40.57900171145508;dx=-1.8500343104694674E-6
New Minimum: -40.57900171145508 > -40.579011017652654
WOLFE (weak): th(4.641588833612779)=-40.579011017652654; dx=-1.8489092863648093E-6 evalInputDelta=9.306197576108843E-6
New Minimum: -40.579011017652654 > -40.579022185086934
WOLFE (weak): th(9.283177667225559)=-40.579022185086934; dx=-1.8473616282844623E-6 evalInputDelta=2.0473631856532393E-5
New Minimum: -40.579022185086934 > -40.57906127108271
WOLFE (weak): th(27.849533001676676)=-40.57906127108271; dx=-1.8460807136796976E-6 evalInputDelta=5.955962762982381E-5
New Minimum: -40.57906127108271 > -40.57922878206676
WOLFE (weak): th(111.3981320067067)=-40.57922878206676; dx=-1.8455633931232272E-6 evalInputDelta=2.2707061167892562E-4
New Minimum: -40.57922878206676 > -40.580131468244154
WOLFE (weak): th(556.9906600335335)=-40.580131468244154; dx=-1.8447540882607667E-6 evalInputDelta=0.0011297567890764526
New Minimum: -40.580131468244154 > -40.58576675396197
WOLFE (weak): th(3341.9439602012008)=-40.58576675396197; dx=-1.8451804992267107E-6 evalInputDelta=0.006765042506891916
New Minimum: -40.58576675396197 > -40.62631847981539
WOLFE (weak): th(23393.607721408407)=-40.62631847981539; dx=-1.842973147000058E-6 evalInputDelta=0.047316768360310846
New Minimum: -40.62631847981539 > -40.9553469041904
WOLFE (weak): th(187148.86177126726)=-40.9553469041904; dx=-1.8210158020057426E-6 evalInputDelta=0.37634519273532163
New Minimum: -40.9553469041904 > -43.746201655202384
END: th(1684339.7559414054)=-43.746201655202384; dx=-1.5714296599076297E-6 evalInputDelta=3.167199943747306
Fitness changed from -40.57900171145508 to -43.746201655202384
Iteration 2 complete. Error: -43.746201655202384 Total: 68.0796; Orientation: 0.1445; Line Search: 60.6690
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/75cf8a19-73b4-409d-8bd4-8e42bbe12e26.jpg)
Adding measurement 1d8fcf00 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-43.746201655202384;dx=-1.5066661991338604E-6
New Minimum: -43.746201655202384 > -48.66439864160696
END: th(3628800.0000000005)=-48.66439864160696; dx=-1.0058707060359364E-6 evalInputDelta=4.918196986404574
Fitness changed from -43.746201655202384 to -48.66439864160696
Iteration 3 complete. Error: -48.66439864160696 Total: 19.3652; Orientation: 0.1429; Line Search: 12.0491
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/6df3122b-a893-46a9-b287-88f3d4fb6dd5.jpg)
Adding measurement 52ee66a4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.111e+04, gradient 9.858e-04, dot -0.810; [ba942e32-03d3-4f9c-bf5c-50852db1a04e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -48.66439864160696, -43.746201655202384, -40.57900171145508, -40.578997988975445
LBFGS Accumulation History: 3 points
Removed measurement 52ee66a4 to history. Total: 3
th(0)=-48.66439864160696;dx=-9.70758181093065E-7
New Minimum: -48.66439864160696 > -54.9411634901138
END: th(7818012.603187701)=-54.9411634901138; dx=-5.278816172582753E-7 evalInputDelta=6.2767648485068435
Fitness changed from -48.66439864160696 to -54.9411634901138
Iteration 4 complete. Error: -54.9411634901138 Total: 22.7500; Orientation: 2.5528; Line Search: 12.7209
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/a622f8c5-71c4-4e5d-bd6c-4b56f8125169.jpg)
Adding measurement fa77cad to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.020e+04, gradient 8.575e-04, dot -0.603; [ba942e32-03d3-4f9c-bf5c-50852db1a04e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -54.9411634901138, -43.746201655202384, -40.57900171145508, -40.578997988975445
LBFGS Accumulation History: 3 points
Removed measurement fa77cad to history. Total: 3
th(0)=-54.9411634901138;dx=-7.350253377046653E-7
New Minimum: -54.9411634901138 > -61.47255360660822
END: th(1.6843397559414055E7)=-61.47255360660822; dx=-1.5632182107419305E-7 evalInputDelta=6.531390116494421
Fitness changed from -54.9411634901138 to -61.47255360660822
Iteration 5 complete. Error: -61.47255360660822 Total: 22.3548; Orientation: 2.4555; Line Search: 12.3835
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/7f9e5cf3-274a-4462-a958-d2bec41a56f2.jpg)
Adding measurement 177e7178 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.236e+04, gradient 1.010e-03, dot -0.341; [ba942e32-03d3-4f9c-bf5c-50852db1a04e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -61.47255360660822, -43.746201655202384, -40.57900171145508, -40.578997988975445
LBFGS Accumulation History: 3 points
Removed measurement 177e7178 to history. Total: 3
th(0)=-61.47255360660822;dx=-1.0184906992501076E-6
Armijo: th(3.628800000000001E7)=-59.85608423151781; dx=2.208639553282916E-7 evalInputDelta=-1.6164693750904107
New Minimum: -61.47255360660822 > -65.25020704009097
WOLF (strong): th(1.8144000000000004E7)=-65.25020704009097; dx=2.375847810560333E-7 evalInputDelta=3.7776534334827474
New Minimum: -65.25020704009097 > -66.12192351425904
END: th(6048000.000000001)=-66.12192351425904; dx=-3.6119482258750554E-7 evalInputDelta=4.649369907650815
Fitness changed from -61.47255360660822 to -66.12192351425904
Iteration 6 complete. Error: -66.12192351425904 Total: 34.4534; Orientation: 2.4166; Line Search: 24.5777
Adding measurement 29a6db82 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.029e+04, gradient 7.156e-04, dot -0.614; [ba942e32-03d3-4f9c-bf5c-50852db1a04e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -66.12192351425904, -43.746201655202384, -40.57900171145508, -40.578997988975445
LBFGS Accumulation History: 3 points
Removed measurement 29a6db82 to history. Total: 3
th(0)=-66.12192351425904;dx=-5.119530242067243E-7
New Minimum: -66.12192351425904 > -70.55530816930232
END: th(1.3030021005312836E7)=-70.55530816930232; dx=-1.7652673121065805E-7 evalInputDelta=4.433384655043284
Fitness changed from -66.12192351425904 to -70.55530816930232
Iteration 7 complete. Error: -70.55530816930232 Total: 21.3092; Orientation: 2.4912; Line Search: 12.4728
Adding measurement 4bef1cfa to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.623e+04, gradient 8.108e-04, dot -0.505; [ba942e32-03d3-4f9c-bf5c-50852db1a04e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -70.55530816930232, -43.746201655202384, -40.57900171145508, -40.578997988975445
LBFGS Accumulation History: 3 points
Removed measurement 4bef1cfa to history. Total: 3
th(0)=-70.55530816930232;dx=-6.562194693597681E-7
New Minimum: -70.55530816930232 > -71.94230848911782
WOLF (strong): th(2.8072329265690096E7)=-71.94230848911782; dx=1.3260938577711134E-7 evalInputDelta=1.387000319815499
New Minimum: -71.94230848911782 > -73.89048986806385
WOLF (strong): th(1.4036164632845048E7)=-73.89048986806385; dx=4.722516916178505E-8 evalInputDelta=3.335181698761531
END: th(4678721.544281683)=-73.07759495499673; dx=-3.2814432359894423E-7 evalInputDelta=2.522286785694405
Fitness changed from -70.55530816930232 to -73.89048986806385
Iteration 8 complete. Error: -73.89048986806385 Total: 33.7004; Orientation: 2.4617; Line Search: 24.9249
Adding measurement 38c378bc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.761e+04, gradient 9.216e-04, dot -0.384; [ba942e32-03d3-4f9c-bf5c-50852db1a04e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -73.89048986806385, -43.746201655202384, -40.57900171145508, -40.578997988975445
LBFGS Accumulation History: 3 points
Removed measurement 38c378bc to history. Total: 3
th(0)=-73.89048986806385;dx=-8.481407142373338E-7
New Minimum: -73.89048986806385 > -78.61120646895523
WOLF (strong): th(1.0080000000000004E7)=-78.61120646895523; dx=1.2083047134450438E-8 evalInputDelta=4.720716600891379
END: th(5040000.000000002)=-77.54203560302211; dx=-4.453426956407479E-7 evalInputDelta=3.651545734958262
Fitness changed from -73.89048986806385 to -78.61120646895523
Iteration 9 complete. Error: -78.61120646895523 Total: 26.9914; Orientation: 2.8119; Line Search: 18.2408
Adding measurement 16eee182 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.842e+04, gradient 7.329e-04, dot -0.527; [ba942e32-03d3-4f9c-bf5c-50852db1a04e = 1.000/1.000e+00]
Orientation rejected. Popping history element from -78.61120646895523, -43.746201655202384, -40.57900171145508, -40.578997988975445
LBFGS Accumulation History: 3 points
Removed measurement 16eee182 to history. Total: 3
th(0)=-78.61120646895523;dx=-5.368838218064452E-7
New Minimum: -78.61120646895523 > -81.77028262182283
END: th(1.0858350837760698E7)=-81.77028262182283; dx=-4.508323885234728E-8 evalInputDelta=3.1590761528675984
Fitness changed from -78.61120646895523 to -81.77028262182283
Iteration 10 complete. Error: -81.77028262182283 Total: 20.5956; Orientation: 2.4306; Line Search: 12.0553
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/9af19efb-259a-4213-aae6-8198cb5fd3be.jpg)
Final threshold in iteration 11: -81.77028262182283 (> -Infinity) after 301.615s (< 5400.000s)

Returns

    -81.77028262182283