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 183.99 seconds (1.800 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: 11002807103511
Reset training subject: 11004022755277
Adding measurement 1bc008ed to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.5928972431268681;dx=-7.846135674304302E-7
New Minimum: -0.5928972431268681 > -0.5928992657362706
WOLFE (weak): th(2.154434690031884)=-0.5928992657362706; dx=-7.865817707655735E-7 evalInputDelta=2.02260940251886E-6
New Minimum: -0.5928992657362706 > -0.5929011265308269
WOLFE (weak): th(4.308869380063768)=-0.5929011265308269; dx=-7.842874581384357E-7 evalInputDelta=3.883403958848675E-6
New Minimum: -0.5929011265308269 > -0.5929089741653575
WOLFE (weak): th(12.926608140191302)=-0.5929089741653575; dx=-7.865126514331297E-7 evalInputDelta=1.1731038489393164E-5
New Minimum: -0.5929089741653575 > -0.592944246786383
WOLFE (weak): th(51.70643256076521)=-0.592944246786383; dx=-7.785105888108938E-7 evalInputDelta=4.700365951493257E-5
New Minimum: -0.592944246786383 > -0.5931319006857462
WOLFE (weak): th(258.53216280382605)=-0.5931319006857462; dx=-7.832721565124939E-7 evalInputDelta=2.3465755887808193E-4
New Minimum: -0.5931319006857462 > -0.5943045520044097
WOLFE (weak): th(1551.1929768229563)=-0.5943045520044097; dx=-7.77274549200818E-7 evalInputDelta=0.001407308877541591
New Minimum: -0.5943045520044097 > -0.6026443515150715
WOLFE (weak): th(10858.350837760694)=-0.6026443515150715; dx=-7.555007871016137E-7 evalInputDelta=0.009747108388203363
New Minimum: -0.6026443515150715 > -0.6636260171413003
END: th(86866.80670208555)=-0.6636260171413003; dx=-6.300926073267898E-7 evalInputDelta=0.07072877401443223
Fitness changed from -0.5928972431268681 to -0.6636260171413003
Iteration 1 complete. Error: -0.6636260171413003 Total: 14.3000; Orientation: 0.0171; Line Search: 10.7800
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/bbf9e53b-4a63-41d3-b17a-0867aeb83d95.jpg)
Adding measurement 3813cd7 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.6636260171413003;dx=-7.301435108937492E-7
New Minimum: -0.6636260171413003 > -0.7871690627883661
END: th(187148.86177126726)=-0.7871690627883661; dx=-4.952336833093244E-7 evalInputDelta=0.12354304564706575
Fitness changed from -0.6636260171413003 to -0.7871690627883661
Iteration 2 complete. Error: -0.7871690627883661 Total: 3.6911; Orientation: 0.0183; Line Search: 2.3732
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/68a4e0bb-640a-4c56-b2b3-edc59e552cfb.jpg)
Adding measurement 11d50e7b to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.7871690627883661;dx=-7.341101565781636E-7
New Minimum: -0.7871690627883661 > -1.0090330341161937
END: th(403200.00000000006)=-1.0090330341161937; dx=-3.3995577685978446E-7 evalInputDelta=0.22186397132782765
Fitness changed from -0.7871690627883661 to -1.0090330341161937
Iteration 3 complete. Error: -1.0090330341161937 Total: 3.7122; Orientation: 0.0177; Line Search: 2.4078
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/2f6a5ce5-9b03-4f65-8731-7220b4952f45.jpg)
Adding measurement e1a1f3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.416e+03, gradient 1.164e-03, dot -0.367; [e4a752ba-bd86-44dc-95a6-70c7d491195c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.0090330341161937, -0.7871690627883661, -0.6636260171413003, -0.5928972431268681
LBFGS Accumulation History: 3 points
Removed measurement e1a1f3 to history. Total: 3
th(0)=-1.0090330341161937;dx=-1.3314201435536398E-6
New Minimum: -1.0090330341161937 > -1.3772794664383747
END: th(868668.0670208557)=-1.3772794664383747; dx=-1.547190336645608E-7 evalInputDelta=0.368246432322181
Fitness changed from -1.0090330341161937 to -1.3772794664383747
Iteration 4 complete. Error: -1.3772794664383747 Total: 4.5796; Orientation: 0.8519; Line Search: 2.4518
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/5a8c709d-2ce0-4b69-8302-d9eeb3b1c5fd.jpg)
Adding measurement 64a665d0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.684e+03, gradient 1.766e-03, dot -0.166; [e4a752ba-bd86-44dc-95a6-70c7d491195c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.3772794664383747, -0.7871690627883661, -0.6636260171413003, -0.5928972431268681
LBFGS Accumulation History: 3 points
Removed measurement 64a665d0 to history. Total: 3
th(0)=-1.3772794664383747;dx=-3.092002042164158E-6
New Minimum: -1.3772794664383747 > -1.5024427903966493
WOLF (strong): th(1871488.617712673)=-1.5024427903966493; dx=5.528456085863412E-8 evalInputDelta=0.12516332395827456
New Minimum: -1.5024427903966493 > -1.8968348259642027
END: th(935744.3088563365)=-1.8968348259642027; dx=-1.539936209268594E-8 evalInputDelta=0.519555359525828
Fitness changed from -1.3772794664383747 to -1.8968348259642027
Iteration 5 complete. Error: -1.8968348259642027 Total: 5.4142; Orientation: 0.4932; Line Search: 3.6092
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/98a76c89-d2d0-486e-a4ff-0c163f8065ce.jpg)
Adding measurement 559ccb20 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.568e+03, gradient 1.914e-03, dot -0.109; [e4a752ba-bd86-44dc-95a6-70c7d491195c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1.8968348259642027, -0.7871690627883661, -0.6636260171413003, -0.5928972431268681
LBFGS Accumulation History: 3 points
Removed measurement 559ccb20 to history. Total: 3
th(0)=-1.8968348259642027;dx=-3.583461507897989E-6
New Minimum: -1.8968348259642027 > -2.2435884788334417
WOLF (strong): th(2016000.0000000007)=-2.2435884788334417; dx=1.4413173483031985E-7 evalInputDelta=0.346753652869239
New Minimum: -2.2435884788334417 > -2.9323976744263947
END: th(1008000.0000000003)=-2.9323976744263947; dx=-8.117065980607908E-8 evalInputDelta=1.035562848462192
Fitness changed from -1.8968348259642027 to -2.9323976744263947
Iteration 6 complete. Error: -2.9323976744263947 Total: 5.3904; Orientation: 0.4743; Line Search: 3.6270
Adding measurement 39de9eb9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.619e+04, gradient 2.095e-03, dot -0.120; [e4a752ba-bd86-44dc-95a6-70c7d491195c = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.9323976744263947, -0.7871690627883661, -0.6636260171413003, -0.5928972431268681
LBFGS Accumulation History: 3 points
Removed measurement 39de9eb9 to history. Total: 3
th(0)=-2.9323976744263947;dx=-4.3183504087753135E-6
Armijo: th(2171670.1675521396)=-2.7136920655945227; dx=2.8197912843555895E-7 evalInputDelta=-0.21870560883187196
New Minimum: -2.9323976744263947 > -3.9817052322191353
WOLF (strong): th(1085835.0837760698)=-3.9817052322191353; dx=6.715026653523652E-8 evalInputDelta=1.0493075577927407
New Minimum: -3.9817052322191353 > -4.092229861890256
END: th(361945.0279253566)=-4.092229861890256; dx=-1.672925818817197E-6 evalInputDelta=1.159832187463861
Fitness changed from -2.9323976744263947 to -4.092229861890256
Iteration 7 complete. Error: -4.092229861890256 Total: 6.4496; Orientation: 0.4719; Line Search: 4.8315
Adding measurement 2ba27a48 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 7.963e+03, gradient 1.882e-03, dot 0.227; [e4a752ba-bd86-44dc-95a6-70c7d491195c = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-4.092229861890256;dx=-3.3957437287720573
Armijo: th(779786.9240469472)=-1.4237668130983767; dx=8.793079181882534E-7 evalInputDelta=-2.668463048791879
Armijo: th(389893.4620234736)=-1.4236995194409945; dx=1.7442262068239561E-6 evalInputDelta=-2.6685303424492615
Armijo: th(129964.48734115786)=-1.4236456103447055; dx=5.1850186973544815E-6 evalInputDelta=-2.6685842515455502
Armijo: th(32491.121835289465)=-1.4220872942023484; dx=2.086551355469917E-5 evalInputDelta=-2.6701425676879076
Armijo: th(6498.224367057893)=-1.4236846497191438; dx=1.03693932037044E-4 evalInputDelta=-2.6685452121711117
Armijo: th(1083.0373945096487)=-1.428724811170176; dx=6.044164341784889E-4 evalInputDelta=-2.6635050507200795
Armijo: th(154.71962778709266)=-1.4318617041070303; dx=0.004514104999504846 evalInputDelta=-2.6603681577832257
Armijo: th(19.339953473386583)=-1.6885428381417034; dx=0.05555333981684396 ev

...skipping 7041 bytes...

34; dx=-4.555416416407081E-6 evalInputDelta=0.016053311937349157
New Minimum: -7.354257702178934 > -7.448758517967878
WOLFE (weak): th(23333.333333333336)=-7.448758517967878; dx=-4.4506240399441096E-6 evalInputDelta=0.11055412772629314
New Minimum: -7.448758517967878 > -8.078679567572983
END: th(186666.6666666667)=-8.078679567572983; dx=-3.359067500425168E-6 evalInputDelta=0.7404751773313984
Fitness changed from -7.338204390241585 to -8.078679567572983
Iteration 12 complete. Error: -8.078679567572983 Total: 13.5609; Orientation: 1.0712; Line Search: 11.3438
Adding measurement b414e5c to history. Total: 3
Accepted: LBFGS Orientation magnitude: 2.050e+04, gradient 1.872e-03, dot 0.184; [e4a752ba-bd86-44dc-95a6-70c7d491195c = 1.000/1.000e+00]
th(0)=-8.078679567572983;dx=-7.012270557193894
Armijo: th(402161.14213928505)=-3.0605581429948483; dx=7.183760444516343E-6 evalInputDelta=-5.018121424578135
Armijo: th(201080.57106964252)=-3.0606539347431374; dx=1.438555035913417E-5 evalInputDelta=-5.018025632829846
Armijo: th(67026.85702321418)=-3.061306509385393; dx=4.3315220807309395E-5 evalInputDelta=-5.017373058187591
Armijo: th(16756.714255803545)=-3.0619024639652617; dx=1.7308830916539406E-4 evalInputDelta=-5.016777103607722
Armijo: th(3351.342851160709)=-3.0621536125446553; dx=8.702950507372971E-4 evalInputDelta=-5.016525955028328
Armijo: th(558.5571418601181)=-3.0819447852835435; dx=0.005222334290550186 evalInputDelta=-4.99673478228944
Armijo: th(79.7938774085883)=-3.154987269670163; dx=0.0369551341964718 evalInputDelta=-4.923692297902821
Armijo: th(9.974234676073538)=-3.7577714364182158; dx=0.3273769283603083 evalInputDelta=-4.320908131154768
Armijo: th(1.1082482973415042)=-7.69726418982975; dx=0.14364157434629365 evalInputDelta=-0.38141537774323364
New Minimum: -8.078679567572983 > -8.463116108125917
END: th(0.11082482973415042)=-8.463116108125917; dx=-3.8007512958640204 evalInputDelta=0.3844365405529331
Fitness changed from -8.078679567572983 to -8.463116108125917
Iteration 13 complete. Error: -8.463116108125917 Total: 15.0925; Orientation: 0.6073; Line Search: 13.3420
Adding measurement 7455e5dd to history. Total: 4
Accepted: LBFGS Orientation magnitude: 1.285e+04, gradient 1.891e-03, dot 0.155; [e4a752ba-bd86-44dc-95a6-70c7d491195c = 1.000/1.000e+00]
th(0)=-8.463116108125917;dx=-3.7208211209408155
New Minimum: -8.463116108125917 > -8.598437143885686
END: th(0.23876485769613065)=-8.598437143885686; dx=-1.1590183611683145 evalInputDelta=0.13532103575976961
Fitness changed from -8.463116108125917 to -8.598437143885686
Iteration 14 complete. Error: -8.598437143885686 Total: 4.3264; Orientation: 0.5881; Line Search: 2.5370
Adding measurement 216e4cff to history. Total: 5
Accepted: LBFGS Orientation magnitude: 9.699e+03, gradient 1.859e-03, dot 0.134; [e4a752ba-bd86-44dc-95a6-70c7d491195c = 1.000/1.000e+00]
th(0)=-8.598437143885686;dx=-2.3783343247352295
Armijo: th(0.5144032921810701)=-8.41152397934302; dx=-0.28937018430827066 evalInputDelta=-0.18691316454266627
Armijo: th(0.25720164609053503)=-8.537698261410227; dx=-0.47850969773918994 evalInputDelta=-0.060738882475458666
Armijo: th(0.08573388203017834)=-8.589217326337085; dx=-0.6789757653767642 evalInputDelta=-0.009219817548601128
Armijo: th(0.021433470507544586)=-8.597588783268126; dx=-0.7443684598241339 evalInputDelta=-8.483606175602176E-4
Armijo: th(0.004286694101508917)=-8.598333364644928; dx=-0.7702928382855423 evalInputDelta=-1.0377924075832823E-4
Armijo: th(7.144490169181529E-4)=-8.598421434264557; dx=-0.7802797365251313 evalInputDelta=-1.570962112928953E-5
Armijo: th(1.0206414527402185E-4)=-8.598435239690714; dx=-0.7729005790676455 evalInputDelta=-1.9041949723686002E-6
Armijo: th(1.2758018159252731E-5)=-8.598437143885686; dx=-0.7843619734516216 evalInputDelta=0.0
Armijo: th(1.4175575732503035E-6)=-8.598437143885686; dx=-0.77581202960268 evalInputDelta=0.0
Armijo: th(1.4175575732503035E-7)=-8.598437143885686; dx=-0.7651238904799414 evalInputDelta=0.0
Armijo: th(1.2886887029548214E-8)=-8.598436667836982; dx=-0.7788148176874041 evalInputDelta=-4.760487044563888E-7
Armijo: th(1.073907252462351E-9)=-8.598437143885686; dx=-0.7644169595564123 evalInputDelta=0.0
MIN ALPHA (8.260825018941161E-11): th(0.0)=-8.598437143885686
Fitness changed from -8.598437143885686 to -8.598437143885686
Static Iteration Total: 19.1507; Orientation: 0.6891; Line Search: 17.3115
Iteration 15 failed. Error: -8.598437143885686
Previous Error: 0.0 -> -8.598437143885686
Retrying iteration 15
Reset training subject: 11146315461058
Adding measurement 480d083 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-8.598437143885686;dx=-3.395718473717742E-6
WOLFE (weak): th(2.1544346900318838E-10)=-8.598437143885686; dx=-3.1210645285617037E-6 evalInputDelta=0.0
WOLFE (weak): th(4.3088693800637676E-10)=-8.598437143885686; dx=-3.091463786006207E-6 evalInputDelta=0.0
WOLFE (weak): th(1.2926608140191302E-9)=-8.598437143885686; dx=-3.0945614488901472E-6 evalInputDelta=0.0
WOLFE (weak): th(5.170643256076521E-9)=-8.598437143885686; dx=-3.120165740646112E-6 evalInputDelta=0.0
WOLFE (weak): th(2.5853216280382606E-8)=-8.598437143885686; dx=-3.118072728788922E-6 evalInputDelta=0.0
WOLFE (weak): th(1.5511929768229565E-7)=-8.598437143885686; dx=-3.1197241098051803E-6 evalInputDelta=0.0
WOLFE (weak): th(1.0858350837760695E-6)=-8.598437143885686; dx=-3.115781889604629E-6 evalInputDelta=0.0
WOLFE (weak): th(8.686680670208556E-6)=-8.598437143885686; dx=-3.1135210578289915E-6 evalInputDelta=0.0
WOLFE (weak): th(7.8180126031877E-5)=-8.598437143885686; dx=-3.1100994830597675E-6 evalInputDelta=0.0
Armijo: th(7.818012603187701E-4)=-8.598437143885686; dx=-3.07019400327084E-6 evalInputDelta=0.0
Armijo: th(4.2999069317532356E-4)=-8.598436667836982; dx=-3.0955355509477996E-6 evalInputDelta=-4.760487044563888E-7
Armijo: th(2.540854096036003E-4)=-8.598436667836982; dx=-3.111412986511829E-6 evalInputDelta=-4.760487044563888E-7
Armijo: th(1.6613276781773866E-4)=-8.598436667836982; dx=-3.078845998818367E-6 evalInputDelta=-4.760487044563888E-7
WOLFE (weak): th(1.2215644692480782E-4)=-8.598437143885686; dx=-3.0795678088090366E-6 evalInputDelta=0.0
WOLFE (weak): th(1.4414460737127325E-4)=-8.598437143885686; dx=-3.1165683658348266E-6 evalInputDelta=0.0
WOLFE (weak): th(1.5513868759450594E-4)=-8.598437143885686; dx=-3.1029256118930423E-6 evalInputDelta=0.0
Armijo: th(1.606357277061223E-4)=-8.598436667836982; dx=-3.0975528690263967E-6 evalInputDelta=-4.760487044563888E-7
WOLFE (weak): th(1.5788720765031413E-4)=-8.598437143885686; dx=-3.105759980231854E-6 evalInputDelta=0.0
WOLFE (weak): th(1.592614676782182E-4)=-8.598437143885686; dx=-3.116654268672898E-6 evalInputDelta=0.0
Armijo: th(1.5994859769217026E-4)=-8.598436667836982; dx=-3.0686616755918845E-6 evalInputDelta=-4.760487044563888E-7
WOLFE (weak): th(1.5960503268519423E-4)=-8.598437143885686; dx=-3.1201650040269067E-6 evalInputDelta=0.0
WOLFE (weak): th(1.5977681518868225E-4)=-8.598437143885686; dx=-3.0816183045690695E-6 evalInputDelta=0.0
WOLFE (weak): th(1.5986270644042627E-4)=-8.598437143885686; dx=-3.094545771720703E-6 evalInputDelta=0.0
WOLFE (weak): th(1.5990565206629826E-4)=-8.598437143885686; dx=-3.110589892178148E-6 evalInputDelta=0.0
Armijo: th(1.5992712487923426E-4)=-8.598436667836982; dx=-3.120276774636911E-6 evalInputDelta=-4.760487044563888E-7
Armijo: th(1.5991638847276626E-4)=-8.598436667836982; dx=-3.121092135553895E-6 evalInputDelta=-4.760487044563888E-7
Armijo: th(1.5991102026953225E-4)=-8.598436667836982; dx=-3.1183642370124245E-6 evalInputDelta=-4.760487044563888E-7
WOLFE (weak): th(1.5990833616791526E-4)=-8.598437143885686; dx=-3.1201431938313953E-6 evalInputDelta=0.0
WOLFE (weak): th(1.5990967821872377E-4)=-8.598437143885686; dx=-3.0866632620343704E-6 evalInputDelta=0.0
mu ~= nu (1.5990967821872377E-4): th(0.0)=-8.598437143885686
Fitness changed from -8.598437143885686 to -8.598437143885686
Static Iteration Total: 40.4782; Orientation: 0.0184; Line Search: 38.1794
Iteration 16 failed. Error: -8.598437143885686
Previous Error: 0.0 -> -8.598437143885686
Optimization terminated 16
Final threshold in iteration 16: -8.598437143885686 (> -Infinity) after 183.987s (< 3600.000s)

Returns

    -8.598437143885686