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 56.69 seconds (1.399 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: 207637372087000
Reset training subject: 207638153838400
Adding measurement 58e61e18 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=11.11060670672793;dx=-7.653333296795833E-4
New Minimum: 11.11060670672793 > 11.109400151666955
WOLFE (weak): th(2.154434690031884)=11.109400151666955; dx=-7.576966698542241E-4 evalInputDelta=0.0012065550609747788
New Minimum: 11.109400151666955 > 11.108194825270516
WOLFE (weak): th(4.308869380063768)=11.108194825270516; dx=-7.657441272184288E-4 evalInputDelta=0.002411881457414111
New Minimum: 11.108194825270516 > 11.10335409856458
WOLFE (weak): th(12.926608140191302)=11.10335409856458; dx=-7.554612900611911E-4 evalInputDelta=0.0072526081633501605
New Minimum: 11.10335409856458 > 11.081426468386194
WOLFE (weak): th(51.70643256076521)=11.081426468386194; dx=-7.500573523656723E-4 evalInputDelta=0.029180238341735887
New Minimum: 11.081426468386194 > 10.962391937916275
WOLFE (weak): th(258.53216280382605)=10.962391937916275; dx=-7.772543806337108E-4 evalInputDelta=0.14821476881165552
New Minimum: 10.962391937916275 > 10.071869498257197
WOLFE (weak): th(1551.1929768229563)=10.071869498257197; dx=-9.897557043807037E-4 evalInputDelta=1.0387372084707334
New Minimum: 10.071869498257197 > 4.950412232581223
END: th(10858.350837760694)=4.950412232581223; dx=-4.702475314284156E-4 evalInputDelta=6.160194474146707
Fitness changed from 11.11060670672793 to 4.950412232581223
Iteration 1 complete. Error: 4.950412232581223 Total: 9.1868; Orientation: 0.0187; Line Search: 6.9555
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/317e55b2-69f0-47b7-af4a-90be3e6fb64e.jpg)
Adding measurement 21440e36 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=4.950412232581223;dx=-0.0019123302623580524
New Minimum: 4.950412232581223 > -0.0038562420441099476
END: th(23393.607721408407)=-0.0038562420441099476; dx=-2.466036678520977E-4 evalInputDelta=4.954268474625333
Fitness changed from 4.950412232581223 to -0.0038562420441099476
Iteration 2 complete. Error: -0.0038562420441099476 Total: 2.2762; Orientation: 0.0172; Line Search: 1.5206
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/b77bcd08-4b10-4994-838a-d0f69d2286e7.jpg)
Adding measurement 58581ab6 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-0.0038562420441099476;dx=-0.0019861515636664605
New Minimum: -0.0038562420441099476 > -9.915387702639048
END: th(50400.00000000001)=-9.915387702639048; dx=-1.1563095545987757E-4 evalInputDelta=9.911531460594938
Fitness changed from -0.0038562420441099476 to -9.915387702639048
Iteration 3 complete. Error: -9.915387702639048 Total: 2.5076; Orientation: 0.0233; Line Search: 1.6437
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/7312c54b-8d55-4f78-9daa-f55c178102a9.jpg)
Adding measurement 1cf45f46 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.013e+03, gradient 4.862e-02, dot -0.088; [7862ea9a-8b5b-4a04-bf62-78e25d7743b4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -9.915387702639048, -0.0038562420441099476, 4.950412232581223, 11.11060670672793
LBFGS Accumulation History: 3 points
Removed measurement 1cf45f46 to history. Total: 3
th(0)=-9.915387702639048;dx=-0.002349820513864111
New Minimum: -9.915387702639048 > -12.052128019567064
END: th(108583.50837760697)=-12.052128019567064; dx=-2.2876323780234207E-5 evalInputDelta=2.136740316928016
Fitness changed from -9.915387702639048 to -12.052128019567064
Iteration 4 complete. Error: -12.052128019567064 Total: 2.5253; Orientation: 0.3144; Line Search: 1.4625
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/5b3f2031-bd76-4299-a120-fb3bb0b65e0a.jpg)
Adding measurement 563f53d8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.008e+03, gradient 4.225e-02, dot -0.082; [7862ea9a-8b5b-4a04-bf62-78e25d7743b4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -12.052128019567064, -0.0038562420441099476, 4.950412232581223, 11.11060670672793
LBFGS Accumulation History: 3 points
Removed measurement 563f53d8 to history. Total: 3
th(0)=-12.052128019567064;dx=-0.0017814548101723875
New Minimum: -12.052128019567064 > -26.5260423051379
END: th(233936.07721408413)=-26.5260423051379; dx=-3.0406903171309076E-5 evalInputDelta=14.473914285570835
Fitness changed from -12.052128019567064 to -26.5260423051379
Iteration 5 complete. Error: -26.5260423051379 Total: 2.9351; Orientation: 0.3089; Line Search: 1.8633
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/0096631b-6208-4742-b936-7fc506c59469.jpg)
Adding measurement 6b29771f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.433e+03, gradient 3.650e-02, dot -0.071; [7862ea9a-8b5b-4a04-bf62-78e25d7743b4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -26.5260423051379, -0.0038562420441099476, 4.950412232581223, 11.11060670672793
LBFGS Accumulation History: 3 points
Removed measurement 6b29771f to history. Total: 3
th(0)=-26.5260423051379;dx=-0.0013277961853636988
Armijo: th(504000.0000000002)=-21.65138806102253; dx=5.520600980062381E-6 evalInputDelta=-4.874654244115369
New Minimum: -26.5260423051379 > -44.402521879235636
END: th(252000.0000000001)=-44.402521879235636; dx=-4.932263376227511E-5 evalInputDelta=17.876479574097736
Fitness changed from -26.5260423051379 to -44.402521879235636
Iteration 6 complete. Error: -44.402521879235636 Total: 3.3043; Orientation: 0.3092; Line Search: 2.2579
Adding measurement 4644f3d4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.554e+03, gradient 3.467e-02, dot -0.066; [7862ea9a-8b5b-4a04-bf62-78e25d7743b4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -44.402521879235636, -0.0038562420441099476, 4.950412232581223, 11.11060670672793
LBFGS Accumulation History: 3 points
Removed measurement 4644f3d4 to history. Total: 3
th(0)=-44.402521879235636;dx=-0.0011998819499900578
Armijo: th(542917.5418880349)=-41.617139990219925; dx=1.8476951205754205E-5 evalInputDelta=-2.78538188901571
New Minimum: -44.402521879235636 > -78.57337871776136
END: th(271458.77094401745)=-78.57337871776136; dx=-1.0431336287659013E-4 evalInputDelta=34.17085683852572
Fitness changed from -44.402521879235636 to -78.57337871776136
Iteration 7 complete. Error: -78.57337871776136 Total: 3.2940; Orientation: 0.3235; Line Search: 2.2813
Adding measurement 441eae0b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.793e+04, gradient 3.701e-02, dot -0.091; [7862ea9a-8b5b-4a04-bf62-78e25d7743b4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -78.57337871776136, -0.0038562420441099476, 4.950412232581223, 11.11060670672793
LBFGS Accumulation History: 3 points
Removed measurement 441eae0b to history. Total: 3
th(0)=-78.57337871776136;dx=-0.0013659408733710868
Armijo: th(584840.1930352104)=-54.10676196627256; dx=1.2934493276734199E-5 evalInputDelta=-24.4666167514888
New Minimum: -78.57337871776136 > -105.67319722980409
END: th(292420.0965176052)=-105.67319722980409; dx=-9.521786556979298E-5 evalInputDelta=27.09981851204273
Fitness changed from -78.57337871776136 to -105.67319722980409
Iteration 8 complete. Error: -105.67319722980409 Total: 3.5102; Orientation: 0.3101; Line Search: 2.2658
Adding measurement 5f966dee to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.088e+04, gradient 4.137e-02, dot -0.099; [7862ea9a-8b5b-4a04-bf62-78e25d7743b4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -105.67319722980409, -0.0038562420441099476, 4.950412232581223, 11.11060670672793
LBFGS Accumulation History: 3 points
Removed measurement 5f966dee to history. Total: 3
th(0)=-105.67319722980409;dx=-0.0017104435053113915
Armijo: th(630000.0000000002)=-60.91391542106395; dx=2.1357958105750677E-5 evalInputDelta=-44.75928180874014
New Minimum: -105.67319722980409 > -127.19641794893374
END: th(315000.0000000001)=-127.19641794893374; dx=-8.187501663366885E-5 evalInputDelta=21.523220719129654
Fitness changed from -105.67319722980409 to -127.19641794893374
Iteration 9 complete. Error: -127.19641794893374 Total: 3.3132; Orientation: 0.3066; Line Search: 2.3066
Adding measurement 29cd3f9f to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.577e+06, gradient 4.263e-02, dot -0.105; [7862ea9a-8b5b-4a04-bf62-78e25d7743b4 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -127.19641794893374, -0.0038562420441099476, 4.950412232581223, 11.11060670672793
LBFGS Accumulation History: 3 points
Removed measurement 29cd3f9f to history. Total: 3
th(0)=-127.19641794893374;dx=-0.001815330071378952
Armijo: th(678646.9273600436)=-61.180372736594435; dx=5.6322254429699735E-5 evalInputDelta=-66.01604521233931
New Minimum: -127.19641794893374 > -145.2553853094415
END: th(339323.4636800218)=-145.2553853094415; dx=-5.72502440391566E-5 evalInputDelta=18.05896736050775
Fitness changed from -127.19641794893374 to -145.2553853094415
Iteration 10 complete. Error: -145.2553853094415 Total: 3.6699; Orientation: 0.5524; Line Search: 2.3619
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/60c2a386-8ba9-453e-b4d0-a5bfba25790c.jpg)
Adding measurement 4a536b4e to history. Total: 3
Accepted: LBFGS Orientation magnitude: 7.546e+04, gradient 4.334e-02, dot 0.115; [7862ea9a-8b5b-4a04-bf62-78e25d7743b4 = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-145.2553853094415;dx=-375.90430751379563
Armijo: th(731050.241294013)=286.20621011645125; dx=6.27800691571902E-4 evalInputDelta=-431.4615954258927
Armijo: th(365525.1206470065)=286.2018303640234; dx=0.0012542080950564266 evalInputDelta=-431.45721567346493
Armijo: th(121841.7068823355)=286.19616728621827; dx=0.003762628779984849 evalInputDelta=-431.4515525956598
Armijo: th(30460.426720583873)=286.16488362269723; dx=0.015060424884946876 evalInputDelta=-431.4202689321387
Armijo: th(6092.085344116775)=286.11859258733324; dx=0.07532786635552882 evalInputDelta=-431.3739778967747
Armijo: th(1015.3475573527958)=285.5442870067374; dx=0.4512345480263671 evalInputDelta=-430.7996723161789
Armijo: th(145.0496510503994)=281.249760335278; dx=3.1220601029303956 evalInputDelta=-426.5051456447195
Armijo: th(18.131206381299926)=220.91183275878603; dx=20.456902425532867 evalInputDelta=-366.1672180682275
Armijo: th(2.0145784868111027)=5.923433285790438; dx=52.81671179658474 evalInputDelta=-151.17881859523192
Armijo: th(0.20145784868111027)=-119.43623619354355; dx=49.070821547700334 evalInputDelta=-25.819149115897943
Armijo: th(0.018314349880100934)=-144.28198954256854; dx=-62.91111931001638 evalInputDelta=-0.9733957668729545
Armijo: th(0.0015261958233417445)=-145.19755853208318; dx=-86.52773159895916 evalInputDelta=-0.057826777358314985
Armijo: th(1.1739967871859574E-4)=-145.25105152965025; dx=-87.78941778936976 evalInputDelta=-0.004333779791238612
Armijo: th(8.385691337042552E-6)=-145.25508694279696; dx=-89.07574990335982 evalInputDelta=-2.983666445288691E-4
Armijo: th(5.590460891361701E-7)=-145.25536787813738; dx=-88.17405340315807 evalInputDelta=-1.7431304115689272E-5
Armijo: th(3.4940380571010634E-8)=-145.25537815688412; dx=-89.19871094747481 evalInputDelta=-7.152557373046875E-6
Armijo: th(2.0553165041770963E-9)=-145.25537225480082; dx=-88.533618391564 evalInputDelta=-1.3054640675136397E-5
Armijo: th(1.141842502320609E-10)=-145.2553853094415; dx=-89.57485210722058 evalInputDelta=0.0
MIN ALPHA (6.0096973806347845E-12): th(0.0)=-145.2553853094415
Fitness changed from -145.2553853094415 to -145.2553853094415
Static Iteration Total: 17.0420; Orientation: 0.3161; Line Search: 16.0023
Iteration 11 failed. Error: -145.2553853094415
Previous Error: 0.0 -> -145.2553853094415
Retrying iteration 11
Reset training subject: 207690936781800
Adding measurement 4a7c88f2 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-145.2553853094415;dx=-0.0018747639115004782
END: th(2.1544346900318838E-10)=-145.2553853094415; dx=-0.0015101714381994015 evalInputDelta=0.0
Fitness changed from -145.2553853094415 to -145.2553853094415
Static Iteration Total: 3.1211; Orientation: 0.0170; Line Search: 1.6830
Iteration 12 failed. Error: -145.2553853094415
Previous Error: 0.0 -> -145.2553853094415
Optimization terminated 12
Final threshold in iteration 12: -145.2553853094415 (> -Infinity) after 56.686s (< 5400.000s)

Returns

    -145.2553853094415