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 47.35 seconds (0.836 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: 221373378083100
Reset training subject: 221374015311200
Adding measurement 62ab961a to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-70.57945503229853;dx=-0.07543944411591699
New Minimum: -70.57945503229853 > -70.69403409371535
WOLFE (weak): th(2.154434690031884)=-70.69403409371535; dx=-0.07532804040388905 evalInputDelta=0.11457906141681917
New Minimum: -70.69403409371535 > -70.80824806208106
WOLFE (weak): th(4.308869380063768)=-70.80824806208106; dx=-0.07537935555438768 evalInputDelta=0.2287930297825369
New Minimum: -70.80824806208106 > -71.26404374426664
WOLFE (weak): th(12.926608140191302)=-71.26404374426664; dx=-0.07512566884969307 evalInputDelta=0.684588711968118
New Minimum: -71.26404374426664 > -73.31329730673076
WOLFE (weak): th(51.70643256076521)=-73.31329730673076; dx=-0.07525238485954987 evalInputDelta=2.7338422744322344
New Minimum: -73.31329730673076 > -83.38967062442642
END: th(258.53216280382605)=-83.38967062442642; dx=-0.06620324934263964 evalInputDelta=12.81021559212789
Fitness changed from -70.57945503229853 to -83.38967062442642
Iteration 1 complete. Error: -83.38967062442642 Total: 5.8301; Orientation: 0.0168; Line Search: 3.9735
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/320d1843-fd09-40dd-ad32-ba5af1a843da.jpg)
Adding measurement 4d10fa82 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-83.38967062442642;dx=-0.08247341328978054
New Minimum: -83.38967062442642 > -109.93086944483227
END: th(556.9906600335335)=-109.93086944483227; dx=-0.06126203066484079 evalInputDelta=26.541198820405853
Fitness changed from -83.38967062442642 to -109.93086944483227
Iteration 2 complete. Error: -109.93086944483227 Total: 2.1173; Orientation: 0.0169; Line Search: 1.5015
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/765cd4e8-7c7c-4c33-9d37-6f63d0e23aab.jpg)
Adding measurement 5295e456 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-109.93086944483227;dx=-0.11357678441656463
New Minimum: -109.93086944483227 > -161.96556995067036
END: th(1200.0)=-161.96556995067036; dx=-0.04081233495658759 evalInputDelta=52.03470050583809
Fitness changed from -109.93086944483227 to -161.96556995067036
Iteration 3 complete. Error: -161.96556995067036 Total: 2.0478; Orientation: 0.0258; Line Search: 1.3539
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/aef05713-3b5c-4ceb-a978-d217ac2adbb0.jpg)
Adding measurement 6e990ab0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.417e+04, gradient 3.511e-01, dot -0.304; [a6c06ac9-b29b-4349-8876-0385a67bf469 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -161.96556995067036, -109.93086944483227, -83.38967062442642, -70.57945503229853
LBFGS Accumulation History: 3 points
Removed measurement 6e990ab0 to history. Total: 3
th(0)=-161.96556995067036;dx=-0.12323422941307507
New Minimum: -161.96556995067036 > -221.12269940776596
END: th(2585.3216280382608)=-221.12269940776596; dx=-0.03165294754906081 evalInputDelta=59.15712945709561
Fitness changed from -161.96556995067036 to -221.12269940776596
Iteration 4 complete. Error: -221.12269940776596 Total: 2.3220; Orientation: 0.3442; Line Search: 1.3245
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/66cb7b97-d1e2-44bf-82a7-cb76c9de7996.jpg)
Adding measurement 73877af9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.585e+04, gradient 3.218e-01, dot -0.251; [a6c06ac9-b29b-4349-8876-0385a67bf469 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -221.12269940776596, -109.93086944483227, -83.38967062442642, -70.57945503229853
LBFGS Accumulation History: 3 points
Removed measurement 73877af9 to history. Total: 3
th(0)=-221.12269940776596;dx=-0.10356277852474598
New Minimum: -221.12269940776596 > -301.2337522442728
END: th(5569.9066003353355)=-301.2337522442728; dx=-0.019848632849073122 evalInputDelta=80.11105283650684
Fitness changed from -221.12269940776596 to -301.2337522442728
Iteration 5 complete. Error: -301.2337522442728 Total: 2.3391; Orientation: 0.3464; Line Search: 1.3463
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/fdef4a83-0d5b-4d05-8ab9-99257f0e04f2.jpg)
Adding measurement 28163302 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.164e+04, gradient 3.274e-01, dot -0.164; [a6c06ac9-b29b-4349-8876-0385a67bf469 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -301.2337522442728, -109.93086944483227, -83.38967062442642, -70.57945503229853
LBFGS Accumulation History: 3 points
Removed measurement 28163302 to history. Total: 3
th(0)=-301.2337522442728;dx=-0.10717257302471296
New Minimum: -301.2337522442728 > -358.2652354877358
END: th(12000.000000000002)=-358.2652354877358; dx=-0.005743370213806778 evalInputDelta=57.031483243463015
Fitness changed from -301.2337522442728 to -358.2652354877358
Iteration 6 complete. Error: -358.2652354877358 Total: 2.2887; Orientation: 0.3445; Line Search: 1.3314
Adding measurement 65ef7bc6 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.760e+03, gradient 3.078e-01, dot -0.120; [a6c06ac9-b29b-4349-8876-0385a67bf469 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -358.2652354877358, -109.93086944483227, -83.38967062442642, -70.57945503229853
LBFGS Accumulation History: 3 points
Removed measurement 65ef7bc6 to history. Total: 3
th(0)=-358.2652354877358;dx=-0.09465785435613387
New Minimum: -358.2652354877358 > -465.1164626152659
END: th(25853.21628038261)=-465.1164626152659; dx=-0.001920469373016439 evalInputDelta=106.85122712753008
Fitness changed from -358.2652354877358 to -465.1164626152659
Iteration 7 complete. Error: -465.1164626152659 Total: 2.2894; Orientation: 0.3460; Line Search: 1.3225
Adding measurement 336d8e7a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.934e+03, gradient 2.566e-01, dot -0.088; [a6c06ac9-b29b-4349-8876-0385a67bf469 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -465.1164626152659, -109.93086944483227, -83.38967062442642, -70.57945503229853
LBFGS Accumulation History: 3 points
Removed measurement 336d8e7a to history. Total: 3
th(0)=-465.1164626152659;dx=-0.06563556957196887
New Minimum: -465.1164626152659 > -510.4746944553184
END: th(55699.066003353364)=-510.4746944553184; dx=-8.462442632593005E-4 evalInputDelta=45.3582318400525
Fitness changed from -465.1164626152659 to -510.4746944553184
Iteration 8 complete. Error: -510.4746944553184 Total: 2.5969; Orientation: 0.3490; Line Search: 1.4070
Adding measurement 677d0a7a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.544e+04, gradient 2.238e-01, dot -0.085; [a6c06ac9-b29b-4349-8876-0385a67bf469 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -510.4746944553184, -109.93086944483227, -83.38967062442642, -70.57945503229853
LBFGS Accumulation History: 3 points
Removed measurement 677d0a7a to history. Total: 3
th(0)=-510.4746944553184;dx=-0.050038490838041155
Armijo: th(120000.00000000004)=-485.08089703057055; dx=-3.6163221129345384E-5 evalInputDelta=-25.393797424747845
New Minimum: -510.4746944553184 > -840.6811270951905
END: th(60000.00000000002)=-840.6811270951905; dx=-0.003387133119838845 evalInputDelta=330.2064326398721
Fitness changed from -510.4746944553184 to -840.6811270951905
Iteration 9 complete. Error: -840.6811270951905 Total: 3.0009; Orientation: 0.3095; Line Search: 2.0916
Adding measurement 70070f61 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.619e+04, gradient 2.185e-01, dot -0.118; [a6c06ac9-b29b-4349-8876-0385a67bf469 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -840.6811270951905, -109.93086944483227, -83.38967062442642, -70.57945503229853
LBFGS Accumulation History: 3 points
Removed measurement 70070f61 to history. Total: 3
th(0)=-840.6811270951905;dx=-0.04764311157494943
Armijo: th(129266.08140191308)=-732.5926214589111; dx=-3.538610236283814E-5 evalInputDelta=-108.08850563627936
New Minimum: -840.6811270951905 > -1201.4553105145878
END: th(64633.04070095654)=-1201.4553105145878; dx=-0.004268736920755619 evalInputDelta=360.77418341939733
Fitness changed from -840.6811270951905 to -1201.4553105145878
Iteration 10 complete. Error: -1201.4553105145878 Total: 2.9893; Orientation: 0.3360; Line Search: 1.9607
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/c88d7b47-644e-4779-a009-217b2f699ea3.jpg)
Adding measurement 50cd3487 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.316e+08, gradient 2.187e-01, dot -0.143; [a6c06ac9-b29b-4349-8876-0385a67bf469 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1201.4553105145878, -109.93086944483227, -83.38967062442642, -70.57945503229853
LBFGS Accumulation History: 3 points
Removed measurement 50cd3487 to history. Total: 3
th(0)=-1201.4553105145878;dx=-0.04780324957916113
Armijo: th(139247.66500838342)=-971.7845904872281; dx=7.311885130256227E-4 evalInputDelta=-229.67072002735972
New Minimum: -1201.4553105145878 > -1574.8007924227309
END: th(69623.83250419171)=-1574.8007924227309; dx=-0.0038592782768389153 evalInputDelta=373.34548190814303
Fitness changed from -1201.4553105145878 to -1574.8007924227309
Iteration 11 complete. Error: -1574.8007924227309 Total: 2.8464; Orientation: 0.3057; Line Search: 1.9251
Adding measurement 13df257f to history. Total: 3
Accepted: LBFGS Orientation magnitude: 1.084e+05, gradient 2.318e-01, dot 0.157; [a6c06ac9-b29b-4349-8876-0385a67bf469 = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-1574.8007924227309;dx=-3941.8726983564675
Armijo: th(150000.00000000006)=-246.50121420961386; dx=0.0061269208787987734 evalInputDelta=-1328.299578213117
Armijo: th(75000.00000000003)=-246.50198162543688; dx=0.012259774240273521 evalInputDelta=-1328.298810797294
Armijo: th(25000.00000000001)=-246.52804684752437; dx=0.03677570049125285 evalInputDelta=-1328.2727455752065
Armijo: th(6250.000000000003)=-246.74445997374255; dx=0.14682976620733668 evalInputDelta=-1328.0563324489883
Armijo: th(1250.0000000000005)=-247.11887844671287; dx=0.7350457330782179 evalInputDelta=-1327.681913976018
Armijo: th(208.3333333333334)=-252.2870549208485; dx=4.38719345950364 evalInputDelta=-1322.5137375018824
Armijo: th(29.76190476190477)=-287.7920159965304; dx=28.995904957058958 evalInputDelta=-1287.0087764262005
Armijo: th(3.7202380952380962)=-492.2433635329978; dx=169.07603045658558 evalInputDelta=-1082.557428889733
Armijo: th(0.4133597883597885)=-1172.9654803366197; dx=235.6823636100186 evalInputDelta=-401.8353120861111
Armijo: th(0.04133597883597885)=-1555.578746437972; dx=-939.8140623768351 evalInputDelta=-19.22204598475878
Armijo: th(0.003757816257816259)=-1574.3047447913038; dx=-1455.968154587169 evalInputDelta=-0.49604763142701813
Armijo: th(3.131513548180216E-4)=-1574.768938644534; dx=-1528.8280090696446 evalInputDelta=-0.031853778196818894
Armijo: th(2.408856575523243E-5)=-1574.798154591761; dx=-1528.2096551820841 evalInputDelta=-0.002637830969888455
Armijo: th(1.7206118396594594E-6)=-1574.8005673883058; dx=-1529.5502107113207 evalInputDelta=-2.2503442505694693E-4
Armijo: th(1.1470745597729729E-7)=-1574.8007352022719; dx=-1532.0764307342363 evalInputDelta=-5.7220458984375E-5
Armijo: th(7.169215998581081E-9)=-1574.8007828859877; dx=-1526.2669038356432 evalInputDelta=-9.5367431640625E-6
Armijo: th(4.217185881518283E-10)=-1574.8007828859877; dx=-1531.3272389244896 evalInputDelta=-9.5367431640625E-6
MIN ALPHA (2.3428810452879348E-11): th(0.0)=-1574.8007924227309
Fitness changed from -1574.8007924227309 to -1574.8007924227309
Static Iteration Total: 14.1913; Orientation: 0.3197; Line Search: 13.2485
Iteration 12 failed. Error: -1574.8007924227309
Previous Error: 0.0 -> -1574.8007924227309
Retrying iteration 12
Reset training subject: 221418237490900
Adding measurement 4a36800 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-1574.8007924227309;dx=-0.05359027535400719
END: th(2.1544346900318838E-10)=-1574.8007924227309; dx=-0.04116950676652126 evalInputDelta=0.0
Fitness changed from -1574.8007924227309 to -1574.8007924227309
Static Iteration Total: 2.4919; Orientation: 0.0177; Line Search: 1.2621
Iteration 13 failed. Error: -1574.8007924227309
Previous Error: 0.0 -> -1574.8007924227309
Optimization terminated 13
Final threshold in iteration 13: -1574.8007924227309 (> -Infinity) after 47.351s (< 5400.000s)

Returns

    -1574.8007924227309