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 199.48 seconds (2.980 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: 13578423869482
Reset training subject: 13583245147822
Adding measurement 404acd1a to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.13313744962215424;dx=-5.616096468323358E-7
New Minimum: -0.13313744962215424 > -0.1331377476453781
WOLFE (weak): th(2.154434690031884)=-0.1331377476453781; dx=-5.101933081608746E-7 evalInputDelta=2.980232238769531E-7
New Minimum: -0.1331377476453781 > -0.13313837349414825
WOLFE (weak): th(4.308869380063768)=-0.13313837349414825; dx=-5.101801820849337E-7 evalInputDelta=9.238719940185547E-7
New Minimum: -0.13313837349414825 > -0.1331406533718109
WOLFE (weak): th(12.926608140191302)=-0.1331406533718109; dx=-5.101732763346496E-7 evalInputDelta=3.203749656677246E-6
New Minimum: -0.1331406533718109 > -0.13315057754516602
WOLFE (weak): th(51.70643256076521)=-0.13315057754516602; dx=-5.101945632977562E-7 evalInputDelta=1.3127923011779785E-5
New Minimum: -0.13315057754516602 > -0.1332034170627594
WOLFE (weak): th(258.53216280382605)=-0.1332034170627594; dx=-5.101645390782385E-7 evalInputDelta=6.596744060516357E-5
New Minimum: -0.1332034170627594 > -0.13353310525417328
WOLFE (weak): th(1551.1929768229563)=-0.13353310525417328; dx=-5.100074766540458E-7 evalInputDelta=3.9565563201904297E-4
New Minimum: -0.13353310525417328 > -0.1359032839536667
WOLFE (weak): th(10858.350837760694)=-0.1359032839536667; dx=-5.085927751617914E-7 evalInputDelta=0.002765834331512451
New Minimum: -0.1359032839536667 > -0.15500186383724213
END: th(86866.80670208555)=-0.15500186383724213; dx=-4.967489329072312E-7 evalInputDelta=0.02186441421508789
Fitness changed from -0.13313744962215424 to -0.15500186383724213
Iteration 1 complete. Error: -0.15500186383724213 Total: 52.5084; Orientation: 0.0476; Line Search: 39.2500
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/ac449ee9-effe-479f-ab5e-ca68e192d457.jpg)

    Adding measurement 76970b70 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=-0.15500186383724213;dx=-4.873246923814389E-7
    New Minimum: -0.15500186383724213 > -0.19932176172733307
    WOLFE (weak): th(187148.86177126726)=-0.19932176172733307; dx=-4.5941282000214736E-7 evalInputDelta=0.04431989789009094
    New Minimum: -0.19932176172733307 > -0.2409607470035553
    END: th(374297.7235425345)=-0.2409607470035553; dx=-4.299630518314241E-7 evalInputDelta=0.08595888316631317
    Fitness changed from -0.15500186383724213 to -0.2409607470035553
    Iteration 2 complete. Error: -0.2409607470035553 Total: 18.0617; Orientation: 0.0442; Line Search: 13.7556
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/59889c78-17ac-4abc-b3bb-87766c4279df.jpg)

    Adding measurement 1dfb1def to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=-0.2409607470035553;dx=-3.9869349721518084E-7
    New Minimum: -0.2409607470035553 > -0.38429373502731323
    END: th(806400.0000000001)=-0.38429373502731323; dx=-3.130642899317013E-7 evalInputDelta=0.14333298802375793
    Fitness changed from -0.2409607470035553 to -0.38429373502731323
    Iteration 3 complete. Error: -0.38429373502731323 Total: 12.5888; Orientation: 0.0497; Line Search: 8.2026
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/37ca606d-86e2-4780-9921-22984ba7cd67.jpg)

    Adding measurement 37d31990 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.180e+03, gradient 5.310e-04, dot -0.928; [93011206-2bb2-403b-8478-47fba2b2a60e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.38429373502731323, -0.2409607470035553, -0.15500186383724213, -0.13313744962215424
    LBFGS Accumulation History: 3 points
    Removed measurement 37d31990 to history. Total: 3
    th(0)=-0.38429373502731323;dx=-2.819296158095637E-7
    New Minimum: -0.38429373502731323 > -0.5897763669490814
    END: th(1737336.1340417115)=-0.5897763669490814; dx=-1.9528719897626193E-7 evalInputDelta=0.2054826319217682
    Fitness changed from -0.38429373502731323 to -0.5897763669490814
    Iteration 4 complete. Error: -0.5897763669490814 Total: 14.3957; Orientation: 1.0316; Line Search: 9.2300
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/d7373763-9d7b-424a-a0e5-65f9bd9bb4d7.jpg)

    Adding measurement 97d5a39 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.844e+03, gradient 4.286e-04, dot -0.839; [93011206-2bb2-403b-8478-47fba2b2a60e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.5897763669490814, -0.2409607470035553, -0.15500186383724213, -0.13313744962215424
    LBFGS Accumulation History: 3 points
    Removed measurement 97d5a39 to history. Total: 3
    th(0)=-0.5897763669490814;dx=-1.836635476469373E-7
    New Minimum: -0.5897763669490814 > -0.8520868718624115
    END: th(3742977.235425346)=-0.8520868718624115; dx=-1.060546405742413E-7 evalInputDelta=0.2623105049133301
    Fitness changed from -0.5897763669490814 to -0.8520868718624115
    Iteration 5 complete. Error: -0.8520868718624115 Total: 13.0482; Orientation: 1.0131; Line Search: 7.9937
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/2507782c-33b4-48b7-b0f9-88e3325d7a03.jpg)

    Adding measurement 2206222b to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.849e+03, gradient 3.481e-04, dot -0.723; [93011206-2bb2-403b-8478-47fba2b2a60e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.8520868718624115, -0.2409607470035553, -0.15500186383724213, -0.13313744962215424
    LBFGS Accumulation History: 3 points
    Removed measurement 2206222b to history. Total: 3
    th(0)=-0.8520868718624115;dx=-1.211700935482644E-7
    New Minimum: -0.8520868718624115 > -1.1408196985721588
    END: th(8064000.000000003)=-1.1408196985721588; dx=-4.169314764610686E-8 evalInputDelta=0.2887328267097473
    Fitness changed from -0.8520868718624115 to -1.1408196985721588
    Iteration 6 complete. Error: -1.1408196985721588 Total: 14.8845; Orientation: 1.0122; Line Search: 9.4337
    Adding measurement 433db1a4 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.914e+03, gradient 3.180e-04, dot -0.487; [93011206-2bb2-403b-8478-47fba2b2a60e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.1408196985721588, -0.2409607470035553, -0.15500186383724213, -0.13313744962215424
    LBFGS Accumulation History: 3 points
    Removed measurement 433db1a4 to history. Total: 3
    th(0)=-1.1408196985721588;dx=-1.0112955533314005E-7
    New Minimum: -1.1408196985721588 > -1.3129438310861588
    WOLF (strong): th(1.7373361340417117E7)=-1.3129438310861588; dx=9.364181533920356E-9 evalInputDelta=0.17212413251399994
    New Minimum: -1.3129438310861588 > -1.3269050270318985
    END: th(8686680.670208558)=-1.3269050270318985; dx=-7.1734298691082176E-9 evalInputDelta=0.18608532845973969
    Fitness changed from -1.1408196985721588 to -1.3269050270318985
    Iteration 7 complete. Error: -1.3269050270318985 Total: 18.1354; Orientation: 1.0316; Line Search: 12.7216
    Adding measurement 19e77578 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.056e+03, gradient 2.999e-04, dot -0.405; [93011206-2bb2-403b-8478-47fba2b2a60e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.3269050270318985, -0.2409607470035553, -0.15500186383724213, -0.13313744962215424
    LBFGS Accumulation History: 3 points
    Removed measurement 19e77578 to history. Total: 3
    th(0)=-1.3269050270318985;dx=-8.992165991883716E-8
    New Minimum: -1.3269050270318985 > -1.3743001371622086
    WOLF (strong): th(1.871488617712673E7)=-1.3743001371622086; dx=2.694751232449793E-8 evalInputDelta=0.04739511013031006
    New Minimum: -1.3743001371622086 > -1.4783030152320862
    WOLF (strong): th(9357443.088563366)=-1.4783030152320862; dx=8.664708879423548E-9 evalInputDelta=0.15139798820018768
    END: th(3119147.6961877886)=-1.4300386160612106; dx=-4.4428958752361385E-8 evalInputDelta=0.10313358902931213
    Fitness changed from -1.3269050270318985 to -1.4783030152320862
    Iteration 8 complete. Error: -1.4783030152320862 Total: 23.2679; Orientation: 1.0339; Line Search: 18.3099
    Adding measurement 59a36a54 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 1.986e+03, gradient 2.736e-04, dot -0.349; [93011206-2bb2-403b-8478-47fba2b2a60e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.4783030152320862, -0.2409607470035553, -0.15500186383724213, -0.13313744962215424
    LBFGS Accumulation History: 3 points
    Removed measurement 59a36a54 to history. Total: 3
    th(0)=-1.4783030152320862;dx=-7.484188072559459E-8
    New Minimum: -1.4783030152320862 > -1.6031115353107452
    END: th(6720000.000000003)=-1.6031115353107452; dx=-1.0127411398241304E-8 evalInputDelta=0.12480852007865906
    Fitness changed from -1.4783030152320862 to -1.6031115353107452
    Iteration 9 complete. Error: -1.6031115353107452 Total: 14.0619; Orientation: 1.0098; Line Search: 8.6920
    Adding measurement 13b92dd3 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 2.307e+03, gradient 1.841e-04, dot -0.517; [93011206-2bb2-403b-8478-47fba2b2a60e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.6031115353107452, -0.2409607470035553, -0.15500186383724213, -0.13313744962215424
    LBFGS Accumulation History: 3 points
    Removed measurement 13b92dd3 to history. Total: 3
    th(0)=-1.6031115353107452;dx=-3.39082061487265E-8
    New Minimum: -1.6031115353107452 > -1.7107288837432861
    WOLF (strong): th(1.4477801117014265E7)=-1.7107288837432861; dx=1.6294025180068796E-9 evalInputDelta=0.1076173484325409
    END: th(7238900.558507132)=-1.6891659200191498; dx=-1.444139720717521E-8 evalInputDelta=0.08605438470840454
    Fitness changed from -1.6031115353107452 to -1.7107288837432861
    Iteration 10 complete. Error: -1.7107288837432861 Total: 18.4599; Orientation: 1.0350; Line Search: 13.1782
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/bab03da7-7e9f-47a8-bce8-dab2d3390a92.jpg)

    Final threshold in iteration 11: -1.7107288837432861 (> -Infinity) after 199.480s (< 5400.000s)

Returns

    -1.7107288837432861