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 1602.64 seconds (18.517 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: 568689522754900
Reset training subject: 568712848739400
Adding measurement 3db4dac2 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-57.82545945067758;dx=-9.016548942414036E-6
New Minimum: -57.82545945067758 > -57.82548752939218
WOLFE (weak): th(2.154434690031884)=-57.82548752939218; dx=-9.019875811473442E-6 evalInputDelta=2.8078714599644172E-5
New Minimum: -57.82548752939218 > -57.82551691324295
WOLFE (weak): th(4.308869380063768)=-57.82551691324295; dx=-9.009717529701113E-6 evalInputDelta=5.746256537264571E-5
New Minimum: -57.82551691324295 > -57.82563446681029
WOLFE (weak): th(12.926608140191302)=-57.82563446681029; dx=-9.017227928917932E-6 evalInputDelta=1.750161327152E-4
New Minimum: -57.82563446681029 > -57.82616083799266
WOLFE (weak): th(51.70643256076521)=-57.82616083799266; dx=-9.016552896043164E-6 evalInputDelta=7.013873150825134E-4
New Minimum: -57.82616083799266 > -57.82897998238793
WOLFE (weak): th(258.53216280382605)=-57.82897998238793; dx=-9.018341289520568E-6 evalInputDelta=0.003520531710350383
New Minimum: -57.82897998238793 > -57.8465898680828
WOLFE (weak): th(1551.1929768229563)=-57.8465898680828; dx=-9.01008842692426E-6 evalInputDelta=0.021130417405224478
New Minimum: -57.8465898680828 > -57.973408451405795
WOLFE (weak): th(10858.350837760694)=-57.973408451405795; dx=-9.015198425867623E-6 evalInputDelta=0.14794900072821804
New Minimum: -57.973408451405795 > -59.01059407759357
WOLFE (weak): th(86866.80670208555)=-59.01059407759357; dx=-9.007422151284683E-6 evalInputDelta=1.185134626915989
New Minimum: -59.01059407759357 > -68.34899346498949
WOLFE (weak): th(781801.26031877)=-68.34899346498949; dx=-8.551639000275121E-6 evalInputDelta=10.523534014311913
New Minimum: -68.34899346498949 > -104.23138944646823
END: th(7818012.6031877)=-104.23138944646823; dx=-1.1419153241379785E-7 evalInputDelta=46.40592999579065
Fitness changed from -57.82545945067758 to -104.23138944646823
Iteration 1 complete. Error: -104.23138944646823 Total: 322.4297; Orientation: 0.1360; Line Search: 255.0194
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/fab81582-6131-4611-8750-f85e8aebdd8d.jpg)
Adding measurement 4b5092c6 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-104.23138944646823;dx=-1.2709567003346936E-5
New Minimum: -104.23138944646823 > -119.6799370318308
WOLF (strong): th(1.684339755941405E7)=-119.6799370318308; dx=1.5182925079094328E-6 evalInputDelta=15.448547585362576
New Minimum: -119.6799370318308 > -147.02584537359758
WOLF (strong): th(8421698.779707026)=-147.02584537359758; dx=2.016656100708748E-6 evalInputDelta=42.79445592712935
END: th(2807232.9265690087)=-144.66910562480734; dx=-5.181113014074998E-6 evalInputDelta=40.437716178339116
Fitness changed from -104.23138944646823 to -147.02584537359758
Iteration 2 complete. Error: -147.02584537359758 Total: 113.9878; Orientation: 0.1409; Line Search: 90.1585
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/ced67074-ae07-4638-9b20-4e40f24948d7.jpg)
Adding measurement 250e7f0 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-147.02584537359758;dx=-1.3796277011189499E-5
New Minimum: -147.02584537359758 > -205.58718645463134
WOLF (strong): th(6048000.0)=-205.58718645463134; dx=8.530926198512598E-7 evalInputDelta=58.56134108103376
END: th(3024000.0)=-195.59030083359534; dx=-6.102424464341378E-6 evalInputDelta=48.56445545999776
Fitness changed from -147.02584537359758 to -205.58718645463134
Iteration 3 complete. Error: -205.58718645463134 Total: 92.4860; Orientation: 0.1458; Line Search: 68.3988
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/b81185b9-bf1b-48e8-b026-81a26774d16a.jpg)
Adding measurement 1db235c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.183e+04, gradient 2.906e-03, dot -0.513; [6341098b-b8d2-4cb1-a549-6d2fc4be0431 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -205.58718645463134, -147.02584537359758, -104.23138944646823, -57.82545945067758
LBFGS Accumulation History: 3 points
Removed measurement 1db235c to history. Total: 3
th(0)=-205.58718645463134;dx=-8.443667408284936E-6
New Minimum: -205.58718645463134 > -239.5344089632331
WOLF (strong): th(6515010.502656417)=-239.5344089632331; dx=8.521465279667497E-7 evalInputDelta=33.947222508601754
END: th(3257505.2513282085)=-235.36020449259252; dx=-3.1153617727842023E-6 evalInputDelta=29.77301803796118
Fitness changed from -205.58718645463134 to -239.5344089632331
Iteration 4 complete. Error: -239.5344089632331 Total: 95.3107; Orientation: 2.6825; Line Search: 68.2773
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/c7b67f91-b49d-46c2-ab21-aa1a9098c2b5.jpg)
Adding measurement 56ff0e37 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.334e+04, gradient 2.746e-03, dot -0.511; [6341098b-b8d2-4cb1-a549-6d2fc4be0431 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -239.5344089632331, -147.02584537359758, -104.23138944646823, -57.82545945067758
LBFGS Accumulation History: 3 points
Removed measurement 56ff0e37 to history. Total: 3
th(0)=-239.5344089632331;dx=-7.518570472689637E-6
New Minimum: -239.5344089632331 > -266.5717111121671
WOLF (strong): th(7018082.316422523)=-266.5717111121671; dx=1.48092566851073E-6 evalInputDelta=27.03730214893403
New Minimum: -266.5717111121671 > -266.61258403289065
END: th(3509041.1582112615)=-266.61258403289065; dx=-2.156646833455119E-6 evalInputDelta=27.07817506965756
Fitness changed from -239.5344089632331 to -266.61258403289065
Iteration 5 complete. Error: -266.61258403289065 Total: 94.3290; Orientation: 2.6677; Line Search: 67.4868
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/b06e4507-8522-44d8-b763-90def6ad2f01.jpg)
Adding measurement 1846305e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.144e+04, gradient 1.840e-03, dot -0.658; [6341098b-b8d2-4cb1-a549-6d2fc4be0431 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -266.61258403289065, -147.02584537359758, -104.23138944646823, -57.82545945067758
LBFGS Accumulation History: 3 points
Removed measurement 1846305e to history. Total: 3
th(0)=-266.61258403289065;dx=-3.3820227889013854E-6
New Minimum: -266.61258403289065 > -292.6123108203443
END: th(7560000.000000002)=-292.6123108203443; dx=-1.3442741591503805E-6 evalInputDelta=25.999726787453653
Fitness changed from -266.61258403289065 to -292.6123108203443
Iteration 6 complete. Error: -292.6123108203443 Total: 70.3967; Orientation: 2.7035; Line Search: 43.8660
Adding measurement 204a9434 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.558e+04, gradient 2.039e-03, dot -0.571; [6341098b-b8d2-4cb1-a549-6d2fc4be0431 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -292.6123108203443, -147.02584537359758, -104.23138944646823, -57.82545945067758
LBFGS Accumulation History: 3 points
Removed measurement 204a9434 to history. Total: 3
th(0)=-292.6123108203443;dx=-4.148831124516831E-6
New Minimum: -292.6123108203443 > -302.53648064126025
WOLF (strong): th(1.6287526256641045E7)=-302.53648064126025; dx=8.650320664301181E-7 evalInputDelta=9.92416982091595
New Minimum: -302.53648064126025 > -311.33431810341284
WOLF (strong): th(8143763.128320523)=-311.33431810341284; dx=1.888988522690493E-7 evalInputDelta=18.722007283068535
END: th(2714587.709440174)=-305.76653128406275; dx=-2.0808713862751858E-6 evalInputDelta=13.154220463718445
Fitness changed from -292.6123108203443 to -311.33431810341284
Iteration 7 complete. Error: -311.33431810341284 Total: 117.1615; Orientation: 2.7017; Line Search: 91.6872
Adding measurement 677815f4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.551e+04, gradient 2.324e-03, dot -0.472; [6341098b-b8d2-4cb1-a549-6d2fc4be0431 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -311.33431810341284, -147.02584537359758, -104.23138944646823, -57.82545945067758
LBFGS Accumulation History: 3 points
Removed measurement 677815f4 to history. Total: 3
th(0)=-311.33431810341284;dx=-5.376292428240846E-6
New Minimum: -311.33431810341284 > -335.36516092484214
WOLF (strong): th(5848401.930352103)=-335.36516092484214; dx=1.4670984096208884E-7 evalInputDelta=24.030842821429303
END: th(2924200.9651760515)=-330.1271377726132; dx=-2.693770462857059E-6 evalInputDelta=18.792819669200355
Fitness changed from -311.33431810341284 to -335.36516092484214
Iteration 8 complete. Error: -335.36516092484214 Total: 95.7679; Orientation: 2.6852; Line Search: 69.6863
Adding measurement 2faa9821 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.638e+04, gradient 1.864e-03, dot -0.537; [6341098b-b8d2-4cb1-a549-6d2fc4be0431 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -335.36516092484214, -147.02584537359758, -104.23138944646823, -57.82545945067758
LBFGS Accumulation History: 3 points
Removed measurement 2faa9821 to history. Total: 3
th(0)=-335.36516092484214;dx=-3.439927341279906E-6
New Minimum: -335.36516092484214 > -351.90724092267936
END: th(6300000.000000002)=-351.90724092267936; dx=-1.5721524443155853E-7 evalInputDelta=16.54207999783722
Fitness changed from -335.36516092484214 to -351.90724092267936
Iteration 9 complete. Error: -351.90724092267936 Total: 68.7014; Orientation: 2.5636; Line Search: 44.3134
Adding measurement 17b4056d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.780e+04, gradient 1.813e-03, dot -0.525; [6341098b-b8d2-4cb1-a549-6d2fc4be0431 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -351.90724092267936, -147.02584537359758, -104.23138944646823, -57.82545945067758
LBFGS Accumulation History: 3 points
Removed measurement 17b4056d to history. Total: 3
th(0)=-351.90724092267936;dx=-3.2762904148788823E-6
New Minimum: -351.90724092267936 > -358.2733793617672
WOLF (strong): th(1.3572938547200872E7)=-358.2733793617672; dx=1.1166906588124567E-6 evalInputDelta=6.36613843908782
New Minimum: -358.2733793617672 > -367.133001676458
WOLF (strong): th(6786469.273600436)=-367.133001676458; dx=9.680339792236789E-8 evalInputDelta=15.225760753778616
END: th(2262156.4245334785)=-361.4083993304516; dx=-2.020041375046657E-6 evalInputDelta=9.501158407772209
Fitness changed from -351.90724092267936 to -367.133001676458
Iteration 10 complete. Error: -367.133001676458 Total: 116.5368; Orientation: 2.5571; Line Search: 90.8285
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/f67e40eb-d4e5-4383-9668-aced52cfa1b3.jpg)
Adding measurement 7c935997 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.046e+05, gradient 1.829e-03, dot -0.500; [6341098b-b8d2-4cb1-a549-6d2fc4be0431 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -367.133001676458, -147.02584537359758, -104.23138944646823, -57.82545945067758
LBFGS Accumulation History: 3 points
Removed measurement 7c935997 to history. Total: 3
th(0)=-367.133001676458;dx=-3.3329025261319664E-6
New Minimum: -367.133001676458 > -381.9691220104447
END: th(4873668.275293419)=-381.9691220104447; dx=-5.456305068799041E-7 evalInputDelta=14.836120333986742
Fitness changed from -367.133001676458 to -381.9691220104447
Iteration 11 complete. Error: -381.9691220104447 Total: 72.1618; Orientation: 2.9185; Line Search: 45.1212
Adding measurement 7238abdd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.024e+05, gradient 1.413e-03, dot -0.594; [6341098b-b8d2-4cb1-a549-6d2fc4be0431 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -381.9691220104447, -147.02584537359758, -104.23138944646823, -57.82545945067758
LBFGS Accumulation History: 3 points
Removed measurement 7238abdd to history. Total: 3
th(0)=-381.9691220104447;dx=-1.97890863724373E-6
New Minimum: -381.9691220104447 > -397.07508955173273
END: th(1.0500000000000004E7)=-397.07508955173273; dx=-2.1655230197260502E-7 evalInputDelta=15.10596754128801
Fitness changed from -381.9691220104447 to -397.07508955173273
Iteration 12 complete. Error: -397.07508955173273 Total: 69.5597; Orientation: 2.6192; Line Search: 45.4616
Adding measurement 766f450a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.093e+05, gradient 1.822e-03, dot -0.456; [6341098b-b8d2-4cb1-a549-6d2fc4be0431 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -397.07508955173273, -147.02584537359758, -104.23138944646823, -57.82545945067758
LBFGS Accumulation History: 3 points
Removed measurement 766f450a to history. Total: 3
th(0)=-397.07508955173273;dx=-3.310781860223509E-6
Armijo: th(2.262156424533479E7)=-372.78217510499917; dx=1.7299556784188408E-6 evalInputDelta=-24.292914446733562
New Minimum: -397.07508955173273 > -405.1815125570174
WOLF (strong): th(1.1310782122667395E7)=-405.1815125570174; dx=1.2651715715883322E-6 evalInputDelta=8.106423005284682
New Minimum: -405.1815125570174 > -410.89635626084845
END: th(3770260.7075557983)=-410.89635626084845; dx=-1.1697993800592725E-6 evalInputDelta=13.821266709115719
Fitness changed from -397.07508955173273 to -410.89635626084845
Iteration 13 complete. Error: -410.89635626084845 Total: 121.3863; Orientation: 2.6415; Line Search: 96.8275
Adding measurement 5d347da7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.042e+05, gradient 1.177e-03, dot -0.631; [6341098b-b8d2-4cb1-a549-6d2fc4be0431 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -410.89635626084845, -147.02584537359758, -104.23138944646823, -57.82545945067758
LBFGS Accumulation History: 3 points
Removed measurement 5d347da7 to history. Total: 3
th(0)=-410.89635626084845;dx=-1.3840155978956208E-6
New Minimum: -410.89635626084845 > -424.3191725989607
END: th(8122780.458822368)=-424.3191725989607; dx=-8.235498433343185E-7 evalInputDelta=13.422816338112227
Fitness changed from -410.89635626084845 to -424.3191725989607
Iteration 14 complete. Error: -424.3191725989607 Total: 81.9748; Orientation: 2.7671; Line Search: 55.0962
Adding measurement 53944f73 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.086e+05, gradient 1.249e-03, dot -0.581; [6341098b-b8d2-4cb1-a549-6d2fc4be0431 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -424.3191725989607, -147.02584537359758, -104.23138944646823, -57.82545945067758
LBFGS Accumulation History: 3 points
Removed measurement 53944f73 to history. Total: 3
th(0)=-424.3191725989607;dx=-1.553057463832741E-6
New Minimum: -424.3191725989607 > -438.2298359833908
END: th(1.750000000000001E7)=-438.2298359833908; dx=-1.6781451223567462E-8 evalInputDelta=13.910663384430109
Fitness changed from -424.3191725989607 to -438.2298359833908
Iteration 15 complete. Error: -438.2298359833908 Total: 69.1569; Orientation: 2.5462; Line Search: 44.2940
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/fbd33bcf-b8ac-4b06-aba8-87dcfc5cc26b.jpg)
Final threshold in iteration 16: -438.2298359833908 (> -Infinity) after 1602.636s (< 5400.000s)

Returns

    -438.2298359833908