BasicOptimizer.scala:89 executed in 2182.46 seconds (11.397 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: 8982017406653
Reset training subject: 9031127532857
Adding measurement 79930c8f to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-4.269907847046852;dx=-2.745981870077005E-7
New Minimum: -4.269907847046852 > -4.269908249378204
WOLFE (weak): th(2.154434690031884)=-4.269908249378204; dx=-2.481539660300707E-7 evalInputDelta=4.023313522338867E-7
New Minimum: -4.269908249378204 > -4.26990918815136
WOLFE (weak): th(4.308869380063768)=-4.26990918815136; dx=-2.4839345659242247E-7 evalInputDelta=1.341104507446289E-6
New Minimum: -4.26990918815136 > -4.269911408424377
END: th(12.926608140191302)=-4.269911408424377; dx=-2.4683171135212807E-7 evalInputDelta=3.56137752532959E-6
Fitness changed from -4.269907847046852 to -4.269911408424377
Iteration 1 complete. Error: -4.269911408424377 Total: 342.0894; Orientation: 0.0863; Line Search: 195.5256
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/972e1de7-593c-475a-afb7-62254fe8f4e5.jpg)
Adding measurement 7d1f46b6 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-4.269911408424377;dx=-2.0218256613244018E-7
New Minimum: -4.269911408424377 > -4.269918546080589
WOLFE (weak): th(27.849533001676672)=-4.269918546080589; dx=-2.1536887746489727E-7 evalInputDelta=7.137656211853027E-6
New Minimum: -4.269918546080589 > -4.269925266504288
WOLFE (weak): th(55.699066003353344)=-4.269925266504288; dx=-2.153205785523885E-7 evalInputDelta=1.385807991027832E-5
New Minimum: -4.269925266504288 > -4.269952952861786
WOLFE (weak): th(167.09719801006003)=-4.269952952861786; dx=-2.2013083030737629E-7 evalInputDelta=4.1544437408447266E-5
New Minimum: -4.269952952861786 > -4.270077362656593
WOLFE (weak): th(668.3887920402401)=-4.270077362656593; dx=-2.2007731798302933E-7 evalInputDelta=1.6595423221588135E-4
New Minimum: -4.270077362656593 > -4.270740300416946
WOLFE (weak): th(3341.9439602012008)=-4.270740300416946; dx=-2.199645185045795E-7 evalInputDelta=8.288919925689697E-4
New Minimum: -4.270740300416946 > -4.274878144264221
WOLFE (weak): th(20051.663761207205)=-4.274878144264221; dx=-2.194383154048867E-7 evalInputDelta=0.00496673583984375
New Minimum: -4.274878144264221 > -4.3043859004974365
WOLFE (weak): th(140361.64632845044)=-4.3043859004974365; dx=-2.1552513790864473E-7 evalInputDelta=0.03447449207305908
New Minimum: -4.3043859004974365 > -4.52356943488121
END: th(1122893.1706276035)=-4.52356943488121; dx=-1.8010387136420584E-7 evalInputDelta=0.2536580264568329
Fitness changed from -4.269911408424377 to -4.52356943488121
Iteration 2 complete. Error: -4.52356943488121 Total: 494.8193; Orientation: 0.0921; Line Search: 444.5331
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/73f8d180-9f20-47d3-9f8b-6c030320cad3.jpg)
Adding measurement 23454a13 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-4.52356943488121;dx=-1.779080566159538E-7
New Minimum: -4.52356943488121 > -4.928363025188446
END: th(2419200.0000000005)=-4.928363025188446; dx=-1.2318699733189307E-7 evalInputDelta=0.4047935903072357
Fitness changed from -4.52356943488121 to -4.928363025188446
Iteration 3 complete. Error: -4.928363025188446 Total: 149.0951; Orientation: 0.0879; Line Search: 98.6897
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/c55ee345-299b-4176-bd35-e98720de4197.jpg)
Adding measurement 79bceebc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.206e+03, gradient 3.302e-04, dot -0.848; [6aad6b4f-d856-415c-83da-30fe11c39f22 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -4.928363025188446, -4.52356943488121, -4.269911408424377, -4.269907847046852
LBFGS Accumulation History: 3 points
Removed measurement 79bceebc to history. Total: 3
th(0)=-4.928363025188446;dx=-1.0896694468392223E-7
New Minimum: -4.928363025188446 > -5.445259436964989
END: th(5212008.402125134)=-5.445259436964989; dx=-7.104454533480105E-8 evalInputDelta=0.5168964117765427
Fitness changed from -4.928363025188446 to -5.445259436964989
Iteration 4 complete. Error: -5.445259436964989 Total: 150.5008; Orientation: 2.2789; Line Search: 97.8848
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/87ddc51f-6245-47dd-a6f0-e85f7cb25003.jpg)
Adding measurement 78c66104 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.465e+03, gradient 2.558e-04, dot -0.820; [6aad6b4f-d856-415c-83da-30fe11c39f22 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -5.445259436964989, -4.52356943488121, -4.269911408424377, -4.269907847046852
LBFGS Accumulation History: 3 points
Removed measurement 78c66104 to history. Total: 3
th(0)=-5.445259436964989;dx=-6.536906882116643E-8
New Minimum: -5.445259436964989 > -6.082927227020264
END: th(1.1228931706276037E7)=-6.082927227020264; dx=-3.87206271168743E-8 evalInputDelta=0.637667790055275
Fitness changed from -5.445259436964989 to -6.082927227020264
Iteration 5 complete. Error: -6.082927227020264 Total: 149.3606; Orientation: 2.3255; Line Search: 97.5079
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/12fea347-5048-439e-b29f-685ed7c3a05f.jpg)
Adding measurement 2ac0ee45 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.274e+03, gradient 1.942e-04, dot -0.763; [6aad6b4f-d856-415c-83da-30fe11c39f22 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.082927227020264, -4.52356943488121, -4.269911408424377, -4.269907847046852
LBFGS Accumulation History: 3 points
Removed measurement 2ac0ee45 to history. Total: 3
th(0)=-6.082927227020264;dx=-3.8092086565477755E-8
New Minimum: -6.082927227020264 > -6.73712132871151
END: th(2.4192000000000004E7)=-6.73712132871151; dx=-1.5250702350489948E-8 evalInputDelta=0.654194101691246
Fitness changed from -6.082927227020264 to -6.73712132871151
Iteration 6 complete. Error: -6.73712132871151 Total: 150.4059; Orientation: 2.3201; Line Search: 98.3385
Adding measurement 464e95f7 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.603e+03, gradient 1.758e-04, dot -0.503; [6aad6b4f-d856-415c-83da-30fe11c39f22 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -6.73712132871151, -4.52356943488121, -4.269911408424377, -4.269907847046852
LBFGS Accumulation History: 3 points
Removed measurement 464e95f7 to history. Total: 3
th(0)=-6.73712132871151;dx=-3.0700107764477094E-8
New Minimum: -6.73712132871151 > -6.935547292232513
WOLF (strong): th(5.212008402125134E7)=-6.935547292232513; dx=2.8102132992196454E-9 evalInputDelta=0.19842596352100372
New Minimum: -6.935547292232513 > -7.000796630978584
END: th(2.606004201062567E7)=-7.000796630978584; dx=-1.414643835321878E-9 evalInputDelta=0.2636753022670746
Fitness changed from -6.73712132871151 to -7.000796630978584
Iteration 7 complete. Error: -7.000796630978584 Total: 198.8455; Orientation: 2.2158; Line Search: 148.1952
Adding measurement 5540c093 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.375e+03, gradient 2.058e-04, dot -0.279; [6aad6b4f-d856-415c-83da-30fe11c39f22 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.000796630978584, -4.52356943488121, -4.269911408424377, -4.269907847046852
LBFGS Accumulation History: 3 points
Removed measurement 5540c093 to history. Total: 3
th(0)=-7.000796630978584;dx=-4.231329636693764E-8
Armijo: th(5.614465853138019E7)=-6.9958987683057785; dx=7.327570150132348E-9 evalInputDelta=-0.004897862672805786
New Minimum: -7.000796630978584 > -7.193871229887009
WOLF (strong): th(2.8072329265690096E7)=-7.193871229887009; dx=2.182632345230339E-9 evalInputDelta=0.19307459890842438
New Minimum: -7.193871229887009 > -7.213467016816139
END: th(9357443.088563366)=-7.213467016816139; dx=-5.16947830613745E-9 evalInputDelta=0.21267038583755493
Fitness changed from -7.000796630978584 to -7.213467016816139
Iteration 8 complete. Error: -7.213467016816139 Total: 248.2387; Orientation: 2.2723; Line Search: 197.0109
Adding measurement 5bb90ef0 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 2.890e+03, gradient 1.291e-04, dot -0.508; [6aad6b4f-d856-415c-83da-30fe11c39f22 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.213467016816139, -4.52356943488121, -4.269911408424377, -4.269907847046852
LBFGS Accumulation History: 3 points
Removed measurement 5bb90ef0 to history. Total: 3
th(0)=-7.213467016816139;dx=-1.6651608537297533E-8
New Minimum: -7.213467016816139 > -7.372184604406357
END: th(2.0160000000000007E7)=-7.372184604406357; dx=-3.5862880172838204E-9 evalInputDelta=0.1587175875902176
Fitness changed from -7.213467016816139 to -7.372184604406357
Iteration 9 complete. Error: -7.372184604406357 Total: 149.6866; Orientation: 2.2825; Line Search: 98.8381
Adding measurement 1d8933e8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.267e+03, gradient 1.143e-04, dot -0.534; [6aad6b4f-d856-415c-83da-30fe11c39f22 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -7.372184604406357, -4.52356943488121, -4.269911408424377, -4.269907847046852
LBFGS Accumulation History: 3 points
Removed measurement 1d8933e8 to history. Total: 3
th(0)=-7.372184604406357;dx=-1.3388452386628891E-8
New Minimum: -7.372184604406357 > -7.433559939265251
END: th(4.343340335104279E7)=-7.433559939265251; dx=-7.721405764971165E-10 evalInputDelta=0.06137533485889435
Fitness changed from -7.372184604406357 to -7.433559939265251
Iteration 10 complete. Error: -7.433559939265251 Total: 148.3021; Orientation: 2.2531; Line Search: 97.7292
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/90729819-b0a8-4a60-825d-1a673c58ae52.jpg)
Final threshold in iteration 11: -7.433559939265251 (> -Infinity) after 2182.454s (< 5400.000s)
Returns
-7.433559939265251