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 164.60 seconds (1.887 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: 4369655821161
Reset training subject: 4370789421812
Adding measurement 3012d45 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.0777891330410265;dx=-5.11041579089291E-6
New Minimum: -0.0777891330410265 > -0.07779992840316655
WOLFE (weak): th(2.154434690031884)=-0.07779992840316655; dx=-5.028405368486752E-6 evalInputDelta=1.079536214004806E-5
New Minimum: -0.07779992840316655 > -0.07781115016092002
WOLFE (weak): th(4.308869380063768)=-0.07781115016092002; dx=-5.128580085659575E-6 evalInputDelta=2.201711989352484E-5
New Minimum: -0.07781115016092002 > -0.07785523749509461
WOLFE (weak): th(12.926608140191302)=-0.07785523749509461; dx=-5.08982363583962E-6 evalInputDelta=6.610445406811383E-5
New Minimum: -0.07785523749509461 > -0.07805352219444918
WOLFE (weak): th(51.70643256076521)=-0.07805352219444918; dx=-5.1728208147695194E-6 evalInputDelta=2.643891534226811E-4
New Minimum: -0.07805352219444918 > -0.07911876797465318
WOLFE (weak): th(258.53216280382605)=-0.07911876797465318; dx=-4.758207737452673E-6 evalInputDelta=0.001329634933626686
New Minimum: -0.07911876797465318 > -0.08596793091119279
WOLFE (weak): th(1551.1929768229563)=-0.08596793091119279; dx=-5.173357500054992E-6 evalInputDelta=0.008178797870166288
New Minimum: -0.08596793091119279 > -0.15198130775283022
WOLFE (weak): th(10858.350837760694)=-0.15198130775283022; dx=-5.151426409380868E-6 evalInputDelta=0.07419217471180373
New Minimum: -0.15198130775283022 > -0.4462816834622291
END: th(86866.80670208555)=-0.4462816834622291; dx=-1.3529679580255889E-6 evalInputDelta=0.36849255042120255
Fitness changed from -0.0777891330410265 to -0.4462816834622291
Iteration 1 complete. Error: -0.4462816834622291 Total: 14.5387; Orientation: 0.0181; Line Search: 10.5800
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/b601eaff-ac32-486c-baa4-5cc141008417.jpg)
Adding measurement 558428a1 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.4462816834622291;dx=-4.3272087713489075E-5
New Minimum: -0.4462816834622291 > -0.4758145137490206
END: th(187148.86177126726)=-0.4758145137490206; dx=-1.6858558986110675E-6 evalInputDelta=0.029532830286791545
Fitness changed from -0.4462816834622291 to -0.4758145137490206
Iteration 2 complete. Error: -0.4758145137490206 Total: 3.6288; Orientation: 0.0165; Line Search: 2.3484
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/d9aa72dc-25f0-45a2-8050-a89aaea39bec.jpg)
Adding measurement 738aef3d to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.4758145137490206;dx=-1.9055323221080618E-4
New Minimum: -0.4758145137490206 > -2.6249553131659527
END: th(403200.00000000006)=-2.6249553131659527; dx=-1.121485701984068E-6 evalInputDelta=2.149140799416932
Fitness changed from -0.4758145137490206 to -2.6249553131659527
Iteration 3 complete. Error: -2.6249553131659527 Total: 3.6929; Orientation: 0.0160; Line Search: 2.3607
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/f33a72cb-c076-40e3-b471-80b81ddec50e.jpg)
Adding measurement 52fa6a8b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.523e+02, gradient 1.384e-02, dot -0.423; [cd3f76e8-85b4-4cd7-bd2c-237c1e35b628 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.6249553131659527, -0.4758145137490206, -0.4462816834622291, -0.0777891330410265
LBFGS Accumulation History: 3 points
Removed measurement 52fa6a8b to history. Total: 3
th(0)=-2.6249553131659527;dx=-1.821415350520582E-4
New Minimum: -2.6249553131659527 > -11.12979331319032
END: th(868668.0670208557)=-11.12979331319032; dx=-5.046102811361917E-6 evalInputDelta=8.504838000024368
Fitness changed from -2.6249553131659527 to -11.12979331319032
Iteration 4 complete. Error: -11.12979331319032 Total: 4.1914; Orientation: 0.4520; Line Search: 2.4785
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/0de417ce-5601-4e59-9241-608e0e22d3dd.jpg)
Adding measurement 73f26fe6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.001e+03, gradient 2.134e-02, dot -0.033; [cd3f76e8-85b4-4cd7-bd2c-237c1e35b628 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -11.12979331319032, -0.4758145137490206, -0.4462816834622291, -0.0777891330410265
LBFGS Accumulation History: 3 points
Removed measurement 73f26fe6 to history. Total: 3
th(0)=-11.12979331319032;dx=-4.3960349164558145E-4
Armijo: th(1871488.617712673)=-5.267791936069027; dx=5.269722348166336E-7 evalInputDelta=-5.862001377121293
Armijo: th(935744.3088563365)=-7.024668414887021; dx=-8.094243403521631E-7 evalInputDelta=-4.105124898303298
New Minimum: -11.12979331319032 > -20.957144469055773
WOLF (strong): th(311914.76961877884)=-20.957144469055773; dx=1.1433594741998196E-5 evalInputDelta=9.827351155865454
New Minimum: -20.957144469055773 > -32.80015950978269
END: th(77978.69240469471)=-32.80015950978269; dx=-1.188115207788929E-4 evalInputDelta=21.67036619659237
Fitness changed from -11.12979331319032 to -32.80015950978269
Iteration 5 complete. Error: -32.80015950978269 Total: 7.6701; Orientation: 0.4861; Line Search: 5.9242
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/2de62c7b-1c53-40e7-8d88-d93d3ae1ef18.jpg)
Adding measurement 315025ae to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.763e+04, gradient 3.149e-02, dot -0.037; [cd3f76e8-85b4-4cd7-bd2c-237c1e35b628 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -32.80015950978269, -0.4758145137490206, -0.4462816834622291, -0.0777891330410265
LBFGS Accumulation History: 3 points
Removed measurement 315025ae to history. Total: 3
th(0)=-32.80015950978269;dx=-9.609551099992609E-4
New Minimum: -32.80015950978269 > -42.62495847459488
WOLF (strong): th(168000.00000000006)=-42.62495847459488; dx=9.946193409277432E-6 evalInputDelta=9.824798964812189
New Minimum: -42.62495847459488 > -49.114979894121916
WOLF (strong): th(84000.00000000003)=-49.114979894121916; dx=4.713449491534558E-6 evalInputDelta=16.314820384339228
END: th(28000.00000000001)=-48.50556206025501; dx=-3.066182751663277E-4 evalInputDelta=15.705402550472321
Fitness changed from -32.80015950978269 to -49.114979894121916
Iteration 6 complete. Error: -49.114979894121916 Total: 6.4778; Orientation: 0.4407; Line Search: 4.7741
Adding measurement 308200fa to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.859e+03, gradient 3.057e-02, dot -0.036; [cd3f76e8-85b4-4cd7-bd2c-237c1e35b628 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -49.114979894121916, -0.4758145137490206, -0.4462816834622291, -0.0777891330410265
LBFGS Accumulation History: 3 points
Removed measurement 308200fa to history. Total: 3
th(0)=-49.114979894121916;dx=-9.147915985861973E-4
New Minimum: -49.114979894121916 > -68.81076859765483
END: th(60324.17132089277)=-68.81076859765483; dx=-1.6473906722205005E-5 evalInputDelta=19.695788703532912
Fitness changed from -49.114979894121916 to -68.81076859765483
Iteration 7 complete. Error: -68.81076859765483 Total: 4.4459; Orientation: 0.4627; Line Search: 2.3692
Adding measurement 69b29a84 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.662e+04, gradient 3.634e-02, dot -0.028; [cd3f76e8-85b4-4cd7-bd2c-237c1e35b628 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -68.81076859765483, -0.4758145137490206, -0.4462816834622291, -0.0777891330410265
LBFGS Accumulation History: 3 points
Removed measurement 69b29a84 to history. Total: 3
th(0)=-68.81076859765483;dx=-0.0012922651723248238
Armijo: th(129964.48734115787)=-54.8221445156688; dx=8.452890089759214E-5 evalInputDelta=-13.988624081986025
New Minimum: -68.81076859765483 > -75.2865975944175
WOLF (strong): th(64982.24367057894)=-75.2865975944175; dx=2.1332383361435484E-4 evalInputDelta=6.475828996762672
New Minimum: -75.2865975944175 > -85.74974375872793
END: th(21660.74789019298)=-85.74974375872793; dx=-3.8863623286285046E-4 evalInputDelta=16.938975161073103
Fitness changed from -68.81076859765483 to -85.74974375872793
Iteration 8 complete. Error: -85.74974375872793 Total: 6.3032; Orientation: 0.4435; Line Search: 4.7218
Adding measurement 73

...skipping 6674 bytes...

measurement 42105235 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.212e+06, gradient 3.397e-02, dot -0.049; [cd3f76e8-85b4-4cd7-bd2c-237c1e35b628 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -148.0249860137639, -0.4758145137490206, -0.4462816834622291, -0.0777891330410265
LBFGS Accumulation History: 3 points
Removed measurement 42105235 to history. Total: 3
th(0)=-148.0249860137639;dx=-0.001130296043319314
New Minimum: -148.0249860137639 > -155.5275422754761
END: th(23273.214244171602)=-155.5275422754761; dx=-2.941420144768156E-4 evalInputDelta=7.502556261712186
Fitness changed from -148.0249860137639 to -155.5275422754761
Iteration 16 complete. Error: -155.5275422754761 Total: 4.0786; Orientation: 0.4386; Line Search: 2.3666
Adding measurement 14c27687 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.331e+05, gradient 4.092e-02, dot -0.033; [cd3f76e8-85b4-4cd7-bd2c-237c1e35b628 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -155.5275422754761, -0.4758145137490206, -0.4462816834622291, -0.0777891330410265
LBFGS Accumulation History: 3 points
Removed measurement 14c27687 to history. Total: 3
th(0)=-155.5275422754761;dx=-0.0016409337720238923
Armijo: th(50140.62011618747)=-147.10853109821673; dx=1.7615403180833367E-4 evalInputDelta=-8.419011177259364
New Minimum: -155.5275422754761 > -158.72318302039247
WOLF (strong): th(25070.310058093735)=-158.72318302039247; dx=5.9667227016483584E-5 evalInputDelta=3.195640744916375
New Minimum: -158.72318302039247 > -161.3145522438227
END: th(8356.770019364578)=-161.3145522438227; dx=-5.662216464723964E-4 evalInputDelta=5.787009968346609
Fitness changed from -155.5275422754761 to -161.3145522438227
Iteration 17 complete. Error: -161.3145522438227 Total: 6.3652; Orientation: 0.4462; Line Search: 4.8021
Adding measurement 2914febe to history. Total: 3
Accepted: LBFGS Orientation magnitude: 3.400e+04, gradient 3.272e-02, dot 0.115; [cd3f76e8-85b4-4cd7-bd2c-237c1e35b628 = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-161.3145522438227;dx=-126.54682846316987
Armijo: th(18004.115226337464)=-13.937289249212379; dx=3.1084818717887924E-4 evalInputDelta=-147.37726299461033
Armijo: th(9002.057613168732)=-13.945241377619755; dx=5.359777323168482E-4 evalInputDelta=-147.36931086620294
Armijo: th(3000.685871056244)=-14.052789073251782; dx=0.0017329742807553107 evalInputDelta=-147.26176317057093
Armijo: th(750.171467764061)=-14.216664188529391; dx=0.006827233382873827 evalInputDelta=-147.0978880552933
Armijo: th(150.03429355281222)=-15.337521409545978; dx=0.03343313245054212 evalInputDelta=-145.97703083427672
Armijo: th(25.00571559213537)=-28.397325244724854; dx=0.3505446081313339 evalInputDelta=-132.91722699909786
Armijo: th(3.5722450845907674)=-78.35550682127422; dx=1.4551376508694205 evalInputDelta=-82.95904542254848
Armijo: th(0.4465306355738459)=-140.51237851386972; dx=-7.0488473654840735 evalInputDelta=-20.802173729952983
New Minimum: -161.3145522438227 > -162.0666638011192
END: th(0.04961451506376066)=-162.0666638011192; dx=-49.585700795230224 evalInputDelta=0.7521115572965016
Fitness changed from -161.3145522438227 to -162.0666638011192
Iteration 18 complete. Error: -162.0666638011192 Total: 13.4998; Orientation: 0.4315; Line Search: 11.9377
Adding measurement 7494f9fe to history. Total: 4
Accepted: LBFGS Orientation magnitude: 1.308e+04, gradient 3.230e-02, dot 0.090; [cd3f76e8-85b4-4cd7-bd2c-237c1e35b628 = 1.000/1.000e+00]
th(0)=-162.0666638011192;dx=-37.85435184226557
Armijo: th(0.10689123238247543)=-160.66195464973964; dx=-20.943360983568187 evalInputDelta=-1.4047091513795635
Armijo: th(0.053445616191237715)=-161.57285387519465; dx=-25.11428758385682 evalInputDelta=-0.49380992592455186
Armijo: th(0.017815205397079238)=-161.94577965132342; dx=-27.5491429484807 evalInputDelta=-0.12088414979578488
Armijo: th(0.0044538013492698095)=-162.03867810842263; dx=-29.353259138681192 evalInputDelta=-0.027985692696574915
Armijo: th(8.907602698539619E-4)=-162.0607946786483; dx=-30.484319613843482 evalInputDelta=-0.005869122470897992
Armijo: th(1.4846004497566032E-4)=-162.06569366309452; dx=-29.856742085087603 evalInputDelta=-9.701380246838198E-4
Armijo: th(2.120857785366576E-5)=-162.06651315894965; dx=-29.37594093968746 evalInputDelta=-1.5064216955806842E-4
Armijo: th(2.65107223170822E-6)=-162.0666336726965; dx=-29.90330468801684 evalInputDelta=-3.0128422707775826E-5
Armijo: th(2.9456358130091336E-7)=-162.0666638011192; dx=-30.165899951621757 evalInputDelta=0.0
Armijo: th(2.9456358130091334E-8)=-162.0666638011192; dx=-29.202872927880758 evalInputDelta=0.0
Armijo: th(2.677850739099212E-9)=-162.0666638011192; dx=-30.08866405121018 evalInputDelta=0.0
END: th(2.2315422825826767E-10)=-162.0666638011192; dx=-30.357254025865863 evalInputDelta=0.0
Fitness changed from -162.0666638011192 to -162.0666638011192
Static Iteration Total: 17.8238; Orientation: 0.6588; Line Search: 16.0286
Iteration 19 failed. Error: -162.0666638011192
Previous Error: 0.0 -> -162.0666638011192
Retrying iteration 19
Reset training subject: 4499065921499
Adding measurement 64b53b4c to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-162.0666638011192;dx=-0.0010280287594019908
WOLFE (weak): th(4.807712105869051E-10)=-162.0666638011192; dx=-9.629136426626712E-4 evalInputDelta=0.0
WOLFE (weak): th(9.615424211738102E-10)=-162.0666638011192; dx=-9.698175505337425E-4 evalInputDelta=0.0
WOLFE (weak): th(2.8846272635214307E-9)=-162.0666638011192; dx=-9.641527605683635E-4 evalInputDelta=0.0
WOLFE (weak): th(1.1538509054085723E-8)=-162.0666638011192; dx=-9.671450757203035E-4 evalInputDelta=0.0
WOLFE (weak): th(5.769254527042861E-8)=-162.0666638011192; dx=-9.659567853139244E-4 evalInputDelta=0.0
WOLFE (weak): th(3.4615527162257167E-7)=-162.0666638011192; dx=-9.634662866998844E-4 evalInputDelta=0.0
WOLFE (weak): th(2.423086901358002E-6)=-162.0666638011192; dx=-9.48305655425293E-4 evalInputDelta=0.0
Armijo: th(1.9384695210864015E-5)=-162.0666638011192; dx=-9.571640400447904E-4 evalInputDelta=0.0
WOLFE (weak): th(1.0903891056111008E-5)=-162.0666638011192; dx=-9.655010692678947E-4 evalInputDelta=0.0
Armijo: th(1.5144293133487511E-5)=-162.0666638011192; dx=-9.667867871015834E-4 evalInputDelta=0.0
WOLFE (weak): th(1.302409209479926E-5)=-162.0666638011192; dx=-9.670927376596603E-4 evalInputDelta=0.0
Armijo: th(1.4084192614143384E-5)=-162.0666638011192; dx=-9.546544475319983E-4 evalInputDelta=0.0
WOLFE (weak): th(1.3554142354471323E-5)=-162.0666638011192; dx=-9.634851988657062E-4 evalInputDelta=0.0
WOLFE (weak): th(1.3819167484307353E-5)=-162.0666638011192; dx=-9.603846053534044E-4 evalInputDelta=0.0
Armijo: th(1.395168004922537E-5)=-162.0666638011192; dx=-9.677147770860774E-4 evalInputDelta=0.0
Armijo: th(1.388542376676636E-5)=-162.0666638011192; dx=-9.637306444190313E-4 evalInputDelta=0.0
Armijo: th(1.3852295625536856E-5)=-162.0666638011192; dx=-9.654302086870265E-4 evalInputDelta=0.0
Armijo: th(1.3835731554922104E-5)=-162.0666638011192; dx=-9.626117724985038E-4 evalInputDelta=0.0
Armijo: th(1.382744951961473E-5)=-162.0666638011192; dx=-9.53874310257685E-4 evalInputDelta=0.0
WOLFE (weak): th(1.382330850196104E-5)=-162.0666638011192; dx=-9.44331443387182E-4 evalInputDelta=0.0
Armijo: th(1.3825379010787885E-5)=-162.0666638011192; dx=-9.656337757546951E-4 evalInputDelta=0.0
Armijo: th(1.3824343756374462E-5)=-162.0666638011192; dx=-9.400997214212559E-4 evalInputDelta=0.0
Armijo: th(1.3823826129167751E-5)=-162.0666638011192; dx=-9.639241720471596E-4 evalInputDelta=0.0
Armijo: th(1.3823567315564395E-5)=-162.0666638011192; dx=-9.658878324586296E-4 evalInputDelta=0.0
Armijo: th(1.3823437908762718E-5)=-162.0666638011192; dx=-9.664513987749534E-4 evalInputDelta=0.0
mu ~= nu (1.382330850196104E-5): th(0.0)=-162.0666638011192
Fitness changed from -162.0666638011192 to -162.0666638011192
Static Iteration Total: 35.1859; Orientation: 0.0177; Line Search: 32.9088
Iteration 20 failed. Error: -162.0666638011192
Previous Error: 0.0 -> -162.0666638011192
Optimization terminated 20
Final threshold in iteration 20: -162.0666638011192 (> -Infinity) after 164.596s (< 3600.000s)

Returns

    -162.0666638011192