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 225.60 seconds (2.897 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: 2906855333315
Reset training subject: 2911010648341
Adding measurement 61f55165 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=2.6859212815761566;dx=-5.322524099284987E-7
New Minimum: 2.6859212815761566 > 2.6859209090471268
END: th(2.154434690031884)=2.6859209090471268; dx=-4.723241179468882E-7 evalInputDelta=3.725290298461914E-7
Fitness changed from 2.6859212815761566 to 2.6859209090471268
Iteration 1 complete. Error: 2.6859209090471268 Total: 21.3409; Orientation: 0.0482; Line Search: 8.6151
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/1bd75bc6-a03a-4ec6-a164-86b3eac9ed79.jpg)

    Adding measurement 3ffa4a89 to history. Total: 1
    LBFGS Accumulation History: 2 points
    th(0)=2.6859209090471268;dx=-4.728845990295862E-7
    New Minimum: 2.6859209090471268 > 2.6859195977449417
    WOLFE (weak): th(4.641588833612779)=2.6859195977449417; dx=-4.710789112391775E-7 evalInputDelta=1.3113021850585938E-6
    New Minimum: 2.6859195977449417 > 2.6859184205532074
    WOLFE (weak): th(9.283177667225559)=2.6859184205532074; dx=-4.710735451311548E-7 evalInputDelta=2.4884939193725586E-6
    New Minimum: 2.6859184205532074 > 2.6859140396118164
    WOLFE (weak): th(27.849533001676676)=2.6859140396118164; dx=-4.7086911756392855E-7 evalInputDelta=6.8694353103637695E-6
    New Minimum: 2.6859140396118164 > 2.6858943700790405
    WOLFE (weak): th(111.3981320067067)=2.6858943700790405; dx=-4.7068189790116066E-7 evalInputDelta=2.6538968086242676E-5
    New Minimum: 2.6858943700790405 > 2.685789629817009
    WOLFE (weak): th(556.9906600335335)=2.685789629817009; dx=-4.7070966701304126E-7 evalInputDelta=1.3127923011779785E-4
    New Minimum: 2.685789629817009 > 2.685133785009384
    WOLFE (weak): th(3341.9439602012008)=2.685133785009384; dx=-4.709882427549007E-7 evalInputDelta=7.871240377426147E-4
    New Minimum: 2.685133785009384 > 2.680403381586075
    WOLFE (weak): th(23393.607721408407)=2.680403381586075; dx=-4.725881569350802E-7 evalInputDelta=0.005517527461051941
    New Minimum: 2.680403381586075 > 2.6409574151039124
    WOLFE (weak): th(187148.86177126726)=2.6409574151039124; dx=-4.873424891214077E-7 evalInputDelta=0.044963493943214417
    New Minimum: 2.6409574151039124 > 2.2898266911506653
    WOLFE (weak): th(1684339.7559414054)=2.2898266911506653; dx=-4.346853520847071E-7 evalInputDelta=0.3960942178964615
    New Minimum: 2.2898266911506653 > 0.8073548674583435
    END: th(1.6843397559414055E7)=0.8073548674583435; dx=-6.59373117517601E-8 evalInputDelta=1.8785660415887833
    Fitness changed from 2.6859209090471268 to 0.8073548674583435
    Iteration 2 complete. Error: 0.8073548674583435 Total: 53.7972; Orientation: 0.0439; Line Search: 49.2844
    <a id="p-5"></a>Iteration 2
    <a id="p-4"></a>![Iteration 2](etc/d0553949-06a9-4e9c-a374-8970deb9066a.jpg)

    Adding measurement 1236eee5 to history. Total: 2
    LBFGS Accumulation History: 3 points
    th(0)=0.8073548674583435;dx=-2.448008579585526E-7
    New Minimum: 0.8073548674583435 > 0.11617869138717651
    WOLF (strong): th(3.628800000000001E7)=0.11617869138717651; dx=4.072010844924751E-8 evalInputDelta=0.691176176071167
    New Minimum: 0.11617869138717651 > -0.035629212856292725
    END: th(1.8144000000000004E7)=-0.035629212856292725; dx=-1.485425458172494E-8 evalInputDelta=0.8429840803146362
    Fitness changed from 0.8073548674583435 to -0.035629212856292725
    Iteration 3 complete. Error: -0.035629212856292725 Total: 17.3505; Orientation: 0.0460; Line Search: 12.9474
    <a id="p-7"></a>Iteration 3
    <a id="p-6"></a>![Iteration 3](etc/7f67218c-7514-44d2-b735-25df2f4c9381.jpg)

    Adding measurement 1435475e to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 3.716e+03, gradient 3.838e-04, dot -0.239; [84f63b9f-9d28-4677-8cb3-7a63ab3ffd7e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.035629212856292725, 0.8073548674583435, 2.6859209090471268, 2.6859212815761566
    LBFGS Accumulation History: 3 points
    Removed measurement 1435475e to history. Total: 3
    th(0)=-0.035629212856292725;dx=-1.4732613989381993E-7
    New Minimum: -0.035629212856292725 > -0.3852490186691284
    WOLF (strong): th(3.9090063015938506E7)=-0.3852490186691284; dx=3.73556430263041E-8 evalInputDelta=0.3496198058128357
    New Minimum: -0.3852490186691284 > -0.59725221991539
    END: th(1.9545031507969253E7)=-0.59725221991539; dx=-2.733221045953793E-9 evalInputDelta=0.5616230070590973
    Fitness changed from -0.035629212856292725 to -0.59725221991539
    Iteration 4 complete. Error: -0.59725221991539 Total: 18.4094; Orientation: 1.0087; Line Search: 13.3760
    <a id="p-9"></a>Iteration 4
    <a id="p-8"></a>![Iteration 4](etc/535c979a-56f8-42ee-a666-51596155e7f8.jpg)

    Adding measurement 415d4a8e to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.506e+03, gradient 3.057e-04, dot -0.261; [84f63b9f-9d28-4677-8cb3-7a63ab3ffd7e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.59725221991539, 0.8073548674583435, 2.6859209090471268, 2.6859212815761566
    LBFGS Accumulation History: 3 points
    Removed measurement 415d4a8e to history. Total: 3
    th(0)=-0.59725221991539;dx=-9.345926987189559E-8
    New Minimum: -0.59725221991539 > -0.693192183971405
    WOLF (strong): th(4.210849389853514E7)=-0.693192183971405; dx=3.95422746580099E-8 evalInputDelta=0.09593996405601501
    New Minimum: -0.693192183971405 > -0.9807959794998169
    WOLF (strong): th(2.105424694926757E7)=-0.9807959794998169; dx=5.459443839718083E-9 evalInputDelta=0.3835437595844269
    END: th(7018082.316422523)=-0.8462307453155518; dx=-4.8445568186249843E-8 evalInputDelta=0.24897852540016174
    Fitness changed from -0.59725221991539 to -0.9807959794998169
    Iteration 5 complete. Error: -0.9807959794998169 Total: 22.2990; Orientation: 1.0037; Line Search: 17.1087
    <a id="p-11"></a>Iteration 5
    <a id="p-10"></a>![Iteration 5](etc/b7caf210-9308-422e-bac0-837b01b12a47.jpg)

    Adding measurement 331534b6 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.217e+03, gradient 2.745e-04, dot -0.228; [84f63b9f-9d28-4677-8cb3-7a63ab3ffd7e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -0.9807959794998169, 0.8073548674583435, 2.6859209090471268, 2.6859212815761566
    LBFGS Accumulation History: 3 points
    Removed measurement 331534b6 to history. Total: 3
    th(0)=-0.9807959794998169;dx=-7.535927388772782E-8
    New Minimum: -0.9807959794998169 > -1.2289956212043762
    END: th(1.5120000000000004E7)=-1.2289956212043762; dx=-4.250046521531626E-9 evalInputDelta=0.24819964170455933
    Fitness changed from -0.9807959794998169 to -1.2289956212043762
    Iteration 6 complete. Error: -1.2289956212043762 Total: 14.2677; Orientation: 0.9922; Line Search: 8.9523
    Adding measurement 650cbad1 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 5.686e+03, gradient 2.252e-04, dot -0.330; [84f63b9f-9d28-4677-8cb3-7a63ab3ffd7e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.2289956212043762, 0.8073548674583435, 2.6859209090471268, 2.6859212815761566
    LBFGS Accumulation History: 3 points
    Removed measurement 650cbad1 to history. Total: 3
    th(0)=-1.2289956212043762;dx=-5.070735702686563E-8
    Armijo: th(3.257505251328209E7)=-1.1760988682508469; dx=3.017822793225366E-8 evalInputDelta=-0.05289675295352936
    New Minimum: -1.2289956212043762 > -1.3586620390415192
    WOLF (strong): th(1.6287526256641045E7)=-1.3586620390415192; dx=1.0330842061808457E-8 evalInputDelta=0.12966641783714294
    END: th(5429175.418880348)=-1.331289291381836; dx=-2.4741168474997432E-8 evalInputDelta=0.10229367017745972
    Fitness changed from -1.2289956212043762 to -1.3586620390415192
    Iteration 7 complete. Error: -1.3586620390415192 Total: 21.9189; Orientation: 0.9943; Line Search: 16.3894
    Adding measurement 467b525c to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 4.551e+03, gradient 2.728e-04, dot -0.204; [84f63b9f-9d28-4677-8cb3-7a63ab3ffd7e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.3586620390415192, 0.8073548674583435, 2.6859209090471268, 2.6859212815761566
    LBFGS Accumulation History: 3 points
    Removed measurement 467b525c to history. Total: 3
    th(0)=-1.3586620390415192;dx=-7.44051128330607E-8
    New Minimum: -1.3586620390415192 > -1.4858443289995193
    WOLF (strong): th(1.1696803860704206E7)=-1.4858443289995193; dx=8.277005041239808E-9 evalInputDelta=0.12718228995800018
    END: th(5848401.930352103)=-1.4817755669355392; dx=-1.4821051054890445E-8 evalInputDelta=0.12311352789402008
    Fitness changed from -1.3586620390415192 to -1.4858443289995193
    Iteration 8 complete. Error: -1.4858443289995193 Total: 19.3450; Orientation: 1.3517; Line Search: 13.6030
    Adding measurement 51286c8b to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 5.619e+03, gradient 2.068e-04, dot -0.308; [84f63b9f-9d28-4677-8cb3-7a63ab3ffd7e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.4858443289995193, 0.8073548674583435, 2.6859209090471268, 2.6859212815761566
    LBFGS Accumulation History: 3 points
    Removed measurement 51286c8b to history. Total: 3
    th(0)=-1.4858443289995193;dx=-4.2784833930997244E-8
    New Minimum: -1.4858443289995193 > -1.5741872489452362
    WOLF (strong): th(1.2600000000000004E7)=-1.5741872489452362; dx=9.980027538875581E-9 evalInputDelta=0.08834291994571686
    END: th(6300000.000000002)=-1.572025626897812; dx=-1.2706751670577425E-8 evalInputDelta=0.08618129789829254
    Fitness changed from -1.4858443289995193 to -1.5741872489452362
    Iteration 9 complete. Error: -1.5741872489452362 Total: 18.5529; Orientation: 0.9904; Line Search: 13.1946
    Adding measurement 433a93a2 to history. Total: 3
    Rejected: LBFGS Orientation magnitude: 5.037e+03, gradient 2.249e-04, dot -0.242; [84f63b9f-9d28-4677-8cb3-7a63ab3ffd7e = 1.000/1.000e+00]
    Orientation rejected. Popping history element from -1.5741872489452362, 0.8073548674583435, 2.6859209090471268, 2.6859212815761566
    LBFGS Accumulation History: 3 points
    Removed measurement 433a93a2 to history. Total: 3
    th(0)=-1.5741872489452362;dx=-5.057284943249887E-8
    New Minimum: -1.5741872489452362 > -1.6469860523939133
    WOLF (strong): th(1.3572938547200872E7)=-1.6469860523939133; dx=9.827308415237866E-9 evalInputDelta=0.07279880344867706
    New Minimum: -1.6469860523939133 > -1.6574747860431671
    END: th(6786469.273600436)=-1.6574747860431671; dx=-5.200645295046893E-9 evalInputDelta=0.08328753709793091
    Fitness changed from -1.5741872489452362 to -1.6574747860431671
    Iteration 10 complete. Error: -1.6574747860431671 Total: 18.2494; Orientation: 1.0141; Line Search: 12.1738
    <a id="p-13"></a>Iteration 10
    <a id="p-12"></a>![Iteration 10](etc/528475f2-6d0c-498d-bf72-0ee1e959f94a.jpg)

    Final threshold in iteration 11: -1.6574747860431671 (> -Infinity) after 225.602s (< 5400.000s)

Returns

    -1.6574747860431671