BasicOptimizer.scala:89 executed in 84.79 seconds (0.831 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: 310896079649000
Reset training subject: 310897870180900
Corrupt weights measurement
LBFGS Accumulation History: 0 points
Constructing line search parameters: GD+Trust
New Minimum: -143.64779246929731 > -143.71268283375318
th(0)=-143.71268283375318;dx=-3.501240251491512E-5
New Minimum: -143.71268283375318 > -143.71274727981276
END: th(2.154434690031884)=-143.71274727981276; dx=-2.6027416902821862E-5 evalInputDelta=6.444605958222382E-5
Fitness changed from -143.64779246929731 to -143.71274727981276
Iteration 1 complete. Error: -143.71274727981276 Total: 8.6342; Orientation: 0.0378; Line Search: 3.6422
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/a6bf95fd-a73e-4000-875f-333c046b6b62.jpg)
Adding measurement 295d11e9 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-143.71274727981276;dx=-2.5956815856425902E-5
New Minimum: -143.71274727981276 > -143.71287617184524
WOLFE (weak): th(4.641588833612779)=-143.71287617184524; dx=-2.594859051039424E-5 evalInputDelta=1.288920324782339E-4
New Minimum: -143.71287617184524 > -143.71301222442077
WOLFE (weak): th(9.283177667225559)=-143.71301222442077; dx=-2.5923827895433617E-5 evalInputDelta=2.64944608005635E-4
New Minimum: -143.71301222442077 > -143.71353495153923
WOLFE (weak): th(27.849533001676676)=-143.71353495153923; dx=-2.5919831034587137E-5 evalInputDelta=7.876717264707622E-4
New Minimum: -143.71353495153923 > -143.71591942235892
WOLFE (weak): th(111.3981320067067)=-143.71591942235892; dx=-2.59052041543985E-5 evalInputDelta=0.003172142546162604
New Minimum: -143.71591942235892 > -143.72862161220257
WOLFE (weak): th(556.9906600335335)=-143.72862161220257; dx=-2.5860946143777708E-5 evalInputDelta=0.015874332389813617
New Minimum: -143.72862161220257 > -143.8080099252582
WOLFE (weak): th(3341.9439602012008)=-143.8080099252582; dx=-2.58662945263304E-5 evalInputDelta=0.0952626454454446
New Minimum: -143.8080099252582 > -144.3788075394161
WOLFE (weak): th(23393.607721408407)=-144.3788075394161; dx=-2.5789104282050348E-5 evalInputDelta=0.6660602596033414
New Minimum: -144.3788075394161 > -148.95218229304282
WOLFE (weak): th(187148.86177126726)=-148.95218229304282; dx=-2.4916373506526106E-5 evalInputDelta=5.239435013230064
New Minimum: -148.95218229304282 > -181.3907772668379
END: th(1684339.7559414054)=-181.3907772668379; dx=-1.4121276684561246E-5 evalInputDelta=37.67802998702513
Fitness changed from -143.71274727981276 to -181.3907772668379
Iteration 2 complete. Error: -181.3907772668379 Total: 18.2608; Orientation: 0.0611; Line Search: 16.3555
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/8aae6948-69aa-496f-8db6-a255e1d1b264.jpg)
Adding measurement 7e50ea1a to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-181.3907772668379;dx=-1.6510406912172373E-5
New Minimum: -181.3907772668379 > -220.56102693822876
END: th(3628800.0000000005)=-220.56102693822876; dx=-4.945628462021925E-6 evalInputDelta=39.17024967139088
Fitness changed from -181.3907772668379 to -220.56102693822876
Iteration 3 complete. Error: -220.56102693822876 Total: 5.4088; Orientation: 0.0641; Line Search: 3.2773
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/3d967c09-123a-4f92-bb15-8cf37b9ae150.jpg)
Adding measurement 180fe3da to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-220.56102693822876;dx=-1.0440332182822166E-5
New Minimum: -220.56102693822876 > -246.00205987196426
WOLF (strong): th(7818012.603187701)=-246.00205987196426; dx=6.137129646269302E-7 evalInputDelta=25.4410329337355
END: th(3909006.3015938504)=-244.26349599827304; dx=-2.21086300205241E-6 evalInputDelta=23.70246906004428
Fitness changed from -220.56102693822876 to -246.00205987196426
Iteration 4 complete. Error: -246.00205987196426 Total: 6.9074; Orientation: 0.0637; Line Search: 4.9972
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/e9addd78-8df0-46ff-89cb-f4ec3d33e7c9.jpg)
Adding measurement 77c8c885 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.787e+04, gradient 3.847e-03, dot -0.406; [42e3b517-b7eb-4f19-9d54-6b7dcc97e0d5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -246.00205987196426, -220.56102693822876, -181.3907772668379, -143.71274727981276
LBFGS Accumulation History: 3 points
Removed measurement 77c8c885 to history. Total: 3
th(0)=-246.00205987196426;dx=-1.4790465377274483E-5
New Minimum: -246.00205987196426 > -251.7007437689343
WOLF (strong): th(8421698.779707028)=-251.7007437689343; dx=5.4095154621552485E-6 evalInputDelta=5.698683896970039
New Minimum: -251.7007437689343 > -273.3116616125662
WOLF (strong): th(4210849.389853514)=-273.3116616125662; dx=1.6026900810608827E-6 evalInputDelta=27.30960174060192
END: th(1403616.4632845046)=-264.2229546587412; dx=-8.81369317301108E-6 evalInputDelta=18.22089478677691
Fitness changed from -246.00205987196426 to -273.3116616125662
Iteration 5 complete. Error: -273.3116616125662 Total: 9.7976; Orientation: 1.0909; Line Search: 6.7724
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/36d17684-44a6-4b95-8dde-aa000c6dceb2.jpg)
Adding measurement 15be9779 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.892e+04, gradient 2.999e-03, dot -0.411; [42e3b517-b7eb-4f19-9d54-6b7dcc97e0d5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -273.3116616125662, -220.56102693822876, -181.3907772668379, -143.71274727981276
LBFGS Accumulation History: 3 points
Removed measurement 15be9779 to history. Total: 3
th(0)=-273.3116616125662;dx=-8.992484813205121E-6
New Minimum: -273.3116616125662 > -289.61321780524963
END: th(3024000.0000000005)=-289.61321780524963; dx=-1.2231116350870584E-6 evalInputDelta=16.30155619268345
Fitness changed from -273.3116616125662 to -289.61321780524963
Iteration 6 complete. Error: -289.61321780524963 Total: 6.2647; Orientation: 1.0759; Line Search: 3.2653
Adding measurement 2cb01e79 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.012e+04, gradient 2.173e-03, dot -0.527; [42e3b517-b7eb-4f19-9d54-6b7dcc97e0d5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -289.61321780524963, -220.56102693822876, -181.3907772668379, -143.71274727981276
LBFGS Accumulation History: 3 points
Removed measurement 2cb01e79 to history. Total: 3
th(0)=-289.61321780524963;dx=-4.70638648425342E-6
New Minimum: -289.61321780524963 > -301.083232141405
WOLF (strong): th(6515010.502656418)=-301.083232141405; dx=4.256482377834318E-7 evalInputDelta=11.470014336155373
END: th(3257505.251328209)=-300.06351064660004; dx=-1.5109998464514026E-6 evalInputDelta=10.450292841350404
Fitness changed from -289.61321780524963 to -301.083232141405
Iteration 7 complete. Error: -301.083232141405 Total: 7.5862; Orientation: 1.1564; Line Search: 4.8639
Adding measurement 667df4b8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.454e+04, gradient 2.910e-03, dot -0.368; [42e3b517-b7eb-4f19-9d54-6b7dcc97e0d5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -301.083232141405, -220.56102693822876, -181.3907772668379, -143.71274727981276
LBFGS Accumulation History: 3 points
Removed measurement 667df4b8 to history. Total: 3
th(0)=-301.083232141405;dx=-8.466636348186721E-6
Armijo: th(7018082.316422524)=-299.92642119580387; dx=4.540907447120559E-6 evalInputDelta=-1.156810945601137
New Minimum: -301.083232141405 > -314.0216620180095
WOLF (strong): th(3509041.158211262)=-314.0216620180095; dx=1.202772933563184E-6 evalInputDelta=12.938429876604516
END: th(1169680.3860704207)=-309.79139121618084; dx=-5.1364884561770235E-6 evalInputDelta=8.708159074775836
Fitness changed from -301.083232141405 to -314.0216620180095
Iteration 8 complete. Error: -314.0216620180095 Total: 9.2612; Orientation: 1.0652; Line Search: 6.5915
Adding measurement 7ae0a6c1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.036e+04, gradient 2.194e-03, dot -0.437; [42e3b517-b7eb-4f19-9d54-6b7dcc97e0d5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -314.0216620180095, -220.56102693822876, -181.3907772668379, -143.71274727981276
LBFGS Accumulation History: 3 points
Removed measurement 7ae0a6c1 to history. Total: 3
th(0)=-314.0216620180095;dx=-4.8078745166164135E-6
New Minimum: -314.0216620180095 > -321.98786302529055
END: th(2520000.000000001)=-321.98786302529055; dx=-1.1977100309778417E-6 evalInputDelta=7.966201007281029
Fitness changed from -314.0216620180095 to -321.98786302529055
Iteration 9 complete. Error: -321.98786302529055 Total: 6.1983; Orientation: 1.1363; Line Search: 3.4261
Adding measurement 3b96d6ba to history. Total: 3
Rejected: LBFGS Orientation magnitude: 4.090e+04, gradient 1.592e-03, dot -0.544; [42e3b517-b7eb-4f19-9d54-6b7dcc97e0d5 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -321.98786302529055, -220.56102693822876, -181.3907772668379, -143.71274727981276
LBFGS Accumulation History: 3 points
Removed measurement 3b96d6ba to history. Total: 3
th(0)=-321.98786302529055;dx=-2.535364581191914E-6
New Minimum: -321.98786302529055 > -329.97508729679095
END: th(5429175.418880349)=-329.97508729679095; dx=-6.206072368711298E-7 evalInputDelta=7.987224271500395
Fitness changed from -321.98786302529055 to -329.97508729679095
Iteration 10 complete. Error: -329.97508729679095 Total: 6.1633; Orientation: 1.0381; Line Search: 3.4869
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/18493464-5d16-487b-9ac3-71cd63b06c52.jpg)
Final threshold in iteration 11: -329.97508729679095 (> -Infinity) after 84.794s (< 5400.000s)
Returns
-329.97508729679095