Iteration 1 Iteration 1

Iteration 2 Iteration 2

Iteration 3 Iteration 3

Iteration 4 Iteration 4

Iteration 5 Iteration 5

Iteration 10 Iteration 10

Iteration 15 Iteration 15

BasicOptimizer.scala:89 executed in 41.42 seconds (0.998 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: 568439318470400
Reset training subject: 568439943804300
Adding measurement 263565f5 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-25.56192620939661;dx=-1.1370713802168822E-6
New Minimum: -25.56192620939661 > -25.561929164074016
WOLFE (weak): th(2.154434690031884)=-25.561929164074016; dx=-1.137281621033963E-6 evalInputDelta=2.95467740585309E-6
New Minimum: -25.561929164074016 > -25.56193211875108
WOLFE (weak): th(4.308869380063768)=-25.56193211875108; dx=-1.1401546677934794E-6 evalInputDelta=5.909354470645667E-6
New Minimum: -25.56193211875108 > -25.56194246011811
WOLFE (weak): th(12.926608140191302)=-25.56194246011811; dx=-1.1383400200571903E-6 evalInputDelta=1.6250721500910004E-5
New Minimum: -25.56194246011811 > -25.561991212220633
WOLFE (weak): th(51.70643256076521)=-25.561991212220633; dx=-1.1401513449966958E-6 evalInputDelta=6.500282402299717E-5
New Minimum: -25.561991212220633 > -25.562252699183706
WOLFE (weak): th(258.53216280382605)=-25.562252699183706; dx=-1.139196667347602E-6 evalInputDelta=3.264897870955963E-4
New Minimum: -25.562252699183706 > -25.563880653895474
WOLFE (weak): th(1551.1929768229563)=-25.563880653895474; dx=-1.1369395249703905E-6 evalInputDelta=0.0019544444988639498
New Minimum: -25.563880653895474 > -25.57563519193041
WOLFE (weak): th(10858.350837760694)=-25.57563519193041; dx=-1.1395296704778703E-6 evalInputDelta=0.013708982533799485
New Minimum: -25.57563519193041 > -25.671546074540007
WOLFE (weak): th(86866.80670208555)=-25.671546074540007; dx=-1.1300174008235094E-6 evalInputDelta=0.10961986514339728
New Minimum: -25.671546074540007 > -26.516464680648948
WOLFE (weak): th(781801.26031877)=-26.516464680648948; dx=-1.0556678178906009E-6 evalInputDelta=0.9545384712523379
New Minimum: -26.516464680648948 > -29.68398246791131
END: th(7818012.6031877)=-29.68398246791131; dx=-4.0184407524814605E-7 evalInputDelta=4.1220562585147
Fitness changed from -25.56192620939661 to -29.68398246791131
Iteration 1 complete. Error: -29.68398246791131 Total: 8.4121; Orientation: 0.0080; Line Search: 6.6662
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/3965fc79-95a1-480b-99a1-555adf0391d6.jpg)
Adding measurement 731b4bfd to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-29.68398246791131;dx=-9.609782917923272E-7
New Minimum: -29.68398246791131 > -34.9923390404614
END: th(1.684339755941405E7)=-34.9923390404614; dx=-2.2009325352140095E-7 evalInputDelta=5.3083565725500925
Fitness changed from -29.68398246791131 to -34.9923390404614
Iteration 2 complete. Error: -34.9923390404614 Total: 1.7518; Orientation: 0.0072; Line Search: 1.1194
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/eecd9af6-0be0-49db-a585-c1151b471b43.jpg)
Adding measurement 20226985 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-34.9923390404614;dx=-6.365919200434317E-7
New Minimum: -34.9923390404614 > -44.80544840212465
END: th(3.6288E7)=-44.80544840212465; dx=-7.218666370512121E-8 evalInputDelta=9.813109361663244
Fitness changed from -34.9923390404614 to -44.80544840212465
Iteration 3 complete. Error: -44.80544840212465 Total: 1.9840; Orientation: 0.0080; Line Search: 1.3578
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/c431fdac-5e8c-42af-9083-bb961f5de1b8.jpg)
Adding measurement 33af51bf to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.250e+04, gradient 5.862e-04, dot -0.329; [105fa98f-459f-463c-bd64-38b42265fc09 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -44.80544840212465, -34.9923390404614, -29.68398246791131, -25.56192620939661
LBFGS Accumulation History: 3 points
Removed measurement 33af51bf to history. Total: 3
th(0)=-44.80544840212465;dx=-3.398037008262408E-7
New Minimum: -44.80544840212465 > -53.82215545528172
END: th(7.8180126031877E7)=-53.82215545528172; dx=-1.3431498350018306E-8 evalInputDelta=9.01670705315707
Fitness changed from -44.80544840212465 to -53.82215545528172
Iteration 4 complete. Error: -53.82215545528172 Total: 1.9171; Orientation: 0.1377; Line Search: 1.1696
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/3ba9fecd-530e-4a19-998c-64a9dd050d2b.jpg)
Adding measurement 12bae2b8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.506e+04, gradient 4.355e-04, dot -0.262; [105fa98f-459f-463c-bd64-38b42265fc09 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -53.82215545528172, -34.9923390404614, -29.68398246791131, -25.56192620939661
LBFGS Accumulation History: 3 points
Removed measurement 12bae2b8 to history. Total: 3
th(0)=-53.82215545528172;dx=-1.8809502116928974E-7
New Minimum: -53.82215545528172 > -61.12196087741252
WOLF (strong): th(1.6843397559414053E8)=-61.12196087741252; dx=1.0365095919925307E-9 evalInputDelta=7.299805422130802
New Minimum: -61.12196087741252 > -64.01031944947916
END: th(8.421698779707026E7)=-64.01031944947916; dx=-1.6423469310688054E-8 evalInputDelta=10.188163994197438
Fitness changed from -53.82215545528172 to -64.01031944947916
Iteration 5 complete. Error: -64.01031944947916 Total: 2.4412; Orientation: 0.1389; Line Search: 1.6773
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/9511e343-f10f-4ceb-99ec-61b43bc381c6.jpg)
Adding measurement 67bb80de to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.151e+04, gradient 3.158e-04, dot -0.245; [105fa98f-459f-463c-bd64-38b42265fc09 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -64.01031944947916, -34.9923390404614, -29.68398246791131, -25.56192620939661
LBFGS Accumulation History: 3 points
Removed measurement 67bb80de to history. Total: 3
th(0)=-64.01031944947916;dx=-9.842952607201283E-8
New Minimum: -64.01031944947916 > -68.03501344072046
WOLF (strong): th(1.8144000000000003E8)=-68.03501344072046; dx=3.625410014403953E-10 evalInputDelta=4.024693991241307
New Minimum: -68.03501344072046 > -70.09571921457311
END: th(9.072000000000001E7)=-70.09571921457311; dx=-1.2687955682005956E-8 evalInputDelta=6.085399765093953
Fitness changed from -64.01031944947916 to -70.09571921457311
Iteration 6 complete. Error: -70.09571921457311 Total: 2.4491; Orientation: 0.1358; Line Search: 1.6958
Adding measurement fc79417 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.115e+04, gradient 2.454e-04, dot -0.237; [105fa98f-459f-463c-bd64-38b42265fc09 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -70.09571921457311, -34.9923390404614, -29.68398246791131, -25.56192620939661
LBFGS Accumulation History: 3 points
Removed measurement fc79417 to history. Total: 3
th(0)=-70.09571921457311;dx=-5.9587562757582824E-8
New Minimum: -70.09571921457311 > -70.51968468193084
WOLF (strong): th(1.9545031507969254E8)=-70.51968468193084; dx=7.452096958586961E-10 evalInputDelta=0.423965467357732
New Minimum: -70.51968468193084 > -73.11785398900709
END: th(9.772515753984627E7)=-73.11785398900709; dx=-8.738114102332329E-9 evalInputDelta=3.0221347744339795
Fitness changed from -70.09571921457311 to -73.11785398900709
Iteration 7 complete. Error: -73.11785398900709 Total: 2.7036; Orientation: 0.1357; Line Search: 2.0083
Adding measurement 4ab99824 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.033e+04, gradient 2.067e-04, dot -0.229; [105fa98f-459f-463c-bd64-38b42265fc09 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -73.11785398900709, -34.9923390404614, -29.68398246791131, -25.56192620939661
LBFGS Accumulation History: 3 points
Removed measurement 4ab99824 to history. Total: 3
th(0)=-73.11785398900709;dx=-4.2128300176506666E-8
New Minimum: -73.11785398900709 > -73.47040592000049
WOLF (strong): th(2.1054246949267572E8)=-73.47040592000049; dx=4.992312808250859E-10 evalInputDelta=0.35255193099339976
New Minimum: -73.47040592000049 > -75.19194880360202
END: th(1.0527123474633786E8)=-75.19194880360202; dx=-6.1816640423531114E-9 evalInputDelta=2.074094814594929
Fitness changed from -73.11785398900709 to -75.19194880360202
Iteration 8 complete. Error: -75.19194880360202 Total: 2.4462; Orientation: 0.1375; Line Search: 1.7266
Adding measurement 74976a4e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.592e+03, gradient 1.801e-04, dot -0.224; [105fa98f-459f-463c-bd64-38b42265fc09 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -75.19194880360202, -34.9923390404614, -29.68398246791131, -25.56192620939661
LBFGS Accumulation History: 3 points
Removed measurement 74976a4e to history. Total: 3
th(0)=-75.19194880360202;dx=-3.196366714159804E-8
New Minimum: -75.19194880360202 > -75.61857786786112
WOLF (strong): th(2.268000000000001E8)=-75.61857786786112; dx=4.830011336360668E-10 evalInputDelta=0.4266290642591031
New Minimum: -75.61857786786112 > -77.0866193696315
END: th(1.1340000000000004E8)=-77.0866193696315; dx=-4.85780333589412E-9 evalInputDelta=1.8946705660294896
Fitness changed from -75.19194880360202 to -77.0866193696315
Iteration 9 complete. Error: -77.0866193696315 Total: 2.4060; Orientation: 0.1404; Line Search: 1.7046
Adding measurement 6556b919 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.993e+03, gradient 1.588e-04, dot -0.219; [105fa98f-459f-463c-bd64-38b42265fc09 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -77.0866193696315, -34.9923390404614, -29.68398246791131, -25.56192620939661
LBFGS Accumulation History: 3 points
Removed measurement 6556b919 to history. Total: 3
th(0)=-77.0866193696315;dx=-2.4617501182775766E-8
Armijo: th(2.4431289384961572E8)=-76.50069587507464; dx=9.555281929074922E-10 evalInputDelta=-0.5859234945568659
New Minimum: -77.0866193696315 > -78.09233490093884
END: th(1.2215644692480786E8)=-78.09233490093884; dx=-3.2364782699868527E-9 evalInputDelta=1.005715531307331
Fitness changed from -77.0866193696315 to -78.09233490093884
Iteration 10 complete. Error: -78.09233490093884 Total: 2.3687; Orientation: 0.1358; Line Search: 1.6850
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/95712098-1683-418f-9dc9-6164764647d5.jpg)
Adding measurement 3d066b70 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.030e+03, gradient 1.461e-04, dot -0.216; [105fa98f-459f-463c-bd64-38b42265fc09 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -78.09233490093884, -34.9923390404614, -29.68398246791131, -25.56192620939661
LBFGS Accumulation History: 3 points
Removed measurement 3d066b70 to history. Total: 3
th(0)=-78.09233490093884;dx=-2.1032138238996974E-8
Armijo: th(2.631780868658447E8)=-76.83898222259958; dx=8.895390396348577E-10 evalInputDelta=-1.2533526783392546
New Minimum: -78.09233490093884 > -78.57061692915745
END: th(1.3158904343292235E8)=-78.57061692915745; dx=-2.3483221609204536E-9 evalInputDelta=0.4782820282186151
Fitness changed from -78.09233490093884 to -78.57061692915745
Iteration 11 complete. Error: -78.57061692915745 Total: 2.6860; Orientation: 0.1375; Line Search: 1.9420
Adding measurement 5a2d6995 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.186e+03, gradient 1.272e-04, dot -0.212; [105fa98f-459f-463c-bd64-38b42265fc09 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -78.57061692915745, -34.9923390404614, -29.68398246791131, -25.56192620939661
LBFGS Accumulation History: 3 points
Removed measurement 5a2d6995 to history. Total: 3
th(0)=-78.57061692915745;dx=-1.582431265879496E-8
Armijo: th(2.835000000000002E8)=-78.49888528862776; dx=8.037541332319334E-10 evalInputDelta=-0.07173164052969128
New Minimum: -78.57061692915745 > -79.5567660896046
END: th(1.417500000000001E8)=-79.5567660896046; dx=-1.5181378816851484E-9 evalInputDelta=0.9861491604471411
Fitness changed from -78.57061692915745 to -79.5567660896046
Iteration 12 complete. Error: -79.5567660896046 Total: 2.3699; Orientation: 0.1342; Line Search: 1.6775
Adding measurement 168f5617 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.400e+03, gradient 1.153e-04, dot -0.206; [105fa98f-459f-463c-bd64-38b42265fc09 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -79.5567660896046, -34.9923390404614, -29.68398246791131, -25.56192620939661
LBFGS Accumulation History: 3 points
Removed measurement 168f5617 to history. Total: 3
th(0)=-79.5567660896046;dx=-1.3017074239575253E-8
Armijo: th(3.053911173120197E8)=-78.50746714612669; dx=8.687297247570577E-10 evalInputDelta=-1.0492989434779076
New Minimum: -79.5567660896046 > -79.8876216688064
END: th(1.5269555865600985E8)=-79.8876216688064; dx=-1.102641891467E-9 evalInputDelta=0.33085557920180975
Fitness changed from -79.5567660896046 to -79.8876216688064
Iteration 13 complete. Error: -79.8876216688064 Total: 2.3954; Orientation: 0.1354; Line Search: 1.6965
Adding measurement 3170060d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.103e+03, gradient 1.066e-04, dot -0.202; [105fa98f-459f-463c-bd64-38b42265fc09 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -79.8876216688064, -34.9923390404614, -29.68398246791131, -25.56192620939661
LBFGS Accumulation History: 3 points
Removed measurement 3170060d to history. Total: 3
th(0)=-79.8876216688064;dx=-1.1093968947914632E-8
Armijo: th(3.289726085823059E8)=-78.74795874575392; dx=8.894779289590544E-10 evalInputDelta=-1.1396629230524837
New Minimum: -79.8876216688064 > -80.12160292902468
END: th(1.6448630429115295E8)=-80.12160292902468; dx=-5.88337496612094E-10 evalInputDelta=0.2339812602182718
Fitness changed from -79.8876216688064 to -80.12160292902468
Iteration 14 complete. Error: -80.12160292902468 Total: 2.3846; Orientation: 0.1333; Line Search: 1.6984
Adding measurement 172b631e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.258e+03, gradient 9.724e-05, dot -0.196; [105fa98f-459f-463c-bd64-38b42265fc09 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -80.12160292902468, -34.9923390404614, -29.68398246791131, -25.56192620939661
LBFGS Accumulation History: 3 points
Removed measurement 172b631e to history. Total: 3
th(0)=-80.12160292902468;dx=-9.168382223252769E-9
Armijo: th(3.5437500000000024E8)=-79.67494459408337; dx=8.019759538052833E-10 evalInputDelta=-0.44665833494130425
New Minimum: -80.12160292902468 > -80.57035594749468
END: th(1.7718750000000012E8)=-80.57035594749468; dx=-3.9136343823237924E-10 evalInputDelta=0.4487530184700006
Fitness changed from -80.12160292902468 to -80.57035594749468
Iteration 15 complete. Error: -80.57035594749468 Total: 2.6466; Orientation: 0.1347; Line Search: 1.9597
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/f734fe83-4e1f-4241-b98e-a31c378a2092.jpg)
Final threshold in iteration 16: -80.57035594749468 (> -Infinity) after 41.424s (< 5400.000s)

Returns

    -80.57035594749468