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 44.39 seconds (0.869 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: 214430563973900
Reset training subject: 214431174453700
Adding measurement 2a67b5a0 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-2.1418840423081904;dx=-8.7705671445479E-6
New Minimum: -2.1418840423081904 > -2.141895703570667
WOLFE (weak): th(2.154434690031884)=-2.141895703570667; dx=-8.752026695106073E-6 evalInputDelta=1.1661262476536649E-5
New Minimum: -2.141895703570667 > -2.1419071426059997
WOLFE (weak): th(4.308869380063768)=-2.1419071426059997; dx=-8.769284887423463E-6 evalInputDelta=2.310029780927536E-5
New Minimum: -2.1419071426059997 > -2.141953564013916
WOLFE (weak): th(12.926608140191302)=-2.141953564013916; dx=-8.788682954960915E-6 evalInputDelta=6.95217057256059E-5
New Minimum: -2.141953564013916 > -2.142161550362308
WOLFE (weak): th(51.70643256076521)=-2.142161550362308; dx=-8.791422731385647E-6 evalInputDelta=2.7750805411752566E-4
New Minimum: -2.142161550362308 > -2.1432725103071277
WOLFE (weak): th(258.53216280382605)=-2.1432725103071277; dx=-8.737686821435128E-6 evalInputDelta=0.001388467998937326
New Minimum: -2.1432725103071277 > -2.150230737757503
WOLFE (weak): th(1551.1929768229563)=-2.150230737757503; dx=-8.699881510655055E-6 evalInputDelta=0.008346695449312769
New Minimum: -2.150230737757503 > -2.2006712581330534
WOLFE (weak): th(10858.350837760694)=-2.2006712581330534; dx=-8.526346606442447E-6 evalInputDelta=0.058787215824863015
New Minimum: -2.2006712581330534 > -2.524870742727444
END: th(86866.80670208555)=-2.524870742727444; dx=-5.626544773232616E-6 evalInputDelta=0.38298670041925353
Fitness changed from -2.1418840423081904 to -2.524870742727444
Iteration 1 complete. Error: -2.524870742727444 Total: 7.2428; Orientation: 0.0160; Line Search: 5.4931
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/42609259-fb88-4833-82df-15afc1372b5a.jpg)
Adding measurement 1caf17de to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-2.524870742727444;dx=-9.427970699414573E-6
New Minimum: -2.524870742727444 > -3.024120097276839
END: th(187148.86177126726)=-3.024120097276839; dx=-3.4252790545339083E-6 evalInputDelta=0.499249354549395
Fitness changed from -2.524870742727444 to -3.024120097276839
Iteration 2 complete. Error: -3.024120097276839 Total: 1.8658; Orientation: 0.0166; Line Search: 1.2659
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/d425ec5b-b0ce-4607-a997-d75da3806838.jpg)
Adding measurement 2636e422 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-3.024120097276839;dx=-9.82984455658773E-6
New Minimum: -3.024120097276839 > -3.2582773987304563
END: th(403200.00000000006)=-3.2582773987304563; dx=-1.2906984238721643E-6 evalInputDelta=0.23415730145361735
Fitness changed from -3.024120097276839 to -3.2582773987304563
Iteration 3 complete. Error: -3.2582773987304563 Total: 2.0977; Orientation: 0.0182; Line Search: 1.4825
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/415ee5f0-01be-42fe-acef-3fbffb145b2c.jpg)
Adding measurement 57daea to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.733e+03, gradient 3.629e-03, dot -0.193; [fc151097-37c4-48d0-96c2-b8d22a3756c9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3.2582773987304563, -3.024120097276839, -2.524870742727444, -2.1418840423081904
LBFGS Accumulation History: 3 points
Removed measurement 57daea to history. Total: 3
th(0)=-3.2582773987304563;dx=-1.3128623548615889E-5
Armijo: th(868668.0670208557)=-1.364302298159596; dx=2.3296492239172598E-7 evalInputDelta=-1.8939751005708603
New Minimum: -3.2582773987304563 > -3.406241060485012
END: th(434334.03351042786)=-3.406241060485012; dx=-2.0114597574458025E-6 evalInputDelta=0.1479636617545559
Fitness changed from -3.2582773987304563 to -3.406241060485012
Iteration 4 complete. Error: -3.406241060485012 Total: 2.7238; Orientation: 0.3090; Line Search: 1.8318
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/d5c7b449-10c3-49aa-b463-d802d8ecb4ce.jpg)
Adding measurement 4c504f6b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.416e+03, gradient 3.685e-03, dot -0.164; [fc151097-37c4-48d0-96c2-b8d22a3756c9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3.406241060485012, -3.024120097276839, -2.524870742727444, -2.1418840423081904
LBFGS Accumulation History: 3 points
Removed measurement 4c504f6b to history. Total: 3
th(0)=-3.406241060485012;dx=-1.3552356153964232E-5
Armijo: th(935744.3088563365)=-1.0364179607955943; dx=1.901793522480678E-7 evalInputDelta=-2.369823099689418
New Minimum: -3.406241060485012 > -3.660846891090979
END: th(467872.15442816826)=-3.660846891090979; dx=-2.5820067501592326E-6 evalInputDelta=0.25460583060596687
Fitness changed from -3.406241060485012 to -3.660846891090979
Iteration 5 complete. Error: -3.660846891090979 Total: 2.7421; Orientation: 0.3055; Line Search: 1.8342
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/a7893b51-4dab-4b1a-983f-9bd26d26953b.jpg)
Adding measurement 20241133 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.171e+03, gradient 3.697e-03, dot -0.158; [fc151097-37c4-48d0-96c2-b8d22a3756c9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3.660846891090979, -3.024120097276839, -2.524870742727444, -2.1418840423081904
LBFGS Accumulation History: 3 points
Removed measurement 20241133 to history. Total: 3
th(0)=-3.660846891090979;dx=-1.364476544543461E-5
Armijo: th(1008000.0000000003)=-0.14479382195863266; dx=9.873291874477289E-8 evalInputDelta=-3.5160530691323464
Armijo: th(504000.0000000002)=-3.5610199192198904; dx=-2.713190808238879E-6 evalInputDelta=-0.09982697187108869
New Minimum: -3.660846891090979 > -4.403600407231354
END: th(168000.00000000006)=-4.403600407231354; dx=-8.788637178104185E-6 evalInputDelta=0.7427535161403753
Fitness changed from -3.660846891090979 to -4.403600407231354
Iteration 6 complete. Error: -4.403600407231354 Total: 3.3130; Orientation: 0.3070; Line Search: 2.4151
Adding measurement 5067b8d9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.851e+03, gradient 3.378e-03, dot -0.181; [fc151097-37c4-48d0-96c2-b8d22a3756c9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -4.403600407231354, -3.024120097276839, -2.524870742727444, -2.1418840423081904
LBFGS Accumulation History: 3 points
Removed measurement 5067b8d9 to history. Total: 3
th(0)=-4.403600407231354;dx=-1.136304002105306E-5
New Minimum: -4.403600407231354 > -4.640230841342669
END: th(361945.0279253566)=-4.640230841342669; dx=-4.875674338490153E-6 evalInputDelta=0.2366304341113148
Fitness changed from -4.403600407231354 to -4.640230841342669
Iteration 7 complete. Error: -4.640230841342669 Total: 2.3507; Orientation: 0.3050; Line Search: 1.4749
Adding measurement 42393f87 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.661e+03, gradient 3.475e-03, dot -0.170; [fc151097-37c4-48d0-96c2-b8d22a3756c9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -4.640230841342669, -3.024120097276839, -2.524870742727444, -2.1418840423081904
LBFGS Accumulation History: 3 points
Removed measurement 42393f87 to history. Total: 3
th(0)=-4.640230841342669;dx=-1.2035691016666945E-5
Armijo: th(779786.9240469472)=-2.7206373797483803; dx=-1.4356920002999668E-6 evalInputDelta=-1.919593461594289
New Minimum: -4.640230841342669 > -4.7625644003011605
END: th(389893.4620234736)=-4.7625644003011605; dx=-4.286132591117138E-6 evalInputDelta=0.1223335589584913
Fitness changed from -4.640230841342669 to -4.7625644003011605
Iteration 8 complete. Error: -4.7625644003011605 Total: 2.6772; Orientation: 0.2914; Line Search: 1.8218
Adding measurement 20b8ffd4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.461e+03, gradient 3.448e-03, dot -0.158; [fc151097-37c4-48d0-96c2-b8d22a3756c9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -4.7625644003011605, -3.024120097276839, -2.524870742727444, -2.1418840423081904
LBFGS Accumulation History: 3 points
Removed measurement 20b8ffd4 to history. Total: 3
th(0)=-4.7625644003011605;dx=-1.1853728760809159E-5
Armijo: th(840000.0000000003)=-2.2474626955338035; dx=-1.0650138350636722E-6 evalInputDelta=-2.515101704767357
Armijo: th(420000.0000000002)=-4.672376153557996; dx=-3.882676986794833E-6 evalInputDelta=-0.09018824674316406
New Minimum: -4.7625644003011605 > -5.194931539726134
END: th(140000.00000000006)=-5.194931539726134; dx=-8.170236640279444E-6 evalInputDelta=0.43236713942497396
Fitness changed from -4.7625644003011605 to -5.194931539726134
Iteration 9 complete. Error: -5.194931539726134 Total: 3.2989; Orientation: 0.3045; Line Search: 2.4566
Adding measurement 9daee08 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.458e+03, gradient 3.065e-03, dot -0.180; [fc151097-37c4-48d0-96c2-b8d22a3756c9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.194931539726134, -3.024120097276839, -2.524870742727444, -2.1418840423081904
LBFGS Accumulation History: 3 points
Removed measurement 9daee08 to history. Total: 3
th(0)=-5.194931539726134;dx=-9.369225545530072E-6
New Minimum: -5.194931539726134 > -5.4439388155547945
END: th(301620.8566044639)=-5.4439388155547945; dx=-5.4927464465441374E-6 evalInputDelta=0.2490072758286601
Fitness changed from -5.194931539726134 to -5.4439388155547945
Iteration 10 complete. Error: -5.4439388155547945 Total: 2.1368; Orientation: 0.3082; Line Search: 1.2858
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/44ed685b-bff5-4584-bd33-84bee6ea67b8.jpg)
Adding measurement 352ca561 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.912e+03, gradient 3.103e-03, dot -0.193; [fc151097-37c4-48d0-96c2-b8d22a3756c9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.4439388155547945, -3.024120097276839, -2.524870742727444, -2.1418840423081904
LBFGS Accumulation History: 3 points
Removed measurement 352ca561 to history. Total: 3
th(0)=-5.4439388155547945;dx=-9.592037998987958E-6
Armijo: th(649822.4367057894)=-4.352732039125202; dx=-2.415416071634782E-6 evalInputDelta=-1.0912067764295923
New Minimum: -5.4439388155547945 > -5.53688386326788
END: th(324911.2183528947)=-5.53688386326788; dx=-4.772694076823869E-6 evalInputDelta=0.09294504771308532
Fitness changed from -5.4439388155547945 to -5.53688386326788
Iteration 11 complete. Error: -5.53688386326788 Total: 2.9746; Orientation: 0.3049; Line Search: 2.0916
Adding measurement 13493515 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.054e+04, gradient 3.119e-03, dot -0.187; [fc151097-37c4-48d0-96c2-b8d22a3756c9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.53688386326788, -3.024120097276839, -2.524870742727444, -2.1418840423081904
LBFGS Accumulation History: 3 points
Removed measurement 13493515 to history. Total: 3
th(0)=-5.53688386326788;dx=-9.69791479904827E-6
Armijo: th(700000.0000000005)=-4.153775634347806; dx=-1.738668099486502E-6 evalInputDelta=-1.383108228920074
New Minimum: -5.53688386326788 > -5.625161082209759
END: th(350000.00000000023)=-5.625161082209759; dx=-3.948127166537973E-6 evalInputDelta=0.08827721894187945
Fitness changed from -5.53688386326788 to -5.625161082209759
Iteration 12 complete. Error: -5.625161082209759 Total: 2.6201; Orientation: 0.2920; Line Search: 1.7900
Adding measurement 5f89ce1e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.227e+04, gradient 3.197e-03, dot -0.178; [fc151097-37c4-48d0-96c2-b8d22a3756c9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.625161082209759, -3.024120097276839, -2.524870742727444, -2.1418840423081904
LBFGS Accumulation History: 3 points
Removed measurement 5f89ce1e to history. Total: 3
th(0)=-5.625161082209759;dx=-1.0208522486097884E-5
Armijo: th(754052.1415111598)=-3.9967521463102287; dx=-1.3101336127189797E-6 evalInputDelta=-1.6284089358995306
New Minimum: -5.625161082209759 > -5.700527278243198
END: th(377026.0707555799)=-5.700527278243198; dx=-3.456984846504755E-6 evalInputDelta=0.07536619603343908
Fitness changed from -5.625161082209759 to -5.700527278243198
Iteration 13 complete. Error: -5.700527278243198 Total: 2.6576; Orientation: 0.3031; Line Search: 1.8043
Adding measurement 58d9ef0c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.252e+04, gradient 3.290e-03, dot -0.166; [fc151097-37c4-48d0-96c2-b8d22a3756c9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.700527278243198, -3.024120097276839, -2.524870742727444, -2.1418840423081904
LBFGS Accumulation History: 3 points
Removed measurement 58d9ef0c to history. Total: 3
th(0)=-5.700527278243198;dx=-1.0788356716833908E-5
Armijo: th(812278.0458822369)=-3.40300284503852; dx=-6.672136014543452E-7 evalInputDelta=-2.2975244332046785
Armijo: th(406139.02294111846)=-5.607477437131678; dx=-2.8876007066620675E-6 evalInputDelta=-0.09304984111152059
New Minimum: -5.700527278243198 > -6.082404421530178
END: th(135379.67431370614)=-6.082404421530178; dx=-6.937640842374946E-6 evalInputDelta=0.38187714328697986
Fitness changed from -5.700527278243198 to -6.082404421530178
Iteration 14 complete. Error: -6.082404421530178 Total: 3.2715; Orientation: 0.3081; Line Search: 2.4271
Adding measurement 74c35a9f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.573e+04, gradient 2.851e-03, dot -0.194; [fc151097-37c4-48d0-96c2-b8d22a3756c9 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.082404421530178, -3.024120097276839, -2.524870742727444, -2.1418840423081904
LBFGS Accumulation History: 3 points
Removed measurement 74c35a9f to history. Total: 3
th(0)=-6.082404421530178;dx=-8.108570323319068E-6
New Minimum: -6.082404421530178 > -6.321516764069198
END: th(291666.66666666686)=-6.321516764069198; dx=-4.601751810659357E-6 evalInputDelta=0.2391123425390198
Fitness changed from -6.082404421530178 to -6.321516764069198
Iteration 15 complete. Error: -6.321516764069198 Total: 2.3993; Orientation: 0.3061; Line Search: 1.5282
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/db4044a8-71a8-4803-bcf1-f3a236eb6a05.jpg)
Final threshold in iteration 16: -6.321516764069198 (> -Infinity) after 44.393s (< 5400.000s)

Returns

    -6.321516764069198