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 87.46 seconds (2.541 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: 3172813527113
Reset training subject: 3173283092515
Adding measurement 12650578 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-3.5701032113935365;dx=-7.65513245465191E-4
New Minimum: -3.5701032113935365 > -3.5701601091913555
WOLFE (weak): th(2.154434690031884)=-3.5701601091913555; dx=-7.653187086249611E-4 evalInputDelta=5.689779781903326E-5
New Minimum: -3.5701601091913555 > -3.570218742358251
WOLFE (weak): th(4.308869380063768)=-3.570218742358251; dx=-7.653233066201818E-4 evalInputDelta=1.155309647145053E-4
New Minimum: -3.570218742358251 > -3.570464083001728
WOLFE (weak): th(12.926608140191302)=-3.570464083001728; dx=-7.65377678942767E-4 evalInputDelta=3.608716081915375E-4
New Minimum: -3.570464083001728 > -3.5715786548142003
WOLFE (weak): th(51.70643256076521)=-3.5715786548142003; dx=-7.639539554752993E-4 evalInputDelta=0.0014754434206638578
New Minimum: -3.5715786548142003 > -3.5773969017757135
WOLFE (weak): th(258.53216280382605)=-3.5773969017757135; dx=-7.588712597797162E-4 evalInputDelta=0.007293690382176976
New Minimum: -3.5773969017757135 > -3.614727988449609
WOLFE (weak): th(1551.1929768229563)=-3.614727988449609; dx=-7.262925348241833E-4 evalInputDelta=0.044624777056072595
New Minimum: -3.614727988449609 > -3.9112115706801847
END: th(10858.350837760694)=-3.9112115706801847; dx=-5.364456005167606E-4 evalInputDelta=0.3411083592866482
Fitness changed from -3.5701032113935365 to -3.9112115706801847
Iteration 1 complete. Error: -3.9112115706801847 Total: 5.5796; Orientation: 0.0169; Line Search: 4.1673
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/3a6d0b54-7dc4-464d-98eb-ea907910c90a.jpg)
Adding measurement 6cbf9799 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-3.9112115706801847;dx=-7.723433426348105E-4
New Minimum: -3.9112115706801847 > -4.411027415133085
END: th(23393.607721408407)=-4.411027415133085; dx=-3.6760513499826204E-4 evalInputDelta=0.4998158444529004
Fitness changed from -3.9112115706801847 to -4.411027415133085
Iteration 2 complete. Error: -4.411027415133085 Total: 1.5377; Orientation: 0.0168; Line Search: 1.0221
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/54643df7-52ae-43db-8d51-3043f532c607.jpg)
Adding measurement 7a8cd412 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-4.411027415133085;dx=-7.519391035270117E-4
New Minimum: -4.411027415133085 > -4.957739572743064
END: th(50400.00000000001)=-4.957739572743064; dx=-1.9881082180177399E-4 evalInputDelta=0.5467121576099787
Fitness changed from -4.411027415133085 to -4.957739572743064
Iteration 3 complete. Error: -4.957739572743064 Total: 1.5332; Orientation: 0.0160; Line Search: 1.0388
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/4829fc95-21a2-4ded-883f-133e070d1cd1.jpg)
Adding measurement 5fba5561 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.156e+03, gradient 2.883e-02, dot -0.258; [104a1940-565e-4bb9-a295-74fb89e995e7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -4.957739572743064, -4.411027415133085, -3.9112115706801847, -3.5701032113935365
LBFGS Accumulation History: 3 points
Removed measurement 5fba5561 to history. Total: 3
th(0)=-4.957739572743064;dx=-8.312402125107231E-4
New Minimum: -4.957739572743064 > -5.180195825181848
END: th(108583.50837760697)=-5.180195825181848; dx=-6.919224943478715E-5 evalInputDelta=0.22245625243878386
Fitness changed from -4.957739572743064 to -5.180195825181848
Iteration 4 complete. Error: -5.180195825181848 Total: 1.9875; Orientation: 0.4262; Line Search: 1.0757
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/bf4e0e92-c111-4b19-ba26-560b577760b7.jpg)
Adding measurement 4a27100 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.356e+03, gradient 2.414e-02, dot -0.153; [104a1940-565e-4bb9-a295-74fb89e995e7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.180195825181848, -4.411027415133085, -3.9112115706801847, -3.5701032113935365
LBFGS Accumulation History: 3 points
Removed measurement 4a27100 to history. Total: 3
th(0)=-5.180195825181848;dx=-5.824594006903156E-4
Armijo: th(233936.07721408413)=-4.248230060705475; dx=-2.7365285881454678E-5 evalInputDelta=-0.9319657644763728
New Minimum: -5.180195825181848 > -5.624724487339063
END: th(116968.03860704206)=-5.624724487339063; dx=-8.67688133446803E-5 evalInputDelta=0.4445286621572153
Fitness changed from -5.180195825181848 to -5.624724487339063
Iteration 5 complete. Error: -5.624724487339063 Total: 2.5886; Orientation: 0.4433; Line Search: 1.6469
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/11a0ddea-d00d-4c25-90dd-d743b267e160.jpg)
Adding measurement 25b84db9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.232e+03, gradient 2.608e-02, dot -0.153; [104a1940-565e-4bb9-a295-74fb89e995e7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.624724487339063, -4.411027415133085, -3.9112115706801847, -3.5701032113935365
LBFGS Accumulation History: 3 points
Removed measurement 25b84db9 to history. Total: 3
th(0)=-5.624724487339063;dx=-6.802215253703034E-4
New Minimum: -5.624724487339063 > -6.752462997363386
END: th(252000.0000000001)=-6.752462997363386; dx=-2.8706414517677787E-5 evalInputDelta=1.1277385100243231
Fitness changed from -5.624724487339063 to -6.752462997363386
Iteration 6 complete. Error: -6.752462997363386 Total: 1.9774; Orientation: 0.4222; Line Search: 1.0231
Adding measurement 2eae0f15 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.471e+03, gradient 2.430e-02, dot -0.103; [104a1940-565e-4bb9-a295-74fb89e995e7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.752462997363386, -4.411027415133085, -3.9112115706801847, -3.5701032113935365
LBFGS Accumulation History: 3 points
Removed measurement 2eae0f15 to history. Total: 3
th(0)=-6.752462997363386;dx=-5.901932564326736E-4
Armijo: th(542917.5418880349)=-5.699821121353694; dx=-1.217935368713533E-5 evalInputDelta=-1.0526418760096918
Armijo: th(271458.77094401745)=-6.3932276418234775; dx=-4.795663781715693E-5 evalInputDelta=-0.3592353555399086
New Minimum: -6.752462997363386 > -7.596968608422277
END: th(90486.25698133915)=-7.596968608422277; dx=-2.1203959932359422E-4 evalInputDelta=0.8445056110588913
Fitness changed from -6.752462997363386 to -7.596968608422277
Iteration 7 complete. Error: -7.596968608422277 Total: 3.5930; Orientation: 0.4146; Line Search: 2.6995
Adding measurement 2cf7040a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.820e+03, gradient 2.536e-02, dot -0.130; [104a1940-565e-4bb9-a295-74fb89e995e7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.596968608422277, -4.411027415133085, -3.9112115706801847, -3.5701032113935365
LBFGS Accumulation History: 3 points
Removed measurement 2cf7040a to history. Total: 3
th(0)=-7.596968608422277;dx=-6.430142494997935E-4
New Minimum: -7.596968608422277 > -8.074161110401423
END: th(194946.7310117368)=-8.074161110401423; dx=-9.783745772526613E-5 evalInputDelta=0.47719250197914587
Fitness changed from -7.596968608422277 to -8.074161110401423
Iteration 8 complete. Error: -8.074161110401423 Total: 1.9264; Orientation: 0.4345; Line Search: 1.0196
Adding measurement 43dafc3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.060e+04, gradient 2.329e-02, dot -0.125; [104a1940-565e-4bb9-a295-74fb89e995e7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -8.074161110401423, -4.411027415133085, -3.9112115706801847, -3.5701032113935365
LBFGS Accumulation History: 3 points
Removed measurement 43dafc3 to history. Total: 3
th(0)=-8.074161110401423;dx=-5.424371773467957E-4
New Minimum: -8.074161110401423 > -9.92022124197571
END: th(420000.0000000002)=-9.92022124197571; dx=-2.649200931670677E-5 evalInputDelta=1.846060131574287
Fitness changed from -8.074161110401423 to -9.92022124197571
Iteration 9 complete. Error: -9.92022124197571 Total: 1.9131; Orientation: 0.4173; Line Search: 1.0504
Adding measurement e52903d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.975e

...skipping 9519 bytes...

6446 Total: 6.9912; Orientation: 1.0662; Line Search: 5.4568
Adding measurement 63030d9b to history. Total: 3
Accepted: LBFGS Orientation magnitude: 3.881e+04, gradient 1.933e-02, dot 0.181; [104a1940-565e-4bb9-a295-74fb89e995e7 = 1.000/1.000e+00]
th(0)=-16.638277416566446;dx=-135.89977904765442
Armijo: th(81018.5185185186)=-7.028441550664238; dx=4.830541817819756E-5 evalInputDelta=-9.609835865902209
Armijo: th(40509.2592592593)=-7.022352226008947; dx=9.645334751655308E-5 evalInputDelta=-9.615925190557498
Armijo: th(13503.0864197531)=-7.015785402363139; dx=2.813993334532591E-4 evalInputDelta=-9.622492014203306
Armijo: th(3375.771604938275)=-7.008471403753912; dx=0.0011240835727901787 evalInputDelta=-9.629806012812534
Armijo: th(675.154320987655)=-7.0053072292527405; dx=0.005674534522123131 evalInputDelta=-9.632970187313706
Armijo: th(112.52572016460915)=-7.228973943100053; dx=0.036466283000570525 evalInputDelta=-9.409303473466393
Armijo: th(16.075102880658452)=-7.553817683170291; dx=0.223457972740624 evalInputDelta=-9.084459733396155
Armijo: th(2.0093878600823065)=-11.476836386282589; dx=-1.2271223562238505 evalInputDelta=-5.161441030283857
Armijo: th(0.22326531778692293)=-16.24318610897207; dx=-54.16157256521272 evalInputDelta=-0.3950913075943774
Armijo: th(0.022326531778692295)=-16.637573076943195; dx=-92.45894301407097 evalInputDelta=-7.043396232511157E-4
Armijo: th(0.002029684707153845)=-16.6358918958354; dx=-98.11796256261434 evalInputDelta=-0.0023855207310461424
Armijo: th(1.6914039226282042E-4)=-16.638076572759715; dx=-99.51815031837684 evalInputDelta=-2.0084380673068836E-4
Armijo: th(1.301079940483234E-5)=-16.63826366021867; dx=-99.70353229559237 evalInputDelta=-1.3756347776450184E-5
New Minimum: -16.638277416566446 > -16.638282002013177
END: th(9.293428146308814E-7)=-16.638282002013177; dx=-99.7031774557696 evalInputDelta=4.5854467316530645E-6
Fitness changed from -16.638277416566446 to -16.638282002013177
Iteration 18 complete. Error: -16.638282002013177 Total: 8.8098; Orientation: 0.4909; Line Search: 7.8452
Adding measurement 75b6a4ff to history. Total: 4
Rejected: LBFGS Orientation magnitude: 2.168e+07, gradient 1.935e-02, dot -0.164; [104a1940-565e-4bb9-a295-74fb89e995e7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -16.638282002013177, -16.638277416566446, -4.411027415133085, -3.9112115706801847, -3.5701032113935365
Rejected: LBFGS Orientation magnitude: 4.848e+07, gradient 1.935e-02, dot -0.165; [104a1940-565e-4bb9-a295-74fb89e995e7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -16.638282002013177, -16.638277416566446, -4.411027415133085, -3.9112115706801847
LBFGS Accumulation History: 3 points
Removed measurement 75b6a4ff to history. Total: 4
Removed measurement 63030d9b to history. Total: 3
th(0)=-16.638282002013177;dx=-3.7338778272054895E-4
Armijo: th(2.0022083987726413E-6)=-16.638281084923932; dx=-3.4734352273685197E-4 evalInputDelta=-9.170892454335444E-7
Armijo: th(1.0011041993863206E-6)=-16.638281084923932; dx=-3.473334741960854E-4 evalInputDelta=-9.170892454335444E-7
WOLFE (weak): th(3.337013997954402E-7)=-16.638282002013177; dx=-3.471983344601223E-4 evalInputDelta=0.0
WOLFE (weak): th(6.674027995908804E-7)=-16.638282002013177; dx=-3.4751634897913517E-4 evalInputDelta=0.0
Armijo: th(8.342534994886006E-7)=-16.638281084923932; dx=-3.4659671918856126E-4 evalInputDelta=-9.170892454335444E-7
WOLFE (weak): th(7.508281495397404E-7)=-16.638282002013177; dx=-3.470518742247749E-4 evalInputDelta=0.0
WOLFE (weak): th(7.925408245141705E-7)=-16.638282002013177; dx=-3.4689798293847723E-4 evalInputDelta=0.0
Armijo: th(8.133971620013855E-7)=-16.638281084923932; dx=-3.470184642959643E-4 evalInputDelta=-9.170892454335444E-7
Armijo: th(8.02968993257778E-7)=-16.638281084923932; dx=-3.477663109639601E-4 evalInputDelta=-9.170892454335444E-7
WOLFE (weak): th(7.977549088859743E-7)=-16.638282002013177; dx=-3.472036436067328E-4 evalInputDelta=0.0
WOLFE (weak): th(8.003619510718762E-7)=-16.638282002013177; dx=-3.4694919369243095E-4 evalInputDelta=0.0
WOLFE (weak): th(8.016654721648271E-7)=-16.638282002013177; dx=-3.47064399519074E-4 evalInputDelta=0.0
Armijo: th(8.023172327113026E-7)=-16.638281084923932; dx=-3.4739376763356255E-4 evalInputDelta=-9.170892454335444E-7
Armijo: th(8.019913524380648E-7)=-16.638281084923932; dx=-3.4654129304673343E-4 evalInputDelta=-9.170892454335444E-7
Armijo: th(8.018284123014459E-7)=-16.638281084923932; dx=-3.470693217388043E-4 evalInputDelta=-9.170892454335444E-7
WOLFE (weak): th(8.017469422331365E-7)=-16.638282002013177; dx=-3.4759837985179587E-4 evalInputDelta=0.0
Armijo: th(8.017876772672912E-7)=-16.638281084923932; dx=-3.472899541037104E-4 evalInputDelta=-9.170892454335444E-7
WOLFE (weak): th(8.017673097502139E-7)=-16.638282002013177; dx=-3.4733953324651124E-4 evalInputDelta=0.0
Armijo: th(8.017774935087525E-7)=-16.638281084923932; dx=-3.47066100461533E-4 evalInputDelta=-9.170892454335444E-7
Armijo: th(8.017724016294832E-7)=-16.638281084923932; dx=-3.469895373097391E-4 evalInputDelta=-9.170892454335444E-7
mu ~= nu (8.017673097502139E-7): th(0.0)=-16.638282002013177
Fitness changed from -16.638282002013177 to -16.638282002013177
Static Iteration Total: 12.8654; Orientation: 0.9211; Line Search: 11.4870
Iteration 19 failed. Error: -16.638282002013177
Previous Error: 0.0 -> -16.638282002013177
Retrying iteration 19
Reset training subject: 3246249305493
Adding measurement 15fefd09 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-16.638282002013177;dx=-3.732758718293073E-4
WOLFE (weak): th(1.727360790520067E-6)=-16.638282002013177; dx=-3.477305883985871E-4 evalInputDelta=0.0
WOLFE (weak): th(3.454721581040134E-6)=-16.638282002013177; dx=-3.4741527913178876E-4 evalInputDelta=0.0
Armijo: th(1.0364164743120402E-5)=-16.638280167834637; dx=-3.466062182171458E-4 evalInputDelta=-1.8341785406050803E-6
Armijo: th(6.909443162080268E-6)=-16.638280167834637; dx=-3.4664473680232343E-4 evalInputDelta=-1.8341785406050803E-6
WOLFE (weak): th(5.182082371560201E-6)=-16.638282002013177; dx=-3.4765547508138E-4 evalInputDelta=0.0
Armijo: th(6.045762766820235E-6)=-16.638280167834637; dx=-3.471484190519183E-4 evalInputDelta=-1.8341785406050803E-6
Armijo: th(5.613922569190218E-6)=-16.638281084923932; dx=-3.469793273403099E-4 evalInputDelta=-9.170892454335444E-7
WOLFE (weak): th(5.398002470375209E-6)=-16.638282002013177; dx=-3.4750005678659354E-4 evalInputDelta=0.0
WOLFE (weak): th(5.505962519782714E-6)=-16.638282002013177; dx=-3.468927265003345E-4 evalInputDelta=0.0
WOLFE (weak): th(5.5599425444864655E-6)=-16.638282002013177; dx=-3.4762551830979223E-4 evalInputDelta=0.0
Armijo: th(5.586932556838341E-6)=-16.638281084923932; dx=-3.47764953604901E-4 evalInputDelta=-9.170892454335444E-7
Armijo: th(5.573437550662403E-6)=-16.638281084923932; dx=-3.474005560647242E-4 evalInputDelta=-9.170892454335444E-7
WOLFE (weak): th(5.5666900475744344E-6)=-16.638282002013177; dx=-3.470256873260377E-4 evalInputDelta=0.0
Armijo: th(5.570063799118419E-6)=-16.638281084923932; dx=-3.470629705733407E-4 evalInputDelta=-9.170892454335444E-7
Armijo: th(5.5683769233464265E-6)=-16.638281084923932; dx=-3.4668555751458593E-4 evalInputDelta=-9.170892454335444E-7
WOLFE (weak): th(5.567533485460431E-6)=-16.638282002013177; dx=-3.475052330414949E-4 evalInputDelta=0.0
WOLFE (weak): th(5.567955204403429E-6)=-16.638282002013177; dx=-3.4744444775343874E-4 evalInputDelta=0.0
WOLFE (weak): th(5.568166063874928E-6)=-16.638282002013177; dx=-3.4696733521731376E-4 evalInputDelta=0.0
Armijo: th(5.568271493610677E-6)=-16.638281084923932; dx=-3.4750455872712424E-4 evalInputDelta=-9.170892454335444E-7
Armijo: th(5.568218778742803E-6)=-16.638281084923932; dx=-3.4700793488428856E-4 evalInputDelta=-9.170892454335444E-7
mu ~= nu (5.568166063874928E-6): th(0.0)=-16.638282002013177
Fitness changed from -16.638282002013177 to -16.638282002013177
Static Iteration Total: 14.0254; Orientation: 0.0164; Line Search: 13.0754
Iteration 20 failed. Error: -16.638282002013177
Previous Error: 0.0 -> -16.638282002013177
Optimization terminated 20
Final threshold in iteration 20: -16.638282002013177 (> -Infinity) after 87.461s (< 3600.000s)

Returns

    -16.638282002013177