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 79.51 seconds (0.827 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: 303811682428900
Reset training subject: 303813413072600
Adding measurement 5555eb81 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-240.86138972803224;dx=-2.6378615166436858E-5
New Minimum: -240.86138972803224 > -240.86144099800248
END: th(2.154434690031884)=-240.86144099800248; dx=-1.9207883574066778E-5 evalInputDelta=5.1269970242628915E-5
Fitness changed from -240.86138972803224 to -240.86144099800248
Iteration 1 complete. Error: -240.86144099800248 Total: 8.3465; Orientation: 0.0637; Line Search: 3.3012
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/2e67ac52-9f4a-4254-b837-9561e132ddc3.jpg)
Adding measurement 7fbcd3f0 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-240.86144099800248;dx=-1.9027929738973E-5
New Minimum: -240.86144099800248 > -240.8615264479286
WOLFE (weak): th(4.641588833612779)=-240.8615264479286; dx=-1.9024156110938805E-5 evalInputDelta=8.544992613224167E-5
New Minimum: -240.8615264479286 > -240.86163753278728
WOLFE (weak): th(9.283177667225559)=-240.86163753278728; dx=-1.9008586020795717E-5 evalInputDelta=1.9653478480563535E-4
New Minimum: -240.86163753278728 > -240.86203060187583
WOLFE (weak): th(27.849533001676676)=-240.86203060187583; dx=-1.9024776952867477E-5 evalInputDelta=5.896038733510522E-4
New Minimum: -240.86203060187583 > -240.86380794974662
WOLFE (weak): th(111.3981320067067)=-240.86380794974662; dx=-1.9017365821893686E-5 evalInputDelta=0.0023669517441362586
New Minimum: -240.86380794974662 > -240.87331824700135
WOLFE (weak): th(556.9906600335335)=-240.87331824700135; dx=-1.9012983051551102E-5 evalInputDelta=0.011877248998871437
New Minimum: -240.87331824700135 > -240.93269570931216
WOLFE (weak): th(3341.9439602012008)=-240.93269570931216; dx=-1.8988549865828402E-5 evalInputDelta=0.07125471130967753
New Minimum: -240.93269570931216 > -241.3587504108015
WOLFE (weak): th(23393.607721408407)=-241.3587504108015; dx=-1.885601605529192E-5 evalInputDelta=0.4973094127990123
New Minimum: -241.3587504108015 > -244.65553719630304
END: th(187148.86177126726)=-244.65553719630304; dx=-1.7072473718520684E-5 evalInputDelta=3.794096198300565
Fitness changed from -240.86144099800248 to -244.65553719630304
Iteration 2 complete. Error: -244.65553719630304 Total: 16.7761; Orientation: 0.0653; Line Search: 14.9219
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/4832aaf9-db95-4f6f-8e0b-998ee0d2a0bd.jpg)
Adding measurement 62060f8e to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-244.65553719630304;dx=-1.687389910719773E-5
New Minimum: -244.65553719630304 > -251.39869183819525
END: th(403200.00000000006)=-251.39869183819525; dx=-1.3452226086376204E-5 evalInputDelta=6.743154641892204
Fitness changed from -244.65553719630304 to -251.39869183819525
Iteration 3 complete. Error: -251.39869183819525 Total: 5.0550; Orientation: 0.0648; Line Search: 3.1700
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/675ff705-9d42-440f-adaa-2be6e18635b5.jpg)
Adding measurement 361e653f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 9.738e+03, gradient 3.552e-03, dot -0.923; [b40b8ed7-0a69-4e77-9b64-aca770fb027d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -251.39869183819525, -244.65553719630304, -240.86144099800248, -240.86138972803224
LBFGS Accumulation History: 3 points
Removed measurement 361e653f to history. Total: 3
th(0)=-251.39869183819525;dx=-1.2616388506817989E-5
New Minimum: -251.39869183819525 > -261.65497284129094
END: th(868668.0670208557)=-261.65497284129094; dx=-8.737126939149411E-6 evalInputDelta=10.256281003095694
Fitness changed from -251.39869183819525 to -261.65497284129094
Iteration 4 complete. Error: -261.65497284129094 Total: 6.1940; Orientation: 1.1306; Line Search: 3.2118
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/2b7a3f23-9881-41c1-b360-eccd18eba8d6.jpg)
Adding measurement 1641ee27 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.572e+03, gradient 2.860e-03, dot -0.828; [b40b8ed7-0a69-4e77-9b64-aca770fb027d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -261.65497284129094, -244.65553719630304, -240.86144099800248, -240.86138972803224
LBFGS Accumulation History: 3 points
Removed measurement 1641ee27 to history. Total: 3
th(0)=-261.65497284129094;dx=-8.163370272705449E-6
New Minimum: -261.65497284129094 > -274.8721096550519
END: th(1871488.617712673)=-274.8721096550519; dx=-4.992145194481326E-6 evalInputDelta=13.21713681376093
Fitness changed from -261.65497284129094 to -274.8721096550519
Iteration 5 complete. Error: -274.8721096550519 Total: 6.2118; Orientation: 1.1244; Line Search: 3.3033
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/e64e4ff3-f3f5-401d-ba8d-6a1662dafade.jpg)
Adding measurement 770f77f3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.692e+03, gradient 2.333e-03, dot -0.688; [b40b8ed7-0a69-4e77-9b64-aca770fb027d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -274.8721096550519, -244.65553719630304, -240.86144099800248, -240.86138972803224
LBFGS Accumulation History: 3 points
Removed measurement 770f77f3 to history. Total: 3
th(0)=-274.8721096550519;dx=-5.43583151398578E-6
New Minimum: -274.8721096550519 > -292.4704520188991
END: th(4032000.0000000014)=-292.4704520188991; dx=-2.9861641212656783E-6 evalInputDelta=17.598342363847223
Fitness changed from -274.8721096550519 to -292.4704520188991
Iteration 6 complete. Error: -292.4704520188991 Total: 6.1704; Orientation: 1.0540; Line Search: 3.1271
Adding measurement 3ba1b2d4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.225e+04, gradient 2.204e-03, dot -0.634; [b40b8ed7-0a69-4e77-9b64-aca770fb027d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -292.4704520188991, -244.65553719630304, -240.86144099800248, -240.86138972803224
LBFGS Accumulation History: 3 points
Removed measurement 3ba1b2d4 to history. Total: 3
th(0)=-292.4704520188991;dx=-4.8456172366418046E-6
New Minimum: -292.4704520188991 > -306.1232155782279
WOLF (strong): th(8686680.670208558)=-306.1232155782279; dx=2.1890858523841777E-7 evalInputDelta=13.652763559328832
END: th(4343340.335104279)=-304.758732349677; dx=-1.1440025797754848E-6 evalInputDelta=12.288280330777923
Fitness changed from -292.4704520188991 to -306.1232155782279
Iteration 7 complete. Error: -306.1232155782279 Total: 7.7062; Orientation: 1.1229; Line Search: 4.9507
Adding measurement 6ff81b13 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.401e+03, gradient 3.320e-03, dot -0.143; [b40b8ed7-0a69-4e77-9b64-aca770fb027d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -306.1232155782279, -244.65553719630304, -240.86144099800248, -240.86138972803224
LBFGS Accumulation History: 3 points
Removed measurement 6ff81b13 to history. Total: 3
th(0)=-306.1232155782279;dx=-1.1006757410127454E-5
Armijo: th(9357443.088563366)=-286.4314066409225; dx=6.4907104593542685E-6 evalInputDelta=-19.69180893730544
New Minimum: -306.1232155782279 > -319.1276586634044
WOLF (strong): th(4678721.544281683)=-319.1276586634044; dx=4.208852122627058E-6 evalInputDelta=13.00444308517649
New Minimum: -319.1276586634044 > -320.1352977261346
END: th(1559573.8480938943)=-320.1352977261346; dx=-5.182851312146179E-6 evalInputDelta=14.012082147906654
Fitness changed from -306.1232155782279 to -320.1352977261346
Iteration 8 complete. Error: -320.1352977261346 Total: 9.2366; Orientation: 1.0852; Line Search: 6.6470
Adding measurement 62ac24b5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.540e+04, gradient 2.086e-03, dot -0.449; [b40b8ed7-0a69-4e77-9b64-aca770fb027d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -320.1352977261346, -244.65553719630304, -240.86144099800248, -240.86138972803224
LBFGS Accumulation History: 3 points
Removed measurement 62ac24b5 to history. Total: 3
th(0)=-320.1352977261346;dx=-4.341954015422001E-6
New Minimum: -320.1352977261346 > -330.26273930272544
END: th(3360000.0000000014)=-330.26273930272544; dx=-1.2734425780223939E-6 evalInputDelta=10.127441576590854
Fitness changed from -320.1352977261346 to -330.26273930272544
Iteration 9 complete. Error: -330.26273930272544 Total: 5.8204; Orientation: 1.0947; Line Search: 3.1726
Adding measurement 501d07c5 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.159e+04, gradient 1.804e-03, dot -0.554; [b40b8ed7-0a69-4e77-9b64-aca770fb027d = 1.000/1.000e+00]
Orientation rejected. Popping history element from -330.26273930272544, -244.65553719630304, -240.86144099800248, -240.86138972803224
LBFGS Accumulation History: 3 points
Removed measurement 501d07c5 to history. Total: 3
th(0)=-330.26273930272544;dx=-3.2539504494690286E-6
New Minimum: -330.26273930272544 > -337.7818284960293
WOLF (strong): th(7238900.558507132)=-337.7818284960293; dx=3.5726074065909354E-7 evalInputDelta=7.5190891933038415
END: th(3619450.279253566)=-337.525525956824; dx=-8.278391989448965E-7 evalInputDelta=7.262786654098591
Fitness changed from -330.26273930272544 to -337.7818284960293
Iteration 10 complete. Error: -337.7818284960293 Total: 7.7003; Orientation: 1.0463; Line Search: 4.8614
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/6f729a9f-ff55-48f7-bd38-7a760bd9bd1f.jpg)
Final threshold in iteration 11: -337.7818284960293 (> -Infinity) after 79.505s (< 5400.000s)

Returns

    -337.7818284960293