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 133.56 seconds (2.568 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: 331665128639400
Reset training subject: 331667717823400
Adding measurement 131a1edb to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-120.10288286092417;dx=-2.927109473018172E-5
New Minimum: -120.10288286092417 > -120.10293505949164
END: th(2.154434690031884)=-120.10293505949164; dx=-2.131994851722967E-5 evalInputDelta=5.219856747373797E-5
Fitness changed from -120.10288286092417 to -120.10293505949164
Iteration 1 complete. Error: -120.10293505949164 Total: 12.9087; Orientation: 0.0613; Line Search: 5.0653
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/7358e13d-e0d4-4239-920d-17f76600a486.jpg)
Adding measurement 661dd6b6 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-120.10293505949164;dx=-2.1184245281159765E-5
New Minimum: -120.10293505949164 > -120.1030474870984
WOLFE (weak): th(4.641588833612779)=-120.1030474870984; dx=-2.1169799473404087E-5 evalInputDelta=1.1242760675145291E-4
New Minimum: -120.1030474870984 > -120.1031599145999
WOLFE (weak): th(9.283177667225559)=-120.1031599145999; dx=-2.1168389322714896E-5 evalInputDelta=2.248551082573158E-4
New Minimum: -120.1031599145999 > -120.10360962355348
WOLFE (weak): th(27.849533001676676)=-120.10360962355348; dx=-2.1160430299941567E-5 evalInputDelta=6.74564061839078E-4
New Minimum: -120.10360962355348 > -120.10560117153611
WOLFE (weak): th(111.3981320067067)=-120.10560117153611; dx=-2.114291021729262E-5 evalInputDelta=0.0026661120444657627
New Minimum: -120.10560117153611 > -120.11625298345673
WOLFE (weak): th(556.9906600335335)=-120.11625298345673; dx=-2.1137934531944388E-5 evalInputDelta=0.013317923965090017
New Minimum: -120.11625298345673 > -120.18276027703881
WOLFE (weak): th(3341.9439602012008)=-120.18276027703881; dx=-2.1121204698877684E-5 evalInputDelta=0.07982521754716743
New Minimum: -120.18276027703881 > -120.65982721572568
WOLFE (weak): th(23393.607721408407)=-120.65982721572568; dx=-2.0960457115114108E-5 evalInputDelta=0.5568921562340421
New Minimum: -120.65982721572568 > -124.40365392857056
WOLFE (weak): th(187148.86177126726)=-124.40365392857056; dx=-1.943011188127297E-5 evalInputDelta=4.300718869078921
New Minimum: -124.40365392857056 > -144.41476209701207
END: th(1684339.7559414054)=-144.41476209701207; dx=-5.6133949483270845E-6 evalInputDelta=24.31182703752043
Fitness changed from -120.10293505949164 to -144.41476209701207
Iteration 2 complete. Error: -144.41476209701207 Total: 28.8155; Orientation: 0.0601; Line Search: 25.8701
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/2ef89613-a497-4318-bd7f-ea492058bcf5.jpg)
Adding measurement 5a854e33 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-144.41476209701207;dx=-1.0018029019014149E-5
New Minimum: -144.41476209701207 > -161.6818181592055
END: th(3628800.0000000005)=-161.6818181592055; dx=-7.494039213400608E-7 evalInputDelta=17.267056062193433
Fitness changed from -144.41476209701207 to -161.6818181592055
Iteration 3 complete. Error: -161.6818181592055 Total: 8.0895; Orientation: 0.0608; Line Search: 5.0844
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/af901826-93be-46e6-8694-43db9733595f.jpg)
Adding measurement 54b86096 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.427e+03, gradient 3.155e-03, dot -0.310; [1fb1fb93-6728-40ad-b059-6dc745e80933 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -161.6818181592055, -144.41476209701207, -120.10293505949164, -120.10288286092417
LBFGS Accumulation History: 3 points
Removed measurement 54b86096 to history. Total: 3
th(0)=-161.6818181592055;dx=-9.928245567546174E-6
Armijo: th(7818012.603187701)=-157.3540933519676; dx=3.3548294252237543E-6 evalInputDelta=-4.3277248072378995
New Minimum: -161.6818181592055 > -171.62817568999648
WOLF (strong): th(3909006.3015938504)=-171.62817568999648; dx=2.0126481912859283E-6 evalInputDelta=9.946357530790976
END: th(1303002.1005312835)=-171.39846440580175; dx=-3.750072766551145E-6 evalInputDelta=9.716646246596241
Fitness changed from -161.6818181592055 to -171.62817568999648
Iteration 4 complete. Error: -171.62817568999648 Total: 14.2092; Orientation: 1.0253; Line Search: 10.2122
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/c05ee258-dc99-4556-bf3b-3b0b8ef31ed7.jpg)
Adding measurement 365165f9 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.000e+03, gradient 3.251e-03, dot -0.195; [1fb1fb93-6728-40ad-b059-6dc745e80933 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -171.62817568999648, -144.41476209701207, -120.10293505949164, -120.10288286092417
LBFGS Accumulation History: 3 points
Removed measurement 365165f9 to history. Total: 3
th(0)=-171.62817568999648;dx=-1.0555232814009389E-5
New Minimum: -171.62817568999648 > -185.66599200328253
WOLF (strong): th(2807232.926569009)=-185.66599200328253; dx=8.004298553225415E-7 evalInputDelta=14.037816313286044
END: th(1403616.4632845046)=-183.37479983219382; dx=-4.309280953478071E-6 evalInputDelta=11.746624142197334
Fitness changed from -171.62817568999648 to -185.66599200328253
Iteration 5 complete. Error: -185.66599200328253 Total: 12.0944; Orientation: 1.0240; Line Search: 7.9016
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/df9eef27-4c3e-4660-b0f7-614c38ffbafb.jpg)
Adding measurement 4edabb4b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.099e+04, gradient 2.496e-03, dot -0.341; [1fb1fb93-6728-40ad-b059-6dc745e80933 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -185.66599200328253, -144.41476209701207, -120.10293505949164, -120.10288286092417
LBFGS Accumulation History: 3 points
Removed measurement 4edabb4b to history. Total: 3
th(0)=-185.66599200328253;dx=-6.2183582133813685E-6
New Minimum: -185.66599200328253 > -194.18418277054852
WOLF (strong): th(3024000.0000000005)=-194.18418277054852; dx=4.212542328755204E-7 evalInputDelta=8.518190767265992
END: th(1512000.0000000002)=-192.85826346765694; dx=-2.4966643788502537E-6 evalInputDelta=7.192271464374414
Fitness changed from -185.66599200328253 to -194.18418277054852
Iteration 6 complete. Error: -194.18418277054852 Total: 11.4717; Orientation: 0.9729; Line Search: 7.6211
Adding measurement 4846f16e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.656e+04, gradient 2.390e-03, dot -0.399; [1fb1fb93-6728-40ad-b059-6dc745e80933 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -194.18418277054852, -144.41476209701207, -120.10293505949164, -120.10288286092417
LBFGS Accumulation History: 3 points
Removed measurement 4846f16e to history. Total: 3
th(0)=-194.18418277054852;dx=-5.700171839845426E-6
New Minimum: -194.18418277054852 > -200.5215117979615
WOLF (strong): th(3257505.251328209)=-200.5215117979615; dx=1.275907477457603E-6 evalInputDelta=6.337329027412977
New Minimum: -200.5215117979615 > -200.72116834611657
END: th(1628752.6256641045)=-200.72116834611657; dx=-1.6587007888204878E-6 evalInputDelta=6.536985575568053
Fitness changed from -194.18418277054852 to -200.72116834611657
Iteration 7 complete. Error: -200.72116834611657 Total: 11.2758; Orientation: 0.9633; Line Search: 7.8497
Adding measurement 6c79dde5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.138e+04, gradient 1.660e-03, dot -0.631; [1fb1fb93-6728-40ad-b059-6dc745e80933 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -200.72116834611657, -144.41476209701207, -120.10293505949164, -120.10288286092417
LBFGS Accumulation History: 3 points
Removed measurement 6c79dde5 to history. Total: 3
th(0)=-200.72116834611657;dx=-2.7514705922700357E-6
New Minimum: -200.72116834611657 > -207.47113485612903
END: th(3509041.158211262)=-207.47113485612903; dx=-1.0881605953311508E-6 evalInputDelta=6.749966510012456
Fitness changed from -200.72116834611657 to -207.47113485612903
Iteration 8 complete. Error: -207.47113485612903 Total: 8.4287; Orientation: 0.9975; Line Search: 5.0673
Adding measurement 3afce32c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.243e+04, gradient 1.907e-03, dot -0.496; [1fb1fb93-6728-40ad-b059-6dc745e80933 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -207.47113485612903, -144.41476209701207, -120.10293505949164, -120.10288286092417
LBFGS Accumulation History: 3 points
Removed measurement 3afce32c to history. Total: 3
th(0)=-207.47113485612903;dx=-3.6305376708521053E-6
Armijo: th(7560000.000000003)=-207.02027831339436; dx=1.356938692823581E-6 evalInputDelta=-0.4508565427346696
New Minimum: -207.47113485612903 > -211.88558903856523
WOLF (strong): th(3780000.0000000014)=-211.88558903856523; dx=3.8577135152594766E-7 evalInputDelta=4.414454182436202
END: th(1260000.0000000005)=-211.0320912484787; dx=-1.6619633103300803E-6 evalInputDelta=3.5609563923496808
Fitness changed from -207.47113485612903 to -211.88558903856523
Iteration 9 complete. Error: -211.88558903856523 Total: 13.8325; Orientation: 1.0221; Line Search: 10.3197
Adding measurement 7044aa59 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.089e+04, gradient 2.311e-03, dot -0.347; [1fb1fb93-6728-40ad-b059-6dc745e80933 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -211.88558903856523, -144.41476209701207, -120.10293505949164, -120.10288286092417
LBFGS Accumulation History: 3 points
Removed measurement 7044aa59 to history. Total: 3
th(0)=-211.88558903856523;dx=-5.331400505865959E-6
New Minimum: -211.88558903856523 > -218.19500320728517
WOLF (strong): th(2714587.7094401745)=-218.19500320728517; dx=7.325198820239296E-7 evalInputDelta=6.30941416871994
END: th(1357293.8547200873)=-217.48830457337294; dx=-2.151959569785883E-6 evalInputDelta=5.6027155348077144
Fitness changed from -211.88558903856523 to -218.19500320728517
Iteration 10 complete. Error: -218.19500320728517 Total: 11.8797; Orientation: 0.9491; Line Search: 7.5656
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/85bca6fe-42af-42e8-8b79-4b42d8190fa6.jpg)
Final threshold in iteration 11: -218.19500320728517 (> -Infinity) after 133.564s (< 5400.000s)

Returns

    -218.19500320728517