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 132.73 seconds (1.689 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: 109794607543700
Reset training subject: 109797471370200
Adding measurement 734a5b36 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-29.650544830214244;dx=-1.1340440228755088E-6
New Minimum: -29.650544830214244 > -29.6505462562355
END: th(2.154434690031884)=-29.6505462562355; dx=-8.249711004307741E-7 evalInputDelta=1.426021256634158E-6
Fitness changed from -29.650544830214244 to -29.6505462562355
Iteration 1 complete. Error: -29.6505462562355 Total: 13.7245; Orientation: 0.0659; Line Search: 5.2408
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/31853e6a-f817-424a-b8a9-2f65d3e512ae.jpg)
Adding measurement d75f4f4 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-29.6505462562355;dx=-8.228553632339672E-7
New Minimum: -29.6505462562355 > -29.650551960319838
WOLFE (weak): th(4.641588833612779)=-29.650551960319838; dx=-8.222058325990441E-7 evalInputDelta=5.704084337310178E-6
New Minimum: -29.650551960319838 > -29.650554812361598
WOLFE (weak): th(9.283177667225559)=-29.650554812361598; dx=-8.222714226870041E-7 evalInputDelta=8.556126097403194E-6
New Minimum: -29.650554812361598 > -29.650571924606382
WOLFE (weak): th(27.849533001676676)=-29.650571924606382; dx=-8.217688170012206E-7 evalInputDelta=2.5668370881248848E-5
New Minimum: -29.650571924606382 > -29.650647503569388
WOLFE (weak): th(111.3981320067067)=-29.650647503569388; dx=-8.210537174627195E-7 evalInputDelta=1.0124733388749974E-4
New Minimum: -29.650647503569388 > -29.651045359462497
WOLFE (weak): th(556.9906600335335)=-29.651045359462497; dx=-8.211630609610547E-7 evalInputDelta=4.991032269963114E-4
New Minimum: -29.651045359462497 > -29.653545027221607
WOLFE (weak): th(3341.9439602012008)=-29.653545027221607; dx=-8.209674957377631E-7 evalInputDelta=0.0029987709861067913
New Minimum: -29.653545027221607 > -29.67152701357649
WOLFE (weak): th(23393.607721408407)=-29.67152701357649; dx=-8.19922695638078E-7 evalInputDelta=0.020980757340989697
New Minimum: -29.67152701357649 > -29.81744011367902
WOLFE (weak): th(187148.86177126726)=-29.81744011367902; dx=-8.105555757238206E-7 evalInputDelta=0.1668938574435188
New Minimum: -29.81744011367902 > -31.068563306893367
END: th(1684339.7559414054)=-31.068563306893367; dx=-7.15563658544065E-7 evalInputDelta=1.4180170506578662
Fitness changed from -29.6505462562355 to -31.068563306893367
Iteration 2 complete. Error: -31.068563306893367 Total: 30.2342; Orientation: 0.0821; Line Search: 26.9748
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/ea3bc68e-be10-4271-b596-6d353f3774c2.jpg)
Adding measurement 76477e67 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-31.068563306893367;dx=-7.351693291634974E-7
New Minimum: -31.068563306893367 > -33.429243221392134
END: th(3628800.0000000005)=-33.429243221392134; dx=-5.044269096114964E-7 evalInputDelta=2.3606799144987676
Fitness changed from -31.068563306893367 to -33.429243221392134
Iteration 3 complete. Error: -33.429243221392134 Total: 8.7120; Orientation: 0.0663; Line Search: 5.2731
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/b827c1f1-f55e-4104-a986-31857d5c04eb.jpg)
Adding measurement 77811548 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.363e+04, gradient 7.109e-04, dot -0.822; [532f3a12-09b9-49ab-a172-24bbbe1a3e92 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -33.429243221392134, -31.068563306893367, -29.6505462562355, -29.650544830214244
LBFGS Accumulation History: 3 points
Removed measurement 77811548 to history. Total: 3
th(0)=-33.429243221392134;dx=-5.048877692881436E-7
New Minimum: -33.429243221392134 > -36.79394450264959
END: th(7818012.603187701)=-36.79394450264959; dx=-3.0016228657689126E-7 evalInputDelta=3.364701281257453
Fitness changed from -33.429243221392134 to -36.79394450264959
Iteration 4 complete. Error: -36.79394450264959 Total: 9.7754; Orientation: 1.1671; Line Search: 5.4620
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/8d57efc8-ef96-45e8-b9a0-c62124e9b3a4.jpg)
Adding measurement 33028c0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.263e+04, gradient 6.282e-04, dot -0.647; [532f3a12-09b9-49ab-a172-24bbbe1a3e92 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -36.79394450264959, -31.068563306893367, -29.6505462562355, -29.650544830214244
LBFGS Accumulation History: 3 points
Removed measurement 33028c0 to history. Total: 3
th(0)=-36.79394450264959;dx=-3.945252552236002E-7
New Minimum: -36.79394450264959 > -40.81678423872087
END: th(1.6843397559414055E7)=-40.81678423872087; dx=-1.2547141236393518E-7 evalInputDelta=4.022839736071283
Fitness changed from -36.79394450264959 to -40.81678423872087
Iteration 5 complete. Error: -40.81678423872087 Total: 9.7862; Orientation: 1.1980; Line Search: 5.5365
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/0ed5db39-fb4c-4615-a843-38af3af54e5a.jpg)
Adding measurement 2fe90278 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.303e+04, gradient 6.767e-04, dot -0.390; [532f3a12-09b9-49ab-a172-24bbbe1a3e92 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -40.81678423872087, -31.068563306893367, -29.6505462562355, -29.650544830214244
LBFGS Accumulation History: 3 points
Removed measurement 2fe90278 to history. Total: 3
th(0)=-40.81678423872087;dx=-4.5752053659067744E-7
New Minimum: -40.81678423872087 > -43.22781647048535
WOLF (strong): th(3.628800000000001E7)=-43.22781647048535; dx=2.2108096386328494E-8 evalInputDelta=2.41103223176448
New Minimum: -43.22781647048535 > -43.68478062242587
WOLF (strong): th(1.8144000000000004E7)=-43.68478062242587; dx=1.7587646717974396E-9 evalInputDelta=2.867996383704998
END: th(6048000.000000001)=-42.964134679516256; dx=-1.939485704999441E-7 evalInputDelta=2.1473504407953854
Fitness changed from -40.81678423872087 to -43.68478062242587
Iteration 6 complete. Error: -43.68478062242587 Total: 15.1297; Orientation: 1.0994; Line Search: 10.8139
Adding measurement 2393a8c3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.519e+04, gradient 7.129e-04, dot -0.302; [532f3a12-09b9-49ab-a172-24bbbe1a3e92 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -43.68478062242587, -31.068563306893367, -29.6505462562355, -29.650544830214244
LBFGS Accumulation History: 3 points
Removed measurement 2393a8c3 to history. Total: 3
th(0)=-43.68478062242587;dx=-5.081529053894703E-7
New Minimum: -43.68478062242587 > -47.31324097870786
END: th(1.3030021005312836E7)=-47.31324097870786; dx=-2.2089325039093076E-8 evalInputDelta=3.628460356281991
Fitness changed from -43.68478062242587 to -47.31324097870786
Iteration 7 complete. Error: -47.31324097870786 Total: 9.1645; Orientation: 1.1400; Line Search: 5.4101
Adding measurement 8e9ba83 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.294e+04, gradient 6.067e-04, dot -0.405; [532f3a12-09b9-49ab-a172-24bbbe1a3e92 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -47.31324097870786, -31.068563306893367, -29.6505462562355, -29.650544830214244
LBFGS Accumulation History: 3 points
Removed measurement 8e9ba83 to history. Total: 3
th(0)=-47.31324097870786;dx=-3.6734889868903E-7
New Minimum: -47.31324097870786 > -48.731685940287
WOLF (strong): th(2.8072329265690096E7)=-48.731685940287; dx=7.633605888102369E-8 evalInputDelta=1.4184449615791408
New Minimum: -48.731685940287 > -49.71244996434737
WOLF (strong): th(1.4036164632845048E7)=-49.71244996434737; dx=5.539785649554423E-9 evalInputDelta=2.399208985639511
END: th(4678721.544281683)=-48.825124401720174; dx=-2.2493390051884696E-7 evalInputDelta=1.5118834230123142
Fitness changed from -47.31324097870786 to -49.71244996434737
Iteration 8 complete. Error: -49.71244996434737 Total: 14.6484; Orientation: 1.1165; Line Search: 10.9593
Adding measurement 22db324 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.776e+04, gradient 6.182e-04, dot -0.390; [532f3a12-09b9-49ab-a172-24bbbe1a3e92 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -49.71244996434737, -31.068563306893367, -29.6505462562355, -29.650544830214244
LBFGS Accumulation History: 3 points
Removed measurement 22db324 to history. Total: 3
th(0)=-49.71244996434737;dx=-3.818432023101637E-7
New Minimum: -49.71244996434737 > -51.86092429574634
END: th(1.0080000000000004E7)=-51.86092429574634; dx=-2.395771024680598E-8 evalInputDelta=2.1484743313989654
Fitness changed from -49.71244996434737 to -51.86092429574634
Iteration 9 complete. Error: -51.86092429574634 Total: 9.0988; Orientation: 1.1126; Line Search: 5.3313
Adding measurement d7123a1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.293e+04, gradient 5.219e-04, dot -0.475; [532f3a12-09b9-49ab-a172-24bbbe1a3e92 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -51.86092429574634, -31.068563306893367, -29.6505462562355, -29.650544830214244
LBFGS Accumulation History: 3 points
Removed measurement d7123a1 to history. Total: 3
th(0)=-51.86092429574634;dx=-2.7125179725110324E-7
New Minimum: -51.86092429574634 > -53.31035718580404
WOLF (strong): th(2.1716701675521396E7)=-53.31035718580404; dx=3.158312147070005E-8 evalInputDelta=1.4494328900577003
New Minimum: -53.31035718580404 > -53.50920281005851
END: th(1.0858350837760698E7)=-53.50920281005851; dx=-3.1904409012925664E-8 evalInputDelta=1.6482785143121745
Fitness changed from -51.86092429574634 to -53.50920281005851
Iteration 10 complete. Error: -53.50920281005851 Total: 12.0169; Orientation: 1.1278; Line Search: 8.3378
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/a8cc9bb4-f704-4eb4-bf3c-598c8a668d86.jpg)
Final threshold in iteration 11: -53.50920281005851 (> -Infinity) after 132.730s (< 5400.000s)

Returns

    -53.50920281005851