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 62.57 seconds (0.742 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: 139738173566200
Reset training subject: 139739058521200
Adding measurement 55aec45e to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-27.72799992751855;dx=-0.016238076173696762
New Minimum: -27.72799992751855 > -27.759658369880924
WOLFE (weak): th(2.154434690031884)=-27.759658369880924; dx=-0.016227909582176483 evalInputDelta=0.03165844236237447
New Minimum: -27.759658369880924 > -27.791380675377575
WOLFE (weak): th(4.308869380063768)=-27.791380675377575; dx=-0.016237761448057414 evalInputDelta=0.06338074785902492
New Minimum: -27.791380675377575 > -27.9182745475242
WOLFE (weak): th(12.926608140191302)=-27.9182745475242; dx=-0.016209749440232762 evalInputDelta=0.1902746200056491
New Minimum: -27.9182745475242 > -28.48967462184491
WOLFE (weak): th(51.70643256076521)=-28.48967462184491; dx=-0.016288066596754247 evalInputDelta=0.7616746943263593
New Minimum: -28.48967462184491 > -31.585338465133333
WOLFE (weak): th(258.53216280382605)=-31.585338465133333; dx=-0.01661487695203784 evalInputDelta=3.8573385376147833
New Minimum: -31.585338465133333 > -50.91806329704494
WOLFE (weak): th(1551.1929768229563)=-50.91806329704494; dx=-0.01575318306787912 evalInputDelta=23.19006336952639
New Minimum: -50.91806329704494 > -90.8157206500477
END: th(10858.350837760694)=-90.8157206500477; dx=-0.002588171646976684 evalInputDelta=63.08772072252914
Fitness changed from -27.72799992751855 to -90.8157206500477
Iteration 1 complete. Error: -90.8157206500477 Total: 9.5256; Orientation: 0.0152; Line Search: 6.9957
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/94d31ff5-a60a-47a0-9daf-d49ce5e983bf.jpg)
Adding measurement 3f99a7fb to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-90.8157206500477;dx=-0.02751668646317842
New Minimum: -90.8157206500477 > -179.14169823599138
END: th(23393.607721408407)=-179.14169823599138; dx=-1.968972439223378E-4 evalInputDelta=88.32597758594369
Fitness changed from -90.8157206500477 to -179.14169823599138
Iteration 2 complete. Error: -179.14169823599138 Total: 2.6524; Orientation: 0.0150; Line Search: 1.7111
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/fced7aa4-1b15-4f75-9a7c-50fe06e467b2.jpg)
Adding measurement 2fcc2c77 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-179.14169823599138;dx=-0.03324466369480826
Armijo: th(50400.00000000001)=-163.61537882332456; dx=4.972333499073057E-4 evalInputDelta=-15.526319412666822
New Minimum: -179.14169823599138 > -265.16828383123044
END: th(25200.000000000004)=-265.16828383123044; dx=-6.007796653588346E-5 evalInputDelta=86.02658559523906
Fitness changed from -179.14169823599138 to -265.16828383123044
Iteration 3 complete. Error: -265.16828383123044 Total: 3.4716; Orientation: 0.0148; Line Search: 2.5519
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/908109b4-3b11-4161-ad4e-034a17db1a55.jpg)
Adding measurement 2a053eac to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.658e+03, gradient 1.577e-01, dot -0.283; [fd1b5e6f-cf44-4869-b42b-9e274f983b56 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -265.16828383123044, -179.14169823599138, -90.8157206500477, -27.72799992751855
LBFGS Accumulation History: 3 points
Removed measurement 2a053eac to history. Total: 3
th(0)=-265.16828383123044;dx=-0.024705477651867126
New Minimum: -265.16828383123044 > -283.285260934098
WOLF (strong): th(54291.75418880348)=-283.285260934098; dx=0.002196845061101349 evalInputDelta=18.116977102867565
New Minimum: -283.285260934098 > -459.7040998022532
END: th(27145.87709440174)=-459.7040998022532; dx=-9.266885962458014E-4 evalInputDelta=194.53581597102277
Fitness changed from -265.16828383123044 to -459.7040998022532
Iteration 4 complete. Error: -459.7040998022532 Total: 3.9673; Orientation: 0.2914; Line Search: 2.7308
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/844a9d43-39db-4e8f-a0e5-b8fa66f0f821.jpg)
Adding measurement 14f47519 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.635e+03, gradient 1.681e-01, dot -0.237; [fd1b5e6f-cf44-4869-b42b-9e274f983b56 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -459.7040998022532, -179.14169823599138, -90.8157206500477, -27.72799992751855
LBFGS Accumulation History: 3 points
Removed measurement 14f47519 to history. Total: 3
th(0)=-459.7040998022532;dx=-0.028213666885397677
Armijo: th(58484.01930352103)=-330.17569896571734; dx=0.0028092299585886415 evalInputDelta=-129.52840083653587
New Minimum: -459.7040998022532 > -613.5738545603128
WOLF (strong): th(29242.009651760516)=-613.5738545603128; dx=0.001445248959787047 evalInputDelta=153.86975475805963
New Minimum: -613.5738545603128 > -646.7425589057829
END: th(9747.336550586839)=-646.7425589057829; dx=-0.012818476734622202 evalInputDelta=187.03845910352965
Fitness changed from -459.7040998022532 to -646.7425589057829
Iteration 5 complete. Error: -646.7425589057829 Total: 4.7447; Orientation: 0.2785; Line Search: 3.5353
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/5d251959-4660-4bfa-a3fc-c82fc912a2dc.jpg)
Adding measurement 1536278c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.106e+03, gradient 1.424e-01, dot -0.260; [fd1b5e6f-cf44-4869-b42b-9e274f983b56 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -646.7425589057829, -179.14169823599138, -90.8157206500477, -27.72799992751855
LBFGS Accumulation History: 3 points
Removed measurement 1536278c to history. Total: 3
th(0)=-646.7425589057829;dx=-0.020182603445314775
New Minimum: -646.7425589057829 > -796.4526429738305
END: th(21000.000000000007)=-796.4526429738305; dx=-0.004418499108065889 evalInputDelta=149.71008406804765
Fitness changed from -646.7425589057829 to -796.4526429738305
Iteration 6 complete. Error: -796.4526429738305 Total: 2.9770; Orientation: 0.2751; Line Search: 1.7817
Adding measurement 65721fca to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.143e+04, gradient 1.645e-01, dot -0.251; [fd1b5e6f-cf44-4869-b42b-9e274f983b56 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -796.4526429738305, -179.14169823599138, -90.8157206500477, -27.72799992751855
LBFGS Accumulation History: 3 points
Removed measurement 65721fca to history. Total: 3
th(0)=-796.4526429738305;dx=-0.026926316586818655
Armijo: th(45243.12849066957)=-650.7649825397799; dx=0.0030933552877969116 evalInputDelta=-145.6876604340506
New Minimum: -796.4526429738305 > -875.1231699023858
WOLF (strong): th(22621.564245334786)=-875.1231699023858; dx=9.89317912291793E-4 evalInputDelta=78.67052692855532
New Minimum: -875.1231699023858 > -926.7025884824105
END: th(7540.521415111595)=-926.7025884824105; dx=-0.011756643101742102 evalInputDelta=130.24994550858003
Fitness changed from -796.4526429738305 to -926.7025884824105
Iteration 7 complete. Error: -926.7025884824105 Total: 4.8320; Orientation: 0.2657; Line Search: 3.6350
Adding measurement 1ea1da05 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.642e+04, gradient 1.387e-01, dot -0.312; [fd1b5e6f-cf44-4869-b42b-9e274f983b56 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -926.7025884824105, -179.14169823599138, -90.8157206500477, -27.72799992751855
LBFGS Accumulation History: 3 points
Removed measurement 1ea1da05 to history. Total: 3
th(0)=-926.7025884824105;dx=-0.019136321905885073
New Minimum: -926.7025884824105 > -1029.0632876553318
END: th(16245.56091764473)=-1029.0632876553318; dx=-0.005178189296473125 evalInputDelta=102.36069917292127
Fitness changed from -926.7025884824105 to -1029.0632876553318
Iteration 8 complete. Error: -1029.0632876553318 Total: 3.0121; Orientation: 0.3923; Line Search: 1.7763
Adding measurement 3469c36a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.378e+04, gradient 1.645e-01, dot -0.278; [fd1b5e6f-cf44-4869-b42b-9e274f983b56 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1029.0632876553318, -179.14169823599138, -90.8157206500477, -27.72799992751855
LBFGS Accumulation History: 3 points
Removed measurement 3469c36a to history. Total: 3
th(0)=-1029.0632876553318;dx=-0.026711071628187533
Armijo: th(35000.000000000015)=-929.0995304594659; dx=0.0028452087842975953 evalInputDelta=-99.96375719586592
New Minimum: -1029.0632876553318 > -1082.0340221083623
WOLF (strong): th(17500.000000000007)=-1082.0340221083623; dx=5.250294831896785E-4 evalInputDelta=52.970734453030445
New Minimum: -1082.0340221083623 > -1116.8509860317088
END: th(5833.333333333336)=-1116.8509860317088; dx=-0.010290306057908889 evalInputDelta=87.78769837637697
Fitness changed from -1029.0632876553318 to -1116.8509860317088
Iteration 9 complete. Error: -1116.8509860317088 Total: 4.6722; Orientation: 0.2772; Line Search: 3.6057
Adding measurement 42dca548 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.171e+04, gradient 1.314e-01, dot -0.360; [fd1b5e6f-cf44-4869-b42b-9e274f983b56 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1116.8509860317088, -179.14169823599138, -90.8157206500477, -27.72799992751855
LBFGS Accumulation History: 3 points
Removed measurement 42dca548 to history. Total: 3
th(0)=-1116.8509860317088;dx=-0.017026732500800723
New Minimum: -1116.8509860317088 > -1198.107100805266
END: th(12567.535691852661)=-1198.107100805266; dx=-0.0068412749802154805 evalInputDelta=81.25611477355733
Fitness changed from -1116.8509860317088 to -1198.107100805266
Iteration 10 complete. Error: -1198.107100805266 Total: 2.8823; Orientation: 0.2792; Line Search: 1.8111
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/52ab92bf-5293-42d6-8f2c-c4bf98822a22.jpg)
Adding measurement 32b93387 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.331e+04, gradient 1.499e-01, dot -0.328; [fd1b5e6f-cf44-4869-b42b-9e274f983b56 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1198.107100805266, -179.14169823599138, -90.8157206500477, -27.72799992751855
LBFGS Accumulation History: 3 points
Removed measurement 32b93387 to history. Total: 3
th(0)=-1198.107100805266;dx=-0.022349926697313297
Armijo: th(27075.934862741226)=-1167.1773108658342; dx=-2.3953240948193505E-4 evalInputDelta=-30.929789939431885
New Minimum: -1198.107100805266 > -1238.0728472105347
END: th(13537.967431370613)=-1238.0728472105347; dx=-0.002047171490476456 evalInputDelta=39.965746405268646
Fitness changed from -1198.107100805266 to -1238.0728472105347
Iteration 11 complete. Error: -1238.0728472105347 Total: 4.1044; Orientation: 0.3279; Line Search: 2.6929
Adding measurement 4c12739e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.639e+04, gradient 1.647e-01, dot -0.297; [fd1b5e6f-cf44-4869-b42b-9e274f983b56 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1238.0728472105347, -179.14169823599138, -90.8157206500477, -27.72799992751855
LBFGS Accumulation History: 3 points
Removed measurement 4c12739e to history. Total: 3
th(0)=-1238.0728472105347;dx=-0.02703644217108255
Armijo: th(29166.666666666686)=-1127.4747779884035; dx=0.004407229659789867 evalInputDelta=-110.59806922213124
New Minimum: -1238.0728472105347 > -1305.4474807513323
WOLF (strong): th(14583.333333333343)=-1305.4474807513323; dx=0.0022433131441377645 evalInputDelta=67.3746335407975
New Minimum: -1305.4474807513323 > -1317.0748365222078
END: th(4861.111111111114)=-1317.0748365222078; dx=-0.01354231489850187 evalInputDelta=79.00198931167301
Fitness changed from -1238.0728472105347 to -1317.0748365222078
Iteration 12 complete. Error: -1317.0748365222078 Total: 5.1459; Orientation: 0.3267; Line Search: 3.8964
Adding measurement 49368701 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.222e+04, gradient 1.342e-01, dot -0.380; [fd1b5e6f-cf44-4869-b42b-9e274f983b56 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1317.0748365222078, -179.14169823599138, -90.8157206500477, -27.72799992751855
LBFGS Accumulation History: 3 points
Removed measurement 49368701 to history. Total: 3
th(0)=-1317.0748365222078;dx=-0.017897189649407078
New Minimum: -1317.0748365222078 > -1389.8239097094279
END: th(10472.946409877219)=-1389.8239097094279; dx=-0.007123962195607913 evalInputDelta=72.74907318722012
Fitness changed from -1317.0748365222078 to -1389.8239097094279
Iteration 13 complete. Error: -1389.8239097094279 Total: 2.9837; Orientation: 0.3081; Line Search: 1.8106
Adding measurement 4234bf3b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.224e+05, gradient 1.352e-01, dot -0.392; [fd1b5e6f-cf44-4869-b42b-9e274f983b56 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1389.8239097094279, -179.14169823599138, -90.8157206500477, -27.72799992751855
LBFGS Accumulation History: 3 points
Removed measurement 4234bf3b to history. Total: 3
th(0)=-1389.8239097094279;dx=-0.018184028564485512
New Minimum: -1389.8239097094279 > -1419.769919740519
END: th(22563.279052284357)=-1419.769919740519; dx=-0.0018609323378191295 evalInputDelta=29.94601003109119
Fitness changed from -1389.8239097094279 to -1419.769919740519
Iteration 14 complete. Error: -1419.769919740519 Total: 2.8480; Orientation: 0.2789; Line Search: 1.7229
Adding measurement 36dc12a0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.353e+05, gradient 1.722e-01, dot -0.276; [fd1b5e6f-cf44-4869-b42b-9e274f983b56 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1419.769919740519, -179.14169823599138, -90.8157206500477, -27.72799992751855
LBFGS Accumulation History: 3 points
Removed measurement 36dc12a0 to history. Total: 3
th(0)=-1419.769919740519;dx=-0.029587284555585035
Armijo: th(48611.111111111146)=-1073.8738869159638; dx=0.004761570894661374 evalInputDelta=-345.8960328245553
Armijo: th(24305.555555555573)=-1394.9178291211279; dx=0.00604837411489679 evalInputDelta=-24.85209061939122
New Minimum: -1419.769919740519 > -1544.5127872568748
END: th(8101.851851851858)=-1544.5127872568748; dx=-0.008888180853584053 evalInputDelta=124.74286751635577
Fitness changed from -1419.769919740519 to -1544.5127872568748
Iteration 15 complete. Error: -1544.5127872568748 Total: 4.6471; Orientation: 0.2729; Line Search: 3.5477
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/073ed9d6-e3bf-4d29-9c2f-8bc1557297aa.jpg)
Final threshold in iteration 16: -1544.5127872568748 (> -Infinity) after 62.565s (< 5400.000s)

Returns

    -1544.5127872568748