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 74.04 seconds (1.129 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: 139375454669700
Reset training subject: 139376639488499
Adding measurement 17c8dbae to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-3.5717369316597085;dx=-7.903408485292287E-6
New Minimum: -3.5717369316597085 > -3.5717528446195796
WOLFE (weak): th(2.154434690031884)=-3.5717528446195796; dx=-7.3171109913056946E-6 evalInputDelta=1.5912959871133836E-5
New Minimum: -3.5717528446195796 > -3.5717696209966268
WOLFE (weak): th(4.308869380063768)=-3.5717696209966268; dx=-7.289466432767609E-6 evalInputDelta=3.2689336918245715E-5
New Minimum: -3.5717696209966268 > -3.5718358622450057
WOLFE (weak): th(12.926608140191302)=-3.5718358622450057; dx=-7.309610573406045E-6 evalInputDelta=9.893058529719667E-5
New Minimum: -3.5718358622450057 > -3.5721310341036374
WOLFE (weak): th(51.70643256076521)=-3.5721310341036374; dx=-7.307427228272011E-6 evalInputDelta=3.941024439289009E-4
New Minimum: -3.5721310341036374 > -3.5737095983283966
WOLFE (weak): th(258.53216280382605)=-3.5737095983283966; dx=-7.300844971589025E-6 evalInputDelta=0.0019726666686881167
New Minimum: -3.5737095983283966 > -3.5835527086928063
WOLFE (weak): th(1551.1929768229563)=-3.5835527086928063; dx=-7.2930421669326885E-6 evalInputDelta=0.011815777033097774
New Minimum: -3.5835527086928063 > -3.6545779042662994
WOLFE (weak): th(10858.350837760694)=-3.6545779042662994; dx=-7.313023002777512E-6 evalInputDelta=0.08284097260659085
New Minimum: -3.6545779042662994 > -4.227484291050609
END: th(86866.80670208555)=-4.227484291050609; dx=-7.083058452815997E-6 evalInputDelta=0.6557473593909005
Fitness changed from -3.5717369316597085 to -4.227484291050609
Iteration 1 complete. Error: -4.227484291050609 Total: 11.1813; Orientation: 0.0173; Line Search: 8.0491
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/ac7de012-9bc1-4601-bbd8-d43240160787.jpg)
Adding measurement 42306a87 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-4.227484291050609;dx=-8.379594767860988E-6
New Minimum: -4.227484291050609 > -5.6555559100762505
END: th(187148.86177126726)=-5.6555559100762505; dx=-6.848523325736024E-6 evalInputDelta=1.4280716190256415
Fitness changed from -4.227484291050609 to -5.6555559100762505
Iteration 2 complete. Error: -5.6555559100762505 Total: 2.7818; Orientation: 0.0162; Line Search: 1.7920
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/fe7a1ee9-a0da-47d7-9345-474ce1c61a0b.jpg)
Adding measurement 16867cdf to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-5.6555559100762505;dx=-9.259576490813099E-6
New Minimum: -5.6555559100762505 > -8.264861840891292
END: th(403200.00000000006)=-8.264861840891292; dx=-5.191459494735557E-6 evalInputDelta=2.609305930815042
Fitness changed from -5.6555559100762505 to -8.264861840891292
Iteration 3 complete. Error: -8.264861840891292 Total: 2.7767; Orientation: 0.0156; Line Search: 1.6787
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/cd225f60-429e-47c4-bb92-d3173d544d76.jpg)
Adding measurement 4201ca80 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.625e+05, gradient 2.980e-03, dot -0.500; [f1f84735-db53-467d-8701-83f2dd70e6bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -8.264861840891292, -5.6555559100762505, -4.227484291050609, -3.5717369316597085
LBFGS Accumulation History: 3 points
Removed measurement 4201ca80 to history. Total: 3
th(0)=-8.264861840891292;dx=-8.744178193165218E-6
New Minimum: -8.264861840891292 > -11.365000417174905
END: th(868668.0670208557)=-11.365000417174905; dx=-3.1207370950198558E-6 evalInputDelta=3.1001385762836122
Fitness changed from -8.264861840891292 to -11.365000417174905
Iteration 4 complete. Error: -11.365000417174905 Total: 3.0638; Orientation: 0.3210; Line Search: 1.7959
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/502e872e-8a13-478f-aaf9-f49eb75cda90.jpg)
Adding measurement 69ef1429 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.185e+05, gradient 3.257e-03, dot -0.306; [f1f84735-db53-467d-8701-83f2dd70e6bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -11.365000417174905, -5.6555559100762505, -4.227484291050609, -3.5717369316597085
LBFGS Accumulation History: 3 points
Removed measurement 69ef1429 to history. Total: 3
th(0)=-11.365000417174905;dx=-1.0570167471187716E-5
New Minimum: -11.365000417174905 > -14.626847690367889
END: th(1871488.617712673)=-14.626847690367889; dx=-1.0291076993251506E-6 evalInputDelta=3.261847273192984
Fitness changed from -11.365000417174905 to -14.626847690367889
Iteration 5 complete. Error: -14.626847690367889 Total: 3.1645; Orientation: 0.2932; Line Search: 1.7508
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/72f2308f-2875-47d8-b00b-95f03f36307a.jpg)
Adding measurement 5b79457f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.880e+05, gradient 3.244e-03, dot -0.184; [f1f84735-db53-467d-8701-83f2dd70e6bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -14.626847690367889, -5.6555559100762505, -4.227484291050609, -3.5717369316597085
LBFGS Accumulation History: 3 points
Removed measurement 5b79457f to history. Total: 3
th(0)=-14.626847690367889;dx=-1.049089305754858E-5
New Minimum: -14.626847690367889 > -15.785653694404829
WOLF (strong): th(4032000.0000000014)=-15.785653694404829; dx=2.213916818951906E-7 evalInputDelta=1.15880600403694
New Minimum: -15.785653694404829 > -18.675438396099707
END: th(2016000.0000000007)=-18.675438396099707; dx=-4.635600140756205E-7 evalInputDelta=4.048590705731819
Fitness changed from -14.626847690367889 to -18.675438396099707
Iteration 6 complete. Error: -18.675438396099707 Total: 4.3141; Orientation: 0.2945; Line Search: 3.0920
Adding measurement 411f5b08 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.049e+05, gradient 3.390e-03, dot -0.143; [f1f84735-db53-467d-8701-83f2dd70e6bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -18.675438396099707, -5.6555559100762505, -4.227484291050609, -3.5717369316597085
LBFGS Accumulation History: 3 points
Removed measurement 411f5b08 to history. Total: 3
th(0)=-18.675438396099707;dx=-1.1337558576567043E-5
New Minimum: -18.675438396099707 > -18.856483024850622
WOLF (strong): th(4343340.335104279)=-18.856483024850622; dx=4.827143841715069E-7 evalInputDelta=0.18104462875091443
New Minimum: -18.856483024850622 > -22.431843707028634
WOLF (strong): th(2171670.1675521396)=-22.431843707028634; dx=2.3306985361330602E-7 evalInputDelta=3.756405310928926
New Minimum: -22.431843707028634 > -23.131470077578008
END: th(723890.0558507132)=-23.131470077578008; dx=-3.242470874122501E-6 evalInputDelta=4.456031681478301
Fitness changed from -18.675438396099707 to -23.131470077578008
Iteration 7 complete. Error: -23.131470077578008 Total: 4.6799; Orientation: 0.2948; Line Search: 3.5765
Adding measurement 143f0603 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.339e+05, gradient 2.924e-03, dot -0.165; [f1f84735-db53-467d-8701-83f2dd70e6bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -23.131470077578008, -5.6555559100762505, -4.227484291050609, -3.5717369316597085
LBFGS Accumulation History: 3 points
Removed measurement 143f0603 to history. Total: 3
th(0)=-23.131470077578008;dx=-8.444692012959005E-6
New Minimum: -23.131470077578008 > -26.35557204088494
END: th(1559573.8480938943)=-26.35557204088494; dx=-1.2400897562801018E-6 evalInputDelta=3.224101963306932
Fitness changed from -23.131470077578008 to -26.35557204088494
Iteration 8 complete. Error: -26.35557204088494 Total: 3.0732; Orientation: 0.3118; Line Search: 1.8218
Adding measurement 52f17199 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.908e+05, gradient 3.195e-03, dot -0.140; [f1f84735-db53-467d-8701-83f2dd70e6bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -26.35557204088494, -5.6555559100762505, -4.227484291050609, -3.5717369316597085
LBFGS Accumulation History: 3 points
Removed measurement 52f17199 to history. Total: 3
th(0)=-26.35557204088494;dx=-1.0129012921032887E-5
Armijo: th(3360000.0000000014)=-25.39730659196889; dx=2.739443460650177E-7 evalInputDelta=-0.9582654489160518
New Minimum: -26.35557204088494 > -28.416377071936935
WOLF (strong): th(1680000.0000000007)=-28.416377071936935; dx=8.46138841273388E-8 evalInputDelta=2.060805031051995
New Minimum: -28.416377071936935 > -29.188137062139866
END: th(560000.0000000002)=-29.188137062139866; dx=-3.3622078054199496E-6 evalInputDelta=2.8325650212549256
Fitness changed from -26.35557204088494 to -29.188137062139866
Iteration 9 complete. Error: -29.188137062139866 Total: 4.8163; Orientation: 0.3248; Line Search: 3.6545
Adding measurement 7e655354 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.320e+05, gradient 2.675e-03, dot -0.178; [f1f84735-db53-467d-8701-83f2dd70e6bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -29.188137062139866, -5.6555559100762505, -4.227484291050609, -3.5717369316597085
LBFGS Accumulation History: 3 points
Removed measurement 7e655354 to history. Total: 3
th(0)=-29.188137062139866;dx=-7.084807182642193E-6
New Minimum: -29.188137062139866 > -31.74553581648962
END: th(1206483.4264178555)=-31.74553581648962; dx=-2.3605889418588104E-6 evalInputDelta=2.557398754349755
Fitness changed from -29.188137062139866 to -31.74553581648962
Iteration 10 complete. Error: -31.74553581648962 Total: 3.0828; Orientation: 0.2922; Line Search: 1.7498
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/0a30d736-18ec-4947-b178-b9a5eb691d48.jpg)
Adding measurement 37e07b6f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.169e+06, gradient 2.790e-03, dot -0.186; [f1f84735-db53-467d-8701-83f2dd70e6bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -31.74553581648962, -5.6555559100762505, -4.227484291050609, -3.5717369316597085
LBFGS Accumulation History: 3 points
Removed measurement 37e07b6f to history. Total: 3
th(0)=-31.74553581648962;dx=-7.713715056213216E-6
New Minimum: -31.74553581648962 > -32.29080706359441
END: th(2599289.7468231576)=-32.29080706359441; dx=-4.4999792966213713E-7 evalInputDelta=0.545271247104786
Fitness changed from -31.74553581648962 to -32.29080706359441
Iteration 11 complete. Error: -32.29080706359441 Total: 2.9644; Orientation: 0.2917; Line Search: 1.7293
Adding measurement 1e19603c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.025e+06, gradient 3.410e-03, dot -0.134; [f1f84735-db53-467d-8701-83f2dd70e6bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -32.29080706359441, -5.6555559100762505, -4.227484291050609, -3.5717369316597085
LBFGS Accumulation History: 3 points
Removed measurement 1e19603c to history. Total: 3
th(0)=-32.29080706359441;dx=-1.156327593035923E-5
Armijo: th(5600000.000000004)=-26.615597839165172; dx=7.473369745105693E-7 evalInputDelta=-5.675209224429235
New Minimum: -32.29080706359441 > -33.619142236183755
WOLF (strong): th(2800000.000000002)=-33.619142236183755; dx=8.958714470748703E-7 evalInputDelta=1.3283351725893482
New Minimum: -33.619142236183755 > -37.1746456924109
END: th(933333.333333334)=-37.1746456924109; dx=-2.528543951687784E-6 evalInputDelta=4.883838628816491
Fitness changed from -32.29080706359441 to -37.1746456924109
Iteration 12 complete. Error: -37.1746456924109 Total: 4.8218; Orientation: 0.2935; Line Search: 3.6837
Adding measurement 5f1983e2 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 1.376e+06, gradient 2.753e-03, dot 0.176; [f1f84735-db53-467d-8701-83f2dd70e6bf = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-37.1746456924109;dx=-671.0621089651922
Armijo: th(2010805.7106964262)=-5.0793674430313915; dx=7.623232953466729E-7 evalInputDelta=-32.095278249379504
Armijo: th(1005402.8553482131)=-5.079367790001478; dx=1.5638398545062264E-6 evalInputDelta=-32.09527790240942
Armijo: th(335134.28511607106)=-5.0793743824286235; dx=4.654061568232197E-6 evalInputDelta=-32.09527130998227
Armijo: th(83783.57127901776)=-5.079508657898513; dx=1.795682495793499E-5 evalInputDelta=-32.09513703451238
Armijo: th(16756.714255803552)=-5.0780919942989815; dx=9.212502476730087E-5 evalInputDelta=-32.09655369811192
Armijo: th(2792.785709300592)=-5.076215976881107; dx=5.477717846716498E-4 evalInputDelta=-32.09842971552979
Armijo: th(398.9693870429417)=-5.107653143697759; dx=0.0038075044668451343 evalInputDelta=-32.06699254871314
Armijo: th(49.871173380367715)=-5.158010080626913; dx=0.029785506499860018 evalInputDelta=-32.01663561178398
Armijo: th(5.5412414867075235)=-5.280553131731608; dx=0.3054227637247765 evalInputDelta=-31.89409256067929
Armijo: th(0.5541241486707523)=-5.9309766337284655; dx=4.408467569715633 evalInputDelta=-31.243669058682432
Armijo: th(0.05037492260643203)=-12.85787021949661; dx=110.23236214667702 evalInputDelta=-24.316775472914287
Armijo: th(0.004197910217202669)=-34.40690274473953; dx=750.5429142993486 evalInputDelta=-2.7677429476713655
New Minimum: -37.1746456924109 > -37.28042592870013
END: th(3.229161705540515E-4)=-37.28042592870013; dx=-138.6343744153873 evalInputDelta=0.10578023628923461
Fitness changed from -37.1746456924109 to -37.28042592870013
Iteration 13 complete. Error: -37.28042592870013 Total: 13.8002; Orientation: 0.2905; Line Search: 12.6967
Adding measurement 3de53faa to history. Total: 4
Rejected: LBFGS Orientation magnitude: 2.347e+07, gradient 2.757e-03, dot -0.137; [f1f84735-db53-467d-8701-83f2dd70e6bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -37.28042592870013, -37.1746456924109, -5.6555559100762505, -4.227484291050609, -3.5717369316597085
Rejected: LBFGS Orientation magnitude: 8.868e+06, gradient 2.757e-03, dot -0.287; [f1f84735-db53-467d-8701-83f2dd70e6bf = 1.000/1.000e+00]
Orientation rejected. Popping history element from -37.28042592870013, -37.1746456924109, -5.6555559100762505, -4.227484291050609
LBFGS Accumulation History: 3 points
Removed measurement 3de53faa to history. Total: 4
Removed measurement 5f1983e2 to history. Total: 3
th(0)=-37.28042592870013;dx=-7.5399225186811595E-6
Armijo: th(6.957017998139008E-4)=-37.28042592870013; dx=-5.4715454195436416E-6 evalInputDelta=0.0
END: th(3.478508999069504E-4)=-37.28042592870013; dx=-5.475235684996146E-6 evalInputDelta=0.0
Fitness changed from -37.28042592870013 to -37.28042592870013
Static Iteration Total: 4.2975; Orientation: 0.6626; Line Search: 2.7861
Iteration 14 failed. Error: -37.28042592870013
Previous Error: 0.0 -> -37.28042592870013
Retrying iteration 14
Reset training subject: 139444273029700
Adding measurement 176009e1 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-37.28042592870013;dx=-7.569612381163133E-6
Armijo: th(7.494220457183425E-4)=-37.28042592870013; dx=-5.504775812872181E-6 evalInputDelta=0.0
Armijo: th(3.7471102285917127E-4)=-37.28042441593745; dx=-5.478546755474841E-6 evalInputDelta=-1.5127626795674587E-6
END: th(1.2490367428639042E-4)=-37.28042592870013; dx=-5.4724496967734946E-6 evalInputDelta=0.0
Fitness changed from -37.28042592870013 to -37.28042592870013
Static Iteration Total: 5.2228; Orientation: 0.0176; Line Search: 3.5544
Iteration 15 failed. Error: -37.28042592870013
Previous Error: 0.0 -> -37.28042592870013
Optimization terminated 15
Final threshold in iteration 15: -37.28042592870013 (> -Infinity) after 74.041s (< 5400.000s)

Returns

    -37.28042592870013