BasicOptimizer.scala:88 executed in 607.08 seconds (4.366 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
Reset training subject: 2951910567636
Reset training subject: 2963320821131
Adding measurement 10555280 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=3.429912295545435;dx=-1.967600866232722E-7
New Minimum: 3.429912295545435 > 3.4299122880948545
WOLFE (weak): th(2.154434690031884)=3.4299122880948545; dx=-1.964635528964642E-7 evalInputDelta=7.450580596923828E-9
New Minimum: 3.4299122880948545 > 3.4299121830206065
WOLFE (weak): th(4.308869380063768)=3.4299121830206065; dx=-1.9646332352661265E-7 evalInputDelta=1.1252482856605184E-7
New Minimum: 3.4299121830206065 > 3.4299114839750957
WOLFE (weak): th(12.926608140191302)=3.4299114839750957; dx=-1.9646374135490277E-7 evalInputDelta=8.115703393762885E-7
New Minimum: 3.4299114839750957 > 3.4299083723250035
WOLFE (weak): th(51.70643256076521)=3.4299083723250035; dx=-1.9646322616478248E-7 evalInputDelta=3.923220431634178E-6
New Minimum: 3.4299083723250035 > 3.4298927780403643
WOLFE (weak): th(258.53216280382605)=3.4298927780403643; dx=-1.9645776701816197E-7 evalInputDelta=1.9517505070787422E-5
New Minimum: 3.4298927780403643 > 3.42979500023261
WOLFE (weak): th(1551.1929768229563)=3.42979500023261; dx=-1.964366549339034E-7 evalInputDelta=1.1729531282522743E-4
New Minimum: 3.42979500023261 > 3.429090945342367
WOLFE (weak): th(10858.350837760694)=3.429090945342367; dx=-1.9642281570706361E-7 evalInputDelta=8.213502030680608E-4
New Minimum: 3.429090945342367 > 3.4233434968659973
WOLFE (weak): th(86866.80670208555)=3.4233434968659973; dx=-1.9596599399614547E-7 evalInputDelta=0.006568798679437826
New Minimum: 3.4233434968659973 > 3.371299983784476
WOLFE (weak): th(781801.26031877)=3.371299983784476; dx=-1.8992265869047855E-7 evalInputDelta=0.058612311760958935
New Minimum: 3.371299983784476 > 2.9682541317692905
END: th(7818012.6031877)=2.9682541317692905; dx=-1.1455315441699088E-7 evalInputDelta=0.46165816377614455
Fitness changed from 3.429912295545435 to 2.9682541317692905
Iteration 1 complete. Error: 2.9682541317692905 Total: 167.3576; Orientation: 0.2118; Line Search: 133.1505
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/5e8d5225-b639-4ad2-881b-1dfeb31983a1.jpg)
Adding measurement 6523675 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=2.9682541317692905;dx=-1.5353413438371147E-7
New Minimum: 2.9682541317692905 > 2.417903135776639
END: th(1.684339755941405E7)=2.417903135776639; dx=-5.2596345552710694E-8 evalInputDelta=0.5503509959926514
Fitness changed from 2.9682541317692905 to 2.417903135776639
Iteration 2 complete. Error: 2.417903135776639 Total: 35.7880; Orientation: 0.2111; Line Search: 24.1591
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/a2e75cfe-275a-47d4-ab5c-39a9dbcafd76.jpg)
Adding measurement 427309c3 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=2.417903135776639;dx=-1.0046112924948536E-7
New Minimum: 2.417903135776639 > 1.8729851797033916
END: th(3.6288E7)=1.8729851797033916; dx=-2.1160838871831377E-8 evalInputDelta=0.5449179560732476
Fitness changed from 2.417903135776639 to 1.8729851797033916
Iteration 3 complete. Error: 1.8729851797033916 Total: 35.6785; Orientation: 0.2120; Line Search: 24.0133
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/5e427324-401d-4ba7-880c-0bf1bbb7e095.jpg)
Adding measurement 13888c2e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.086e+04, gradient 2.304e-04, dot -0.508; [58b60bb7-40de-4e93-8b77-2787691c965c = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.8729851797033916, 2.417903135776639, 2.9682541317692905, 3.429912295545435
LBFGS Accumulation History: 3 points
Removed measurement 13888c2e to history. Total: 3
th(0)=1.8729851797033916;dx=-5.30727151890264E-8
Armijo: th(7.8180126031877E7)=2.1320078173628336; dx=1.8111602011706885E-8 evalInputDelta=-0.259022637659442
New Minimum: 1.8729851797033916 > 1.7530371577725483
WOLF (strong): th(3.90900630159385E7)=1.7530371577725483; dx=2.1173071452042483E-9 evalInputDelta=0.11994802193084331
New Minimum: 1.7530371577725483 > 1.7158733582495467
END: th(1.3030021005312832E7)=1.7158733582495467; dx=-1.9835250593076362E-8 evalInputDelta=0.15711182145384495
Fitness changed from 1.8729851797033916 to 1.7158733582495467
Iteration 4 complete. Error: 1.7158733582495467 Total: 65.0680; Orientation: 4.9132; Line Search: 48.6339
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/49c500d7-b5a3-4975-8a3c-550a551241ec.jpg)
Adding measurement 6777bab0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.314e+04, gradient 1.783e-04, dot -0.449; [58b60bb7-40de-4e93-8b77-2787691c965c = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.7158733582495467, 2.417903135776639, 2.9682541317692905, 3.429912295545435
LBFGS Accumulation History: 3 points
Removed measurement 6777bab0 to history. Total: 3
th(0)=1.7158733582495467;dx=-3.177381269633979E-8
New Minimum: 1.7158733582495467 > 1.566747818638167
END: th(2.807232926569009E7)=1.566747818638167; dx=-8.23813626573155E-9 evalInputDelta=0.14912553961137975
Fitness changed from 1.7158733582495467 to 1.566747818638167
Iteration 5 complete. Error: 1.566747818638167 Total: 40.5624; Orientation: 4.7648; Line Search: 24.1209
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/30f8e8b7-6468-407e-88fe-26274b643488.jpg)
Adding measurement 4c135dac to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.740e+04, gradient 1.703e-04, dot -0.509; [58b60bb7-40de-4e93-8b77-2787691c965c = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.566747818638167, 2.417903135776639, 2.9682541317692905, 3.429912295545435
LBFGS Accumulation History: 3 points
Removed measurement 4c135dac to history. Total: 3
th(0)=1.566747818638167;dx=-2.901209833091505E-8
Armijo: th(6.048000000000001E7)=1.985509508907404; dx=2.5895593038803885E-8 evalInputDelta=-0.41876169026923704
Armijo: th(3.0240000000000004E7)=1.6024528267608869; dx=1.291148691410873E-8 evalInputDelta=-0.03570500812271993
New Minimum: 1.566747818638167 > 1.5079768117052486
END: th(1.0080000000000002E7)=1.5079768117052486; dx=-1.0542834584712078E-8 evalInputDelta=0.05877100693291837
Fitness changed from 1.566747818638167 to 1.5079768117052486
Iteration 6 complete. Error: 1.5079768117052486 Total: 64.6047; Orientation: 4.9798; Line Search: 48.2088
Adding measurement 56451365 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.196e+04, gradient 1.156e-04, dot -0.543; [58b60bb7-40de-4e93-8b77-2787691c965c = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.5079768117052486, 2.417903135776639, 2.9682541317692905, 3.429912295545435
LBFGS Accumulation History: 3 points
Removed measurement 56451365 to history. Total: 3
th(0)=1.5079768117052486;dx=-1.3353344217647125E-8
New Minimum: 1.5079768117052486 > 1.4467289897805968
END: th(2.1716701675521392E7)=1.4467289897805968; dx=-9.180456956457418E-9 evalInputDelta=0.061247821924651724
Fitness changed from 1.5079768117052486 to 1.4467289897805968
Iteration 7 complete. Error: 1.4467289897805968 Total: 40.6557; Orientation: 4.8855; Line Search: 24.3088
Adding measurement e0ec2e0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.157e+04, gradient 1.008e-04, dot -0.570; [58b60bb7-40de-4e93-8b77-2787691c965c = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.4467289897805968, 2.417903135776639, 2.9682541317692905, 3.429912295545435
LBFGS Accumulation History: 3 points
Removed measurement e0ec2e0 to history. Total: 3
th(0)=1.4467289897805968;dx=-1.0167768807816262E-8
New Minimum: 1.4467289897805968 > 1.4062867397765515
END: th(4.678721544281682E7)=1.4062867397765515; dx=-4.221070955521739E-9 evalInputDelta=0.04044225000404533
Fitness changed from 1.4467289897805968 to 1.4062867397765515
Iteration 8 complete. Error: 1.4062867397765515 Total: 39.9630; Orientation: 4.9834; Line Search: 23.8866
Adding measurement 23115cc4 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.868e+03, gradient 1.349e-04, dot -0.360; [58b60bb7-40de-4e93-8b77-2787691c965c = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.4062867397765515, 2.417903135776639, 2.9682541317692905, 3.429912295545435
LBFGS Accumulation History: 3 points
Removed measurement 23115cc4 to history. Total: 3
th(0)=1.4062867397765515;dx=-1.8199739620906607E-8
Armijo: th(1.0080000000000003E8)=2.1044368479225075; dx=1.5413055447585002E-8 evalInputDelta=-0.698150108145956
Armijo: th(5.0400000000000015E7)=1.6021316520514626; dx=1.5066410145246175E-8 evalInputDelta=-0.19584491227491108
New Minimum: 1.4062867397765515 > 1.3737234844556312
WOLF (strong): th(1.6800000000000004E7)=1.3737234844556312; dx=2.3251201341622176E-9 evalInputDelta=0.032563255320920304
END: th(4200000.000000001)=1.3820275440140615; dx=-1.1418490718018114E-8 evalInputDelta=0.024259195762490027
Fitness changed from 1.4062867397765515 to 1.3737234844556312
Iteration 9 complete. Error: 1.3737234844556312 Total: 76.7236; Orientation: 4.9639; Line Search: 60.4414
Adding measurement 457231aa to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.063e+04, gradient 1.114e-04, dot -0.444; [58b60bb7-40de-4e93-8b77-2787691c965c = 1.000/1.000e+00]
Orientation rejected. Popping history element from 1.3737234844556312, 2.417903135776639, 2.9682541317692905, 3.429912295545435
LBFGS Accumulation History: 3 points
Removed measurement 457231aa to history. Total: 3
th(0)=1.3737234844556312;dx=-1.2410064131791776E-8
New Minimum: 1.3737234844556312 > 1.3523315749030336
END: th(9048625.698133914)=1.3523315749030336; dx=-5.218582376782908E-9 evalInputDelta=0.02139190955259762
Fitness changed from 1.3737234844556312 to 1.3523315749030336
Iteration 10 complete. Error: 1.3523315749030336 Total: 40.4445; Orientation: 4.8551; Line Search: 24.2603
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/0b1282c8-5d28-4fba-9f3f-f9c63377b2b1.jpg)
Final threshold in iteration 11: 1.3523315749030336 (> -Infinity) after 607.073s (< 10800.000s)
Returns
1.3523315749030336