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 8.49 seconds (0.000 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: 141141257533900
Reset training subject: 141141403476900
Adding measurement 541f82ee to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-1.2345393689939708;dx=-1.9962063828466797E-4
New Minimum: -1.2345393689939708 > -1.2350760628033013
WOLFE (weak): th(2.154434690031884)=-1.2350760628033013; dx=-1.9474137185009502E-4 evalInputDelta=5.36693809330524E-4
New Minimum: -1.2350760628033013 > -1.235613482777166
WOLFE (weak): th(4.308869380063768)=-1.235613482777166; dx=-1.897581636776304E-4 evalInputDelta=0.0010741137831953296
New Minimum: -1.235613482777166 > -1.2377672133511424
WOLFE (weak): th(12.926608140191302)=-1.2377672133511424; dx=-1.9438336172075224E-4 evalInputDelta=0.0032278443571716053
New Minimum: -1.2377672133511424 > -1.2475010341154882
WOLFE (weak): th(51.70643256076521)=-1.2475010341154882; dx=-1.9592701538127412E-4 evalInputDelta=0.012961665121517418
New Minimum: -1.2475010341154882 > -1.2992986726641407
WOLFE (weak): th(258.53216280382605)=-1.2992986726641407; dx=-1.9401450818191333E-4 evalInputDelta=0.06475930367016991
New Minimum: -1.2992986726641407 > -1.6185568614207382
WOLFE (weak): th(1551.1929768229563)=-1.6185568614207382; dx=-1.870588512556616E-4 evalInputDelta=0.3840174924267674
New Minimum: -1.6185568614207382 > -3.019027915308605
END: th(10858.350837760694)=-3.019027915308605; dx=-6.518018636088988E-5 evalInputDelta=1.784488546314634
Fitness changed from -1.2345393689939708 to -3.019027915308605
Iteration 1 complete. Error: -3.019027915308605 Total: 1.3497; Orientation: 0.0019; Line Search: 0.9656
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/ec1ca74f-2994-47e2-adf2-d1123b17850a.jpg)
Adding measurement 2b476e45 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-3.019027915308605;dx=-2.1585251511381946E-4
New Minimum: -3.019027915308605 > -4.992992588223222
END: th(23393.607721408407)=-4.992992588223222; dx=-2.2012498781598975E-5 evalInputDelta=1.9739646729146174
Fitness changed from -3.019027915308605 to -4.992992588223222
Iteration 2 complete. Error: -4.992992588223222 Total: 0.3677; Orientation: 0.0017; Line Search: 0.2416
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/de6565df-da70-4a58-8641-c3b30fc9b84c.jpg)
Adding measurement 6a851245 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-4.992992588223222;dx=-2.6046948153472316E-4
Armijo: th(50400.00000000001)=-4.564570786765457; dx=1.0813006679043303E-5 evalInputDelta=-0.4284218014577652
New Minimum: -4.992992588223222 > -6.270139054212208
WOLF (strong): th(25200.000000000004)=-6.270139054212208; dx=5.760118477219228E-6 evalInputDelta=1.2771464659889862
New Minimum: -6.270139054212208 > -6.7875325069913846
END: th(8400.000000000002)=-6.7875325069913846; dx=-6.168736923171724E-5 evalInputDelta=1.7945399187681623
Fitness changed from -4.992992588223222 to -6.7875325069913846
Iteration 3 complete. Error: -6.7875325069913846 Total: 0.6322; Orientation: 0.0027; Line Search: 0.4935
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/fd2cc994-ff34-4e52-a9b1-02025942d1b3.jpg)
Adding measurement 49fc2641 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.758e+02, gradient 1.333e-02, dot -0.411; [5e73a8e1-01ec-4878-83d4-5d3122d322b7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.7875325069913846, -4.992992588223222, -3.019027915308605, -1.2345393689939708
LBFGS Accumulation History: 3 points
Removed measurement 49fc2641 to history. Total: 3
th(0)=-6.7875325069913846;dx=-1.5333653291174274E-4
New Minimum: -6.7875325069913846 > -7.7008855689978555
END: th(18097.251396267828)=-7.7008855689978555; dx=-2.016545523176424E-5 evalInputDelta=0.9133530620064709
Fitness changed from -6.7875325069913846 to -7.7008855689978555
Iteration 4 complete. Error: -7.7008855689978555 Total: 0.3893; Orientation: 0.0349; Line Search: 0.2317
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/f46394fe-43bb-4ef5-8211-b34384bdde17.jpg)
Adding measurement 4a9f7bb4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.681e+02, gradient 1.503e-02, dot -0.331; [5e73a8e1-01ec-4878-83d4-5d3122d322b7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.7008855689978555, -4.992992588223222, -3.019027915308605, -1.2345393689939708
LBFGS Accumulation History: 3 points
Removed measurement 4a9f7bb4 to history. Total: 3
th(0)=-7.7008855689978555;dx=-2.149020178490734E-4
Armijo: th(38989.346202347355)=-6.32893985286537; dx=1.1097213440622606E-5 evalInputDelta=-1.371945716132485
New Minimum: -7.7008855689978555 > -8.175439689925737
WOLF (strong): th(19494.673101173677)=-8.175439689925737; dx=2.6591657699861346E-5 evalInputDelta=0.4745541209278814
New Minimum: -8.175439689925737 > -8.93175478956535
END: th(6498.224367057893)=-8.93175478956535; dx=-5.6090245768137775E-5 evalInputDelta=1.2308692205674943
Fitness changed from -7.7008855689978555 to -8.93175478956535
Iteration 5 complete. Error: -8.93175478956535 Total: 0.6176; Orientation: 0.0272; Line Search: 0.4629
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/aaddcb3d-f621-4743-b58e-59aa59f6c894.jpg)
Adding measurement 2eb52190 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.317e+02, gradient 1.077e-02, dot -0.436; [5e73a8e1-01ec-4878-83d4-5d3122d322b7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -8.93175478956535, -4.992992588223222, -3.019027915308605, -1.2345393689939708
LBFGS Accumulation History: 3 points
Removed measurement 2eb52190 to history. Total: 3
th(0)=-8.93175478956535;dx=-1.0807621889582551E-4
New Minimum: -8.93175478956535 > -10.08203247907598
END: th(14000.000000000005)=-10.08203247907598; dx=-5.346755613387336E-5 evalInputDelta=1.1502776895106308
Fitness changed from -8.93175478956535 to -10.08203247907598
Iteration 6 complete. Error: -10.08203247907598 Total: 0.4000; Orientation: 0.0324; Line Search: 0.2440
Adding measurement 33d5abfd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.656e+03, gradient 1.059e-02, dot -0.509; [5e73a8e1-01ec-4878-83d4-5d3122d322b7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -10.08203247907598, -4.992992588223222, -3.019027915308605, -1.2345393689939708
LBFGS Accumulation History: 3 points
Removed measurement 33d5abfd to history. Total: 3
th(0)=-10.08203247907598;dx=-1.0317535049483982E-4
New Minimum: -10.08203247907598 > -10.654728591325583
END: th(30162.085660446384)=-10.654728591325583; dx=-1.6252117852244212E-5 evalInputDelta=0.5726961122496022
Fitness changed from -10.08203247907598 to -10.654728591325583
Iteration 7 complete. Error: -10.654728591325583 Total: 0.3723; Orientation: 0.0285; Line Search: 0.2336
Adding measurement 17c9ca72 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.802e+03, gradient 1.579e-02, dot -0.309; [5e73a8e1-01ec-4878-83d4-5d3122d322b7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -10.654728591325583, -4.992992588223222, -3.019027915308605, -1.2345393689939708
LBFGS Accumulation History: 3 points
Removed measurement 17c9ca72 to history. Total: 3
th(0)=-10.654728591325583;dx=-2.3816508451890252E-4
Armijo: th(64982.24367057894)=-9.354968791985712; dx=1.2733025693626758E-5 evalInputDelta=-1.2997597993398706
New Minimum: -10.654728591325583 > -11.311403629042918
WOLF (strong): th(32491.12183528947)=-11.311403629042918; dx=1.6271702959646134E-5 evalInputDelta=0.6566750377173349
New Minimum: -11.311403629042918 > -12.539955478298262
END: th(10830.37394509649)=-12.539955478298262; dx=-5.463961383632725E-6 evalInputDelta=1.8852268869726796
Fitness changed from -10.654728591325583 to -12.539955478298262
Iteration 8 complete. Error: -12.539955478298262 Total: 0.5998; Orientation: 0.0278; Line Search: 0.4585
Adding measurement 2154843 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.119e+03, gradient 1.298e-02, dot -0.388; [5e73a8e1-01ec-4878-83d4-5d3122d322b7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -12.539955478298262, -4.992992588223222, -3.019027915308605, -1.2345393689939708
LBFGS Accumulation History: 3 points
Removed measurement 2154843 to history. Total: 3
th(0)=-12.539955478298262;dx=-1.568856506501471E-4
New Minimum: -12.539955478298262 > -12.89160439527561
WOLF (strong): th(23333.333333333347)=-12.89160439527561; dx=6.138283565216533E-6 evalInputDelta=0.35164891697734824
New Minimum: -12.89160439527561 > -13.36956738976575
END: th(11666.666666666673)=-13.36956738976575; dx=-1.1159337966459566E-5 evalInputDelta=0.829611911467488
Fitness changed from -12.539955478298262 to -13.36956738976575
Iteration 9 complete. Error: -13.36956738976575 Total: 0.5022; Orientation: 0.0287; Line Search: 0.3540
Adding measurement 78fb4f87 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.759e+03, gradient 1.262e-02, dot -0.432; [5e73a8e1-01ec-4878-83d4-5d3122d322b7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -13.36956738976575, -4.992992588223222, -3.019027915308605, -1.2345393689939708
LBFGS Accumulation History: 3 points
Removed measurement 78fb4f87 to history. Total: 3
th(0)=-13.36956738976575;dx=-1.4552772769060667E-4
New Minimum: -13.36956738976575 > -13.733776213929211
WOLF (strong): th(25135.071383705326)=-13.733776213929211; dx=3.1886130850648562E-6 evalInputDelta=0.3642088241634607
New Minimum: -13.733776213929211 > -14.331389992310791
END: th(12567.535691852663)=-14.331389992310791; dx=-1.1240725772995089E-5 evalInputDelta=0.9618226025450411
Fitness changed from -13.36956738976575 to -14.331389992310791
Iteration 10 complete. Error: -14.331389992310791 Total: 0.5006; Orientation: 0.0310; Line Search: 0.3563
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/bcf36272-03e3-4d83-9b68-b76da8831589.jpg)
Adding measurement 5736d67 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.208e+03, gradient 1.115e-02, dot -0.450; [5e73a8e1-01ec-4878-83d4-5d3122d322b7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -14.331389992310791, -4.992992588223222, -3.019027915308605, -1.2345393689939708
LBFGS Accumulation History: 3 points
Removed measurement 5736d67 to history. Total: 3
th(0)=-14.331389992310791;dx=-1.1511926107382263E-4
Armijo: th(27075.93486274123)=-14.32583515797304; dx=1.006392504775432E-5 evalInputDelta=-0.005554834337750947
New Minimum: -14.331389992310791 > -15.073350817056124
END: th(13537.967431370615)=-15.073350817056124; dx=-1.232793563030878E-5 evalInputDelta=0.7419608247453322
Fitness changed from -14.331389992310791 to -15.073350817056124
Iteration 11 complete. Error: -15.073350817056124 Total: 0.5323; Orientation: 0.0320; Line Search: 0.3706
Adding measurement 6ce2db0d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.684e+03, gradient 1.152e-02, dot -0.473; [5e73a8e1-01ec-4878-83d4-5d3122d322b7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -15.073350817056124, -4.992992588223222, -3.019027915308605, -1.2345393689939708
LBFGS Accumulation History: 3 points
Removed measurement 6ce2db0d to history. Total: 3
th(0)=-15.073350817056124;dx=-1.2433165951359945E-4
New Minimum: -15.073350817056124 > -15.348154580953612
WOLF (strong): th(29166.66666666669)=-15.348154580953612; dx=1.1025520314333143E-5 evalInputDelta=0.27480376389748784
New Minimum: -15.348154580953612 > -16.135579571080072
END: th(14583.333333333345)=-16.135579571080072; dx=-1.4110882504205459E-5 evalInputDelta=1.0622287540239483
Fitness changed from -15.073350817056124 to -16.135579571080072
Iteration 12 complete. Error: -16.135579571080072 Total: 0.5338; Orientation: 0.0290; Line Search: 0.3807
Adding measurement 3a4b16f7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.136e+03, gradient 1.095e-02, dot -0.473; [5e73a8e1-01ec-4878-83d4-5d3122d322b7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -16.135579571080072, -4.992992588223222, -3.019027915308605, -1.2345393689939708
LBFGS Accumulation History: 3 points
Removed measurement 3a4b16f7 to history. Total: 3
th(0)=-16.135579571080072;dx=-1.1343954275094972E-4
Armijo: th(31418.839229631663)=-16.107055256712894; dx=1.0711171894030674E-5 evalInputDelta=-0.028524314367178505
New Minimum: -16.135579571080072 > -17.1052767981608
END: th(15709.419614815832)=-17.1052767981608; dx=-1.3292685370814962E-5 evalInputDelta=0.9696972270807294
Fitness changed from -16.135579571080072 to -17.1052767981608
Iteration 13 complete. Error: -17.1052767981608 Total: 0.5359; Orientation: 0.0299; Line Search: 0.3816
Adding measurement 592c2c01 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.569e+04, gradient 1.100e-02, dot -0.485; [5e73a8e1-01ec-4878-83d4-5d3122d322b7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -17.1052767981608, -4.992992588223222, -3.019027915308605, -1.2345393689939708
LBFGS Accumulation History: 3 points
Removed measurement 592c2c01 to history. Total: 3
th(0)=-17.1052767981608;dx=-1.1454071843301693E-4
Armijo: th(33844.91857842654)=-16.975368048679623; dx=1.8574715787641356E-5 evalInputDelta=-0.12990874948117792
New Minimum: -17.1052767981608 > -18.069849041349105
END: th(16922.45928921327)=-18.069849041349105; dx=-3.717502542330681E-6 evalInputDelta=0.9645722431883037
Fitness changed from -17.1052767981608 to -18.069849041349105
Iteration 14 complete. Error: -18.069849041349105 Total: 0.5217; Orientation: 0.0280; Line Search: 0.3722
Adding measurement 25242600 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.561e+04, gradient 1.130e-02, dot -0.459; [5e73a8e1-01ec-4878-83d4-5d3122d322b7 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -18.069849041349105, -4.992992588223222, -3.019027915308605, -1.2345393689939708
LBFGS Accumulation History: 3 points
Removed measurement 25242600 to history. Total: 3
th(0)=-18.069849041349105;dx=-1.1846867209154745E-4
Armijo: th(36458.333333333365)=-17.1407768019766; dx=1.4850313437930655E-5 evalInputDelta=-0.9290722393725055
New Minimum: -18.069849041349105 > -18.707017227645945
WOLF (strong): th(18229.166666666682)=-18.707017227645945; dx=3.7573746756850798E-6 evalInputDelta=0.6371681862968401
New Minimum: -18.707017227645945 > -18.797751621429786
END: th(6076.388888888894)=-18.797751621429786; dx=-7.023226251337436E-5 evalInputDelta=0.7279025800806807
Fitness changed from -18.069849041349105 to -18.797751621429786
Iteration 15 complete. Error: -18.797751621429786 Total: 0.6203; Orientation: 0.0294; Line Search: 0.4773
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/7697b346-ecbb-4e67-85ac-c72f42a05013.jpg)
Final threshold in iteration 16: -18.797751621429786 (> -Infinity) after 8.486s (< 5400.000s)

Returns

    -18.797751621429786