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 7.71 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: 163855008582500
Reset training subject: 163855136033800
Adding measurement 1d284701 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-4.674679074124492;dx=-0.0017929231897953007
New Minimum: -4.674679074124492 > -4.680407011304343
WOLFE (weak): th(2.154434690031884)=-4.680407011304343; dx=-0.0017877580734781398 evalInputDelta=0.005727937179851317
New Minimum: -4.680407011304343 > -4.686135255763438
WOLFE (weak): th(4.308869380063768)=-4.686135255763438; dx=-0.0017892979387200136 evalInputDelta=0.011456181638946461
New Minimum: -4.686135255763438 > -4.709050764459907
WOLFE (weak): th(12.926608140191302)=-4.709050764459907; dx=-0.001777053718750204 evalInputDelta=0.03437169033541565
New Minimum: -4.709050764459907 > -4.8125750342166524
WOLFE (weak): th(51.70643256076521)=-4.8125750342166524; dx=-0.0018257457703168794 evalInputDelta=0.13789596009216076
New Minimum: -4.8125750342166524 > -5.379464024879383
WOLFE (weak): th(258.53216280382605)=-5.379464024879383; dx=-0.0018214063544523223 evalInputDelta=0.7047849507548909
New Minimum: -5.379464024879383 > -9.048815913643466
END: th(1551.1929768229563)=-9.048815913643466; dx=-0.0015910703823854488 evalInputDelta=4.374136839518974
Fitness changed from -4.674679074124492 to -9.048815913643466
Iteration 1 complete. Error: -9.048815913643466 Total: 1.1336; Orientation: 0.0015; Line Search: 0.7846
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/2caa4d8e-b0a8-410c-8840-12a6eb8daa4f.jpg)
Adding measurement 236a40cf to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-9.048815913643466;dx=-0.0021770465353788807
New Minimum: -9.048815913643466 > -17.38487597536699
END: th(3341.943960201201)=-17.38487597536699; dx=-7.303597675514715E-4 evalInputDelta=8.336060061723526
Fitness changed from -9.048815913643466 to -17.38487597536699
Iteration 2 complete. Error: -17.38487597536699 Total: 0.3521; Orientation: 0.0014; Line Search: 0.2269
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/5f72344a-9104-4973-94be-46172af2f204.jpg)
Adding measurement 175e8dd6 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-17.38487597536699;dx=-0.002196084756720043
New Minimum: -17.38487597536699 > -26.126459629196745
END: th(7200.000000000001)=-26.126459629196745; dx=-1.2561477577606938E-4 evalInputDelta=8.741583653829753
Fitness changed from -17.38487597536699 to -26.126459629196745
Iteration 3 complete. Error: -26.126459629196745 Total: 0.3639; Orientation: 0.0016; Line Search: 0.2384
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/f2b65389-4f67-4477-9980-b8fbf2ec6f3f.jpg)
Adding measurement 73d04b1a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.548e+03, gradient 5.539e-02, dot -0.325; [fbca5aa3-7198-4f54-ba58-ce194d6340f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -26.126459629196745, -17.38487597536699, -9.048815913643466, -4.674679074124492
LBFGS Accumulation History: 3 points
Removed measurement 73d04b1a to history. Total: 3
th(0)=-26.126459629196745;dx=-0.0029920308045241345
New Minimum: -26.126459629196745 > -28.74233984348524
WOLF (strong): th(15511.929768229566)=-28.74233984348524; dx=9.154616818028096E-5 evalInputDelta=2.615880214288495
New Minimum: -28.74233984348524 > -35.24405339208875
WOLF (strong): th(7755.964884114783)=-35.24405339208875; dx=5.9839197243400026E-5 evalInputDelta=9.117593762892007
New Minimum: -35.24405339208875 > -35.4977746141488
END: th(2585.3216280382608)=-35.4977746141488; dx=-5.911689338996205E-4 evalInputDelta=9.371314984952058
Fitness changed from -26.126459629196745 to -35.4977746141488
Iteration 4 complete. Error: -35.4977746141488 Total: 0.6040; Orientation: 0.0338; Line Search: 0.4502
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/16355560-27ae-4828-adb1-247797d3be1b.jpg)
Adding measurement d90f708 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.653e+03, gradient 4.249e-02, dot -0.227; [fbca5aa3-7198-4f54-ba58-ce194d6340f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -35.4977746141488, -17.38487597536699, -9.048815913643466, -4.674679074124492
LBFGS Accumulation History: 3 points
Removed measurement d90f708 to history. Total: 3
th(0)=-35.4977746141488;dx=-0.0017641490654366123
New Minimum: -35.4977746141488 > -41.013650610352656
END: th(5569.9066003353355)=-41.013650610352656; dx=-1.1846341316952895E-4 evalInputDelta=5.515875996203853
Fitness changed from -35.4977746141488 to -41.013650610352656
Iteration 5 complete. Error: -41.013650610352656 Total: 0.3678; Orientation: 0.0279; Line Search: 0.2183
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/8cfb2999-8bac-4ad2-98db-286600434bc5.jpg)
Adding measurement 4dfcae0a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.690e+03, gradient 6.302e-02, dot -0.272; [fbca5aa3-7198-4f54-ba58-ce194d6340f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -41.013650610352656, -17.38487597536699, -9.048815913643466, -4.674679074124492
LBFGS Accumulation History: 3 points
Removed measurement 4dfcae0a to history. Total: 3
th(0)=-41.013650610352656;dx=-0.0038694246192249896
New Minimum: -41.013650610352656 > -42.948394923939745
WOLF (strong): th(12000.000000000002)=-42.948394923939745; dx=2.5767534225181295E-4 evalInputDelta=1.934744313587089
New Minimum: -42.948394923939745 > -48.65128740308223
WOLF (strong): th(6000.000000000001)=-48.65128740308223; dx=1.9161808195136028E-4 evalInputDelta=7.637636792729573
New Minimum: -48.65128740308223 > -49.10927614301865
END: th(2000.0000000000002)=-49.10927614301865; dx=-1.5265361768595516E-4 evalInputDelta=8.095625532665991
Fitness changed from -41.013650610352656 to -49.10927614301865
Iteration 6 complete. Error: -49.10927614301865 Total: 0.5998; Orientation: 0.0273; Line Search: 0.4438
Adding measurement 40144f24 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.489e+03, gradient 3.938e-02, dot -0.289; [fbca5aa3-7198-4f54-ba58-ce194d6340f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -49.10927614301865, -17.38487597536699, -9.048815913643466, -4.674679074124492
LBFGS Accumulation History: 3 points
Removed measurement 40144f24 to history. Total: 3
th(0)=-49.10927614301865;dx=-0.0015273072957333353
New Minimum: -49.10927614301865 > -52.93092938560981
END: th(4308.869380063768)=-52.93092938560981; dx=-2.9307694073480238E-5 evalInputDelta=3.821653242591161
Fitness changed from -49.10927614301865 to -52.93092938560981
Iteration 7 complete. Error: -52.93092938560981 Total: 0.3543; Orientation: 0.0285; Line Search: 0.2179
Adding measurement 462c8fd1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 8.172e+03, gradient 5.374e-02, dot -0.281; [fbca5aa3-7198-4f54-ba58-ce194d6340f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -52.93092938560981, -17.38487597536699, -9.048815913643466, -4.674679074124492
LBFGS Accumulation History: 3 points
Removed measurement 462c8fd1 to history. Total: 3
th(0)=-52.93092938560981;dx=-0.002836476866805031
New Minimum: -52.93092938560981 > -58.65402562788374
WOLF (strong): th(9283.17766722556)=-58.65402562788374; dx=5.340807771680111E-5 evalInputDelta=5.723096242273932
New Minimum: -58.65402562788374 > -59.52265578747547
WOLF (strong): th(4641.58883361278)=-59.52265578747547; dx=2.891825173298474E-4 evalInputDelta=6.591726401865664
END: th(1547.1962778709267)=-58.58236064368021; dx=-7.398487292077044E-4 evalInputDelta=5.651431258070403
Fitness changed from -52.93092938560981 to -59.52265578747547
Iteration 8 complete. Error: -59.52265578747547 Total: 0.5913; Orientation: 0.0270; Line Search: 0.4517
Adding measurement 738b148f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.442e+03, gradient 4.787e-02, dot -0.227; [fbca5aa3-7198-4f54-ba58-ce194d6340f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -59.52265578747547, -17.38487597536699, -9.048815913643466, -4.674679074124492
LBFGS Accumulation History: 3 points
Removed measurement 738b148f to history. Total: 3
th(0)=-59.52265578747547;dx=-0.0022446809899192505
New Minimum: -59.52265578747547 > -67.35942424608659
END: th(3333.3333333333344)=-67.35942424608659; dx=-5.881116886791986E-4 evalInputDelta=7.836768458611118
Fitness changed from -59.52265578747547 to -67.35942424608659
Iteration 9 complete. Error: -67.35942424608659 Total: 0.3570; Orientation: 0.0287; Line Search: 0.2205
Adding measurement 173036c0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.995e+03, gradient 3.638e-02, dot -0.383; [fbca5aa3-7198-4f54-ba58-ce194d6340f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -67.35942424608659, -17.38487597536699, -9.048815913643466, -4.674679074124492
LBFGS Accumulation History: 3 points
Removed measurement 173036c0 to history. Total: 3
th(0)=-67.35942424608659;dx=-0.0012933682128541193
New Minimum: -67.35942424608659 > -75.68948597092951
END: th(7181.448966772949)=-75.68948597092951; dx=-4.478152042304325E-4 evalInputDelta=8.33006172484292
Fitness changed from -67.35942424608659 to -75.68948597092951
Iteration 10 complete. Error: -75.68948597092951 Total: 0.3736; Orientation: 0.0306; Line Search: 0.2317
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/9347b829-51e8-485f-be36-f1500827fe8f.jpg)
Adding measurement 75596db2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.354e+04, gradient 4.005e-02, dot -0.342; [fbca5aa3-7198-4f54-ba58-ce194d6340f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -75.68948597092951, -17.38487597536699, -9.048815913643466, -4.674679074124492
LBFGS Accumulation History: 3 points
Removed measurement 75596db2 to history. Total: 3
th(0)=-75.68948597092951;dx=-0.0015574970315870792
New Minimum: -75.68948597092951 > -75.90321343917851
WOLF (strong): th(15471.96277870927)=-75.90321343917851; dx=2.3678401877520164E-4 evalInputDelta=0.21372746824900446
New Minimum: -75.90321343917851 > -81.50787201202293
WOLF (strong): th(7735.981389354635)=-81.50787201202293; dx=6.0316828309904346E-5 evalInputDelta=5.818386041093419
END: th(2578.6604631182117)=-80.17718376724471; dx=-7.734546606319588E-4 evalInputDelta=4.487697796315203
Fitness changed from -75.68948597092951 to -81.50787201202293
Iteration 11 complete. Error: -81.50787201202293 Total: 0.6016; Orientation: 0.0284; Line Search: 0.4537
Adding measurement 2302a222 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.497e+04, gradient 5.011e-02, dot -0.324; [fbca5aa3-7198-4f54-ba58-ce194d6340f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -81.50787201202293, -17.38487597536699, -9.048815913643466, -4.674679074124492
LBFGS Accumulation History: 3 points
Removed measurement 2302a222 to history. Total: 3
th(0)=-81.50787201202293;dx=-0.00244660102197527
New Minimum: -81.50787201202293 > -93.05395195708921
WOLF (strong): th(5555.555555555558)=-93.05395195708921; dx=2.035477281277028E-4 evalInputDelta=11.546079945066282
END: th(2777.777777777779)=-90.67404014540911; dx=-8.281219912388672E-4 evalInputDelta=9.16616813338618
Fitness changed from -81.50787201202293 to -93.05395195708921
Iteration 12 complete. Error: -93.05395195708921 Total: 0.5108; Orientation: 0.0276; Line Search: 0.3733
Adding measurement 4fe2ccfa to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.876e+04, gradient 4.185e-02, dot -0.305; [fbca5aa3-7198-4f54-ba58-ce194d6340f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -93.05395195708921, -17.38487597536699, -9.048815913643466, -4.674679074124492
LBFGS Accumulation History: 3 points
Removed measurement 4fe2ccfa to history. Total: 3
th(0)=-93.05395195708921;dx=-0.0017021274554317337
New Minimum: -93.05395195708921 > -98.66491864683398
WOLF (strong): th(5984.540805644125)=-98.66491864683398; dx=1.4001109808557717E-5 evalInputDelta=5.610966689744771
END: th(2992.2704028220624)=-98.21860967275997; dx=-7.844335813632022E-4 evalInputDelta=5.1646577156707565
Fitness changed from -93.05395195708921 to -98.66491864683398
Iteration 13 complete. Error: -98.66491864683398 Total: 0.5489; Orientation: 0.0336; Line Search: 0.3945
Adding measurement fb1d922 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.522e+04, gradient 4.210e-02, dot -0.404; [fbca5aa3-7198-4f54-ba58-ce194d6340f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -98.66491864683398, -17.38487597536699, -9.048815913643466, -4.674679074124492
LBFGS Accumulation History: 3 points
Removed measurement fb1d922 to history. Total: 3
th(0)=-98.66491864683398;dx=-0.00173225836766137
New Minimum: -98.66491864683398 > -109.22310103287768
END: th(6446.65115779553)=-109.22310103287768; dx=-6.778417430941633E-5 evalInputDelta=10.558182386043697
Fitness changed from -98.66491864683398 to -109.22310103287768
Iteration 14 complete. Error: -109.22310103287768 Total: 0.4122; Orientation: 0.0326; Line Search: 0.2614
Adding measurement 2a97487d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.539e+04, gradient 3.780e-02, dot -0.372; [fbca5aa3-7198-4f54-ba58-ce194d6340f2 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -109.22310103287768, -17.38487597536699, -9.048815913643466, -4.674679074124492
LBFGS Accumulation History: 3 points
Removed measurement 2a97487d to history. Total: 3
th(0)=-109.22310103287768;dx=-0.0014047916275441706
New Minimum: -109.22310103287768 > -110.21200060172849
WOLF (strong): th(13888.888888888898)=-110.21200060172849; dx=4.667727731042523E-4 evalInputDelta=0.9888995688508118
New Minimum: -110.21200060172849 > -116.0617224908956
END: th(6944.444444444449)=-116.0617224908956; dx=-2.588850113368605E-4 evalInputDelta=6.838621458017926
Fitness changed from -109.22310103287768 to -116.0617224908956
Iteration 15 complete. Error: -116.0617224908956 Total: 0.5289; Orientation: 0.0350; Line Search: 0.3789
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/7487a501-702d-4d53-aa8f-0b153cf31f0a.jpg)
Final threshold in iteration 16: -116.0617224908956 (> -Infinity) after 7.714s (< 5400.000s)

Returns

    -116.0617224908956