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 132.21 seconds (2.449 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: 3758018047790
Reset training subject: 3758678060777
Adding measurement 6d05e30d to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-1.9742446855096067;dx=-4.8222611496284584E-5
New Minimum: -1.9742446855096067 > -1.9742492437091053
WOLFE (weak): th(2.154434690031884)=-1.9742492437091053; dx=-4.82293999093721E-5 evalInputDelta=4.558199498516657E-6
New Minimum: -1.9742492437091053 > -1.97425333267323
WOLFE (weak): th(4.308869380063768)=-1.97425333267323; dx=-4.8232339440609215E-5 evalInputDelta=8.647163623365373E-6
New Minimum: -1.97425333267323 > -1.9742685489079543
WOLFE (weak): th(12.926608140191302)=-1.9742685489079543; dx=-4.824873418165913E-5 evalInputDelta=2.3863398347589992E-5
New Minimum: -1.9742685489079543 > -1.9743364507639458
WOLFE (weak): th(51.70643256076521)=-1.9743364507639458; dx=-4.8211219527730924E-5 evalInputDelta=9.176525433907123E-5
New Minimum: -1.9743364507639458 > -1.9747177436749281
WOLFE (weak): th(258.53216280382605)=-1.9747177436749281; dx=-4.741811307745182E-5 evalInputDelta=4.730581653213939E-4
New Minimum: -1.9747177436749281 > -1.9772881588515154
WOLFE (weak): th(1551.1929768229563)=-1.9772881588515154; dx=-4.7849466016883884E-5 evalInputDelta=0.003043473341908687
New Minimum: -1.9772881588515154 > -1.9931348111929093
END: th(10858.350837760694)=-1.9931348111929093; dx=-3.754914106610375E-5 evalInputDelta=0.018890125683302506
Fitness changed from -1.9742446855096067 to -1.9931348111929093
Iteration 1 complete. Error: -1.9931348111929093 Total: 7.3332; Orientation: 0.0158; Line Search: 5.4264
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/8e59e23c-828d-4c13-805f-3fcffd6a1b3a.jpg)
Adding measurement 4c633c8e to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-1.9931348111929093;dx=-3.6965695203968634E-5
New Minimum: -1.9931348111929093 > -2.0041987294371912
END: th(23393.607721408407)=-2.0041987294371912; dx=-2.9748854613443524E-5 evalInputDelta=0.01106391824428199
Fitness changed from -1.9931348111929093 to -2.0041987294371912
Iteration 2 complete. Error: -2.0041987294371912 Total: 1.9781; Orientation: 0.0166; Line Search: 1.3197
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/62d39c05-470a-45ca-af5e-6aac85f12410.jpg)
Adding measurement 6fa8eff6 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-2.0041987294371912;dx=-3.321043524405227E-5
New Minimum: -2.0041987294371912 > -2.028117871292238
END: th(50400.00000000001)=-2.028117871292238; dx=-2.2585061053019135E-5 evalInputDelta=0.02391914185504662
Fitness changed from -2.0041987294371912 to -2.028117871292238
Iteration 3 complete. Error: -2.028117871292238 Total: 2.0105; Orientation: 0.0160; Line Search: 1.3527
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/b2fcbc3e-5dfc-47c8-af15-37f847590378.jpg)
Adding measurement 4ef454a2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.477e+03, gradient 5.570e-03, dot -0.731; [20e9d0fd-575a-481a-9030-3f0249a9113a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.028117871292238, -2.0041987294371912, -1.9931348111929093, -1.9742446855096067
LBFGS Accumulation History: 3 points
Removed measurement 4ef454a2 to history. Total: 3
th(0)=-2.028117871292238;dx=-3.091870227578559E-5
New Minimum: -2.028117871292238 > -2.105260606777612
END: th(108583.50837760697)=-2.105260606777612; dx=-1.6777651281484078E-5 evalInputDelta=0.0771427354853742
Fitness changed from -2.028117871292238 to -2.105260606777612
Iteration 4 complete. Error: -2.105260606777612 Total: 2.4001; Orientation: 0.4295; Line Search: 1.3171
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/30fd1e0f-d81c-410c-8ed7-0d67b38f3176.jpg)
Adding measurement 20bbf71c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.338e+03, gradient 5.409e-03, dot -0.565; [20e9d0fd-575a-481a-9030-3f0249a9113a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.105260606777612, -2.0041987294371912, -1.9931348111929093, -1.9742446855096067
LBFGS Accumulation History: 3 points
Removed measurement 20bbf71c to history. Total: 3
th(0)=-2.105260606777612;dx=-2.9140986482534212E-5
New Minimum: -2.105260606777612 > -2.272896924237429
END: th(233936.07721408413)=-2.272896924237429; dx=-7.983568734415152E-6 evalInputDelta=0.167636317459817
Fitness changed from -2.105260606777612 to -2.272896924237429
Iteration 5 complete. Error: -2.272896924237429 Total: 2.3852; Orientation: 0.4191; Line Search: 1.3305
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/1741d5af-0146-4767-957d-0c8381bb5cd1.jpg)
Adding measurement 656595f0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.010e+03, gradient 4.899e-03, dot -0.333; [20e9d0fd-575a-481a-9030-3f0249a9113a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.272896924237429, -2.0041987294371912, -1.9931348111929093, -1.9742446855096067
LBFGS Accumulation History: 3 points
Removed measurement 656595f0 to history. Total: 3
th(0)=-2.272896924237429;dx=-2.3901913830511395E-5
Armijo: th(504000.0000000002)=-2.1564304052277445; dx=-3.5008333548630983E-6 evalInputDelta=-0.11646651900968452
Armijo: th(252000.0000000001)=-2.271935084024573; dx=-8.512263398444829E-6 evalInputDelta=-9.618402128559467E-4
New Minimum: -2.272896924237429 > -2.29552447230226
END: th(84000.00000000003)=-2.29552447230226; dx=-1.626870426002826E-5 evalInputDelta=0.022627548064830805
Fitness changed from -2.272896924237429 to -2.29552447230226
Iteration 6 complete. Error: -2.29552447230226 Total: 3.7728; Orientation: 0.4801; Line Search: 2.6568
Adding measurement 626fcc8c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.262e+03, gradient 4.981e-03, dot -0.384; [20e9d0fd-575a-481a-9030-3f0249a9113a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.29552447230226, -2.0041987294371912, -1.9931348111929093, -1.9742446855096067
LBFGS Accumulation History: 3 points
Removed measurement 626fcc8c to history. Total: 3
th(0)=-2.29552447230226;dx=-2.4533734495664543E-5
Armijo: th(180972.5139626783)=-2.244264215818064; dx=-1.0949109303522127E-5 evalInputDelta=-0.05126025648419574
Armijo: th(90486.25698133915)=-2.2942301969561476; dx=-1.599580629532831E-5 evalInputDelta=-0.0012942753461122614
New Minimum: -2.29552447230226 > -2.3024867563248645
END: th(30162.08566044638)=-2.3024867563248645; dx=-2.134420925652737E-5 evalInputDelta=0.006962284022604681
Fitness changed from -2.29552447230226 to -2.3024867563248645
Iteration 7 complete. Error: -2.3024867563248645 Total: 3.6786; Orientation: 0.4911; Line Search: 2.5892
Adding measurement 7147c236 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.902e+03, gradient 4.974e-03, dot -0.405; [20e9d0fd-575a-481a-9030-3f0249a9113a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.3024867563248645, -2.0041987294371912, -1.9931348111929093, -1.9742446855096067
LBFGS Accumulation History: 3 points
Removed measurement 7147c236 to history. Total: 3
th(0)=-2.3024867563248645;dx=-2.4627821861939334E-5
Armijo: th(64982.24367057892)=-2.2962085679036406; dx=-1.801595481772316E-5 evalInputDelta=-0.0062781884212239625
Armijo: th(32491.12183528946)=-2.3023179997425665; dx=-2.0795319325554544E-5 evalInputDelta=-1.6875658229809076E-4
Armijo: th(10830.373945096488)=-2.3021937235333616; dx=-2.3365736240171026E-5 evalInputDelta=-2.9303279150294514E-4
Armijo: th(2707.593486274122)=-2.302480778782573; dx=-2.4224976776670375E-5 evalInputDelta=-5.97754229136882E-6
New Minimum: -2.3024867563248645 > -2.302506183230138
WOLFE (weak): th(541.5186972548244)=-2.302506183230138; dx=-2.4501331118196265E-5 evalInputDelta=1.942690527334534E-5
New Minimum: -2.302506183230138 > -2.3025092869217123
WOLFE (weak): th(1624.5560917644732)=-2.3025092869217123; dx=-2.4409121995415143E-5 evalInputDelta=2.253059684775849E-5
WOLFE (weak): th(2166.0747890192974)=-2.3024961824177166; dx=-2.435546951804198E-5 evalInputDelta=9.426092852038437E-6
WOLFE (weak): th(2436.8341376467097)=-2.302490319852309; dx=-2.4307771883561116E-5 evalInputDelta=3.5635274442391562E-6
Armi

...skipping 11016 bytes...

060574386E-6)=-2.3025098616789523; dx=-2.4563273781167945E-5 evalInputDelta=1.149514368137261E-7
Armijo: th(5.961741431768224E-6)=-2.3025096317760734; dx=-2.4554311108784356E-5 evalInputDelta=-1.1495144214279662E-7
WOLFE (weak): th(5.809434168912831E-6)=-2.3025098616789523; dx=-2.4547340131592034E-5 evalInputDelta=1.149514368137261E-7
WOLFE (weak): th(5.885587800340528E-6)=-2.3025098616789523; dx=-2.4522189803517928E-5 evalInputDelta=1.149514368137261E-7
Armijo: th(5.923664616054376E-6)=-2.3025096317760734; dx=-2.4537596077129898E-5 evalInputDelta=-1.1495144214279662E-7
WOLFE (weak): th(5.904626208197452E-6)=-2.3025098616789523; dx=-2.4541518583644906E-5 evalInputDelta=1.149514368137261E-7
WOLFE (weak): th(5.914145412125915E-6)=-2.3025098616789523; dx=-2.454935467440865E-5 evalInputDelta=1.149514368137261E-7
WOLFE (weak): th(5.9189050140901454E-6)=-2.3025098616789523; dx=-2.458066671335246E-5 evalInputDelta=1.149514368137261E-7
WOLFE (weak): th(5.921284815072261E-6)=-2.3025098616789523; dx=-2.4532984834475314E-5 evalInputDelta=1.149514368137261E-7
WOLFE (weak): th(5.922474715563319E-6)=-2.3025098616789523; dx=-2.4539267786922733E-5 evalInputDelta=1.149514368137261E-7
Armijo: th(5.9230696658088475E-6)=-2.3025096317760734; dx=-2.456775178417022E-5 evalInputDelta=-1.1495144214279662E-7
WOLFE (weak): th(5.9227721906860835E-6)=-2.3025098616789523; dx=-2.452994842745815E-5 evalInputDelta=1.149514368137261E-7
Armijo: th(5.922920928247466E-6)=-2.3025096317760734; dx=-2.4478768896474327E-5 evalInputDelta=-1.1495144214279662E-7
WOLFE (weak): th(5.922846559466775E-6)=-2.3025098616789523; dx=-2.4541367460442748E-5 evalInputDelta=1.149514368137261E-7
WOLFE (weak): th(5.92288374385712E-6)=-2.3025098616789523; dx=-2.451821418248573E-5 evalInputDelta=1.149514368137261E-7
mu ~= nu (5.92288374385712E-6): th(5.6571269060574386E-6)=-2.3025098616789523
Fitness changed from -2.3025097467275155 to -2.3025098616789523
Iteration 11 complete. Error: -2.3025098616789523 Total: 19.9594; Orientation: 0.4247; Line Search: 18.9087
Adding measurement 46db36db to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.909e+03, gradient 4.959e-03, dot -0.406; [20e9d0fd-575a-481a-9030-3f0249a9113a = 1.000/1.000e+00]
Orientation rejected. Popping history element from -2.3025098616789523, -2.0041987294371912, -1.9931348111929093, -1.9742446855096067
LBFGS Accumulation History: 3 points
Removed measurement 46db36db to history. Total: 3
th(0)=-2.3025098616789523;dx=-2.4492071171766833E-5
Armijo: th(1.2760506258461942E-5)=-2.3025096317760734; dx=-2.451455601481051E-5 evalInputDelta=-2.2990287895652273E-7
WOLFE (weak): th(6.380253129230971E-6)=-2.3025098616789523; dx=-2.449263460163472E-5 evalInputDelta=0.0
Armijo: th(9.570379693846456E-6)=-2.3025096317760734; dx=-2.452256315897695E-5 evalInputDelta=-2.2990287895652273E-7
Armijo: th(7.975316411538713E-6)=-2.3025096317760734; dx=-2.4513449942112594E-5 evalInputDelta=-2.2990287895652273E-7
Armijo: th(7.1777847703848415E-6)=-2.3025096317760734; dx=-2.448618385939561E-5 evalInputDelta=-2.2990287895652273E-7
WOLFE (weak): th(6.779018949807907E-6)=-2.3025098616789523; dx=-2.4494841835398872E-5 evalInputDelta=0.0
Armijo: th(6.978401860096374E-6)=-2.3025096317760734; dx=-2.447953308360049E-5 evalInputDelta=-2.2990287895652273E-7
Armijo: th(6.87871040495214E-6)=-2.3025096317760734; dx=-2.4481792420976528E-5 evalInputDelta=-2.2990287895652273E-7
Armijo: th(6.8288646773800235E-6)=-2.3025096317760734; dx=-2.448043199015048E-5 evalInputDelta=-2.2990287895652273E-7
Armijo: th(6.803941813593965E-6)=-2.3025096317760734; dx=-2.4500247751836163E-5 evalInputDelta=-2.2990287895652273E-7
Armijo: th(6.791480381700936E-6)=-2.3025096317760734; dx=-2.451076323644712E-5 evalInputDelta=-2.2990287895652273E-7
Armijo: th(6.785249665754422E-6)=-2.3025096317760734; dx=-2.449417790983642E-5 evalInputDelta=-2.2990287895652273E-7
Armijo: th(6.782134307781164E-6)=-2.3025096317760734; dx=-2.4522785330971596E-5 evalInputDelta=-2.2990287895652273E-7
WOLFE (weak): th(6.780576628794536E-6)=-2.3025098616789523; dx=-2.449394316325271E-5 evalInputDelta=0.0
WOLFE (weak): th(6.7813554682878496E-6)=-2.3025098616789523; dx=-2.4500311305295926E-5 evalInputDelta=0.0
WOLFE (weak): th(6.781744888034507E-6)=-2.3025098616789523; dx=-2.447598646341978E-5 evalInputDelta=0.0
Armijo: th(6.781939597907835E-6)=-2.3025096317760734; dx=-2.4510908438792897E-5 evalInputDelta=-2.2990287895652273E-7
Armijo: th(6.781842242971171E-6)=-2.3025096317760734; dx=-2.4502491178589856E-5 evalInputDelta=-2.2990287895652273E-7
Armijo: th(6.781793565502839E-6)=-2.3025096317760734; dx=-2.451713178014857E-5 evalInputDelta=-2.2990287895652273E-7
mu ~= nu (6.781744888034507E-6): th(0.0)=-2.3025098616789523
Fitness changed from -2.3025098616789523 to -2.3025098616789523
Static Iteration Total: 15.0729; Orientation: 0.4234; Line Search: 14.0526
Iteration 12 failed. Error: -2.3025098616789523
Previous Error: 0.0 -> -2.3025098616789523
Retrying iteration 12
Reset training subject: 3871821766287
Adding measurement fa8bf52 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-2.3025098616789523;dx=-2.4578599856262018E-5
Armijo: th(1.4610878881941134E-5)=-2.3025096317760734; dx=-2.4585703539545926E-5 evalInputDelta=-2.2990287895652273E-7
Armijo: th(7.305439440970567E-6)=-2.3025096317760734; dx=-2.454239788608935E-5 evalInputDelta=-2.2990287895652273E-7
Armijo: th(2.4351464803235224E-6)=-2.3025097467275155; dx=-2.4548762069928943E-5 evalInputDelta=-1.149514368137261E-7
Armijo: th(6.087866200808806E-7)=-2.3025096317760734; dx=-2.458945000870671E-5 evalInputDelta=-2.2990287895652273E-7
WOLFE (weak): th(1.217573240161761E-7)=-2.3025098616789523; dx=-2.4559935676786065E-5 evalInputDelta=0.0
Armijo: th(3.6527197204852836E-7)=-2.3025096317760734; dx=-2.451249033958146E-5 evalInputDelta=-2.2990287895652273E-7
WOLFE (weak): th(2.435146480323522E-7)=-2.3025098616789523; dx=-2.4535386262169773E-5 evalInputDelta=0.0
Armijo: th(3.043933100404403E-7)=-2.3025096317760734; dx=-2.457732717607675E-5 evalInputDelta=-2.2990287895652273E-7
Armijo: th(2.7395397903639623E-7)=-2.3025096317760734; dx=-2.4598325566437196E-5 evalInputDelta=-2.2990287895652273E-7
WOLFE (weak): th(2.5873431353437426E-7)=-2.3025098616789523; dx=-2.4563973460172163E-5 evalInputDelta=0.0
Armijo: th(2.6634414628538525E-7)=-2.3025096317760734; dx=-2.4546613394746087E-5 evalInputDelta=-2.2990287895652273E-7
WOLFE (weak): th(2.6253922990987975E-7)=-2.3025098616789523; dx=-2.4564896253740457E-5 evalInputDelta=0.0
Armijo: th(2.644416880976325E-7)=-2.3025096317760734; dx=-2.455647086793075E-5 evalInputDelta=-2.2990287895652273E-7
WOLFE (weak): th(2.634904590037561E-7)=-2.3025098616789523; dx=-2.456574284365439E-5 evalInputDelta=0.0
Armijo: th(2.6396607355069434E-7)=-2.3025096317760734; dx=-2.454728170204075E-5 evalInputDelta=-2.2990287895652273E-7
Armijo: th(2.6372826627722526E-7)=-2.3025096317760734; dx=-2.455812339210741E-5 evalInputDelta=-2.2990287895652273E-7
Armijo: th(2.636093626404907E-7)=-2.3025096317760734; dx=-2.4565789440528217E-5 evalInputDelta=-2.2990287895652273E-7
Armijo: th(2.635499108221234E-7)=-2.3025096317760734; dx=-2.454330075148316E-5 evalInputDelta=-2.2990287895652273E-7
Armijo: th(2.635201849129398E-7)=-2.3025096317760734; dx=-2.4550399563304078E-5 evalInputDelta=-2.2990287895652273E-7
WOLFE (weak): th(2.6350532195834793E-7)=-2.3025098616789523; dx=-2.4538857994213394E-5 evalInputDelta=0.0
WOLFE (weak): th(2.6351275343564386E-7)=-2.3025098616789523; dx=-2.455430780706139E-5 evalInputDelta=0.0
Armijo: th(2.635164691742918E-7)=-2.3025096317760734; dx=-2.4529164363952887E-5 evalInputDelta=-2.2990287895652273E-7
Armijo: th(2.635146113049678E-7)=-2.3025096317760734; dx=-2.4560199207336867E-5 evalInputDelta=-2.2990287895652273E-7
mu ~= nu (2.6351275343564386E-7): th(0.0)=-2.3025098616789523
Fitness changed from -2.3025098616789523 to -2.3025098616789523
Static Iteration Total: 18.4039; Orientation: 0.0162; Line Search: 17.1563
Iteration 13 failed. Error: -2.3025098616789523
Previous Error: 0.0 -> -2.3025098616789523
Optimization terminated 13
Final threshold in iteration 13: -2.3025098616789523 (> -Infinity) after 132.208s (< 3600.000s)

Returns

    -2.3025098616789523