BasicOptimizer.scala:89 executed in 202.84 seconds (4.287 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: 1753413294123
Reset training subject: 1754513978120
Adding measurement 540b4aac to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-0.03890293017799643;dx=-4.10658387135727E-5
New Minimum: -0.03890293017799643 > -0.038940960548319935
WOLFE (weak): th(2.154434690031884)=-0.038940960548319935; dx=-4.100381649360974E-5 evalInputDelta=3.803037032350243E-5
New Minimum: -0.038940960548319935 > -0.03897887349486347
WOLFE (weak): th(4.308869380063768)=-0.03897887349486347; dx=-4.099315845501391E-5 evalInputDelta=7.594331686703454E-5
New Minimum: -0.03897887349486347 > -0.03913179008574598
WOLFE (weak): th(12.926608140191302)=-0.03913179008574598; dx=-4.126779612115695E-5 evalInputDelta=2.2885990774954706E-4
New Minimum: -0.03913179008574598 > -0.039826640584503935
WOLFE (weak): th(51.70643256076521)=-0.039826640584503935; dx=-4.1505860608533774E-5 evalInputDelta=9.237104065075025E-4
New Minimum: -0.039826640584503935 > -0.043607462539720386
WOLFE (weak): th(258.53216280382605)=-0.043607462539720386; dx=-4.2389342525554554E-5 evalInputDelta=0.004704532361723954
New Minimum: -0.043607462539720386 > -0.06817230985020765
WOLFE (weak): th(1551.1929768229563)=-0.06817230985020765; dx=-4.321464094587182E-5 evalInputDelta=0.029269379672211222
New Minimum: -0.06817230985020765 > -0.2368935528945768
END: th(10858.350837760694)=-0.2368935528945768; dx=-2.7904183056046804E-5 evalInputDelta=0.19799062271658038
Fitness changed from -0.03890293017799643 to -0.2368935528945768
Iteration 1 complete. Error: -0.2368935528945768 Total: 13.3371; Orientation: 0.0194; Line Search: 8.8561
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>
Adding measurement 7a62ffb9 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-0.2368935528945768;dx=-1.4997659059571547E-4
New Minimum: -0.2368935528945768 > -1.4549241398575665
END: th(23393.607721408407)=-1.4549241398575665; dx=-5.0915026943191155E-6 evalInputDelta=1.2180305869629897
Fitness changed from -0.2368935528945768 to -1.4549241398575665
Iteration 2 complete. Error: -1.4549241398575665 Total: 3.4739; Orientation: 0.0188; Line Search: 2.3738
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>
Adding measurement 2e163c05 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-1.4549241398575665;dx=-6.894471532433644E-4
New Minimum: -1.4549241398575665 > -2.555294311732731
WOLF (strong): th(50400.00000000001)=-2.555294311732731; dx=2.7811924738165786E-6 evalInputDelta=1.1003701718751646
New Minimum: -2.555294311732731 > -3.5245470378074812
END: th(25200.000000000004)=-3.5245470378074812; dx=-1.5554827398539863E-5 evalInputDelta=2.0696228979499147
Fitness changed from -1.4549241398575665 to -3.5245470378074812
Iteration 3 complete. Error: -3.5245470378074812 Total: 4.4277; Orientation: 0.0177; Line Search: 3.3102
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>
Adding measurement 4f51966a to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.089e+03, gradient 4.571e-02, dot -0.040; [1c65956f-297b-4b4f-b395-4c292f3f9091 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -3.5245470378074812, -1.4549241398575665, -0.2368935528945768, -0.03890293017799643
LBFGS Accumulation History: 3 points
Removed measurement 4f51966a to history. Total: 3
th(0)=-3.5245470378074812;dx=-0.002088573395702809
Armijo: th(54291.75418880348)=-3.366900316980617; dx=7.610494592305907E-5 evalInputDelta=-0.15764672082686415
New Minimum: -3.5245470378074812 > -7.3014396608818
WOLF (strong): th(27145.87709440174)=-7.3014396608818; dx=6.471479367200731E-5 evalInputDelta=3.776892623074319
New Minimum: -7.3014396608818 > -9.323845716467313
END: th(9048.625698133914)=-9.323845716467313; dx=-5.57741620802889E-5 evalInputDelta=5.799298678659831
Fitness changed from -3.5245470378074812 to -9.323845716467313
Iteration 4 complete. Error: -9.323845716467313 Total: 5.9454; Orientation: 0.4399; Line Search: 4.4311
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>
Adding measurement 325868a8 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.703e+03, gradient 4.355e-02, dot -0.039; [1c65956f-297b-4b4f-b395-4c292f3f9091 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -9.323845716467313, -1.4549241398575665, -0.2368935528945768, -0.03890293017799643
LBFGS Accumulation History: 3 points
Removed measurement 325868a8 to history. Total: 3
th(0)=-9.323845716467313;dx=-0.001896306458706416
New Minimum: -9.323845716467313 > -12.215904558914474
WOLF (strong): th(19494.673101173677)=-12.215904558914474; dx=8.3261459388605E-5 evalInputDelta=2.8920588424471614
New Minimum: -12.215904558914474 > -15.083917291442303
WOLF (strong): th(9747.336550586839)=-15.083917291442303; dx=2.1787352835899173E-5 evalInputDelta=5.76007157497499
END: th(3249.1121835289464)=-13.735567822938297; dx=-9.320691228137954E-4 evalInputDelta=4.411722106470984
Fitness changed from -9.323845716467313 to -15.083917291442303
Iteration 5 complete. Error: -15.083917291442303 Total: 6.0729; Orientation: 0.5348; Line Search: 4.4512
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>
Adding measurement 5662a009 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.182e+04, gradient 5.545e-02, dot -0.034; [1c65956f-297b-4b4f-b395-4c292f3f9091 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -15.083917291442303, -1.4549241398575665, -0.2368935528945768, -0.03890293017799643
LBFGS Accumulation History: 3 points
Removed measurement 5662a009 to history. Total: 3
th(0)=-15.083917291442303;dx=-0.0030741674148374388
New Minimum: -15.083917291442303 > -21.45768338777513
END: th(7000.000000000003)=-21.45768338777513; dx=-1.5344382422308774E-4 evalInputDelta=6.373766096332828
Fitness changed from -15.083917291442303 to -21.45768338777513
Iteration 6 complete. Error: -21.45768338777513 Total: 3.7493; Orientation: 0.4477; Line Search: 2.2193
Adding measurement 5950dd60 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.316e+04, gradient 4.900e-02, dot -0.033; [1c65956f-297b-4b4f-b395-4c292f3f9091 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -21.45768338777513, -1.4549241398575665, -0.2368935528945768, -0.03890293017799643
LBFGS Accumulation History: 3 points
Removed measurement 5950dd60 to history. Total: 3
th(0)=-21.45768338777513;dx=-0.002400497672914227
New Minimum: -21.45768338777513 > -27.186717934241415
WOLF (strong): th(15081.042830223192)=-27.186717934241415; dx=4.909564507012937E-5 evalInputDelta=5.729034546466284
New Minimum: -27.186717934241415 > -28.55575846866945
END: th(7540.521415111596)=-28.55575846866945; dx=-3.0940959052450307E-4 evalInputDelta=7.0980750808943185
Fitness changed from -21.45768338777513 to -28.55575846866945
Iteration 7 complete. Error: -28.55575846866945 Total: 4.8249; Orientation: 0.4408; Line Search: 3.3197
Adding measurement 765e7b3d to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.969e+04, gradient 5.679e-02, dot -0.048; [1c65956f-297b-4b4f-b395-4c292f3f9091 = 1.000/1.000e+00]
Orientation rejected. Popping history element from -28.55575846866945, -1.4549241398575665, -0.2368935528945768, -0.03890293017799643
LBFGS Accumulation History: 3 points
Removed measurement 765e7b3d to history. Total: 3
th(0)=-28.55575846866945;dx=-0.003224659664076924
New Minimum: -28.55575846866945 > -33.43626146958596
WOLF (strong): th(16245.560917644734)=-33.43626146958596; dx=1.1608181096838872E-4 evalInputDelta=4.880503000916509
New Minimum: -33.43626146958596 > -35.36702472174503
END: th(8122.780458822367)=-35.36702472174503; dx=-1.3147945423990697E-4 evalInputDelta=6.811266253075583
Fitness changed from -28.55575846866945 to -35.36702472174503
Iteration 8 complete. Error: -35.36702472174503 Total: 4.7911; Orientation: 0.4359; Line Search: 3.3140
Adding measurement 3606fd9d to history. Total: 3
Rejected: L
...skipping 10989 bytes...
1-4c4a-8b4e-6c1604229032.jpg)
Adding measurement 2ddde1a to history. Total: 5
Accepted: LBFGS Orientation magnitude: 1.775e+06, gradient 8.576e-02, dot 0.052; [1c65956f-297b-4b4f-b395-4c292f3f9091 = 1.000/1.000e+00]
th(0)=-66.39432927595757;dx=-7863.408878231192
New Minimum: -66.39432927595757 > -67.23764333593692
END: th(2.9365881986256415E-4)=-67.23764333593692; dx=-3113.493392702726 evalInputDelta=0.8433140599793489
Fitness changed from -66.39432927595757 to -67.23764333593692
Iteration 16 complete. Error: -67.23764333593692 Total: 3.9637; Orientation: 0.6449; Line Search: 2.2357
Adding measurement 5111738b to history. Total: 6
Accepted: LBFGS Orientation magnitude: 8.599e+05, gradient 8.842e-02, dot 0.024; [1c65956f-297b-4b4f-b395-4c292f3f9091 = 1.000/1.000e+00]
th(0)=-67.23764333593692;dx=-1853.3523711421667
Armijo: th(6.326687485457322E-4)=-66.80310290736737; dx=-521.0766835988019 evalInputDelta=-0.434540428569548
Armijo: th(3.163343742728661E-4)=-67.12546005947054; dx=-954.036651455567 evalInputDelta=-0.11218327646638215
Armijo: th(1.054447914242887E-4)=-67.23756521718603; dx=-1327.064976124611 evalInputDelta=-7.811875089203113E-5
New Minimum: -67.23764333593692 > -67.24170183528628
END: th(2.6361197856072174E-5)=-67.24170183528628; dx=-1480.2235227196466 evalInputDelta=0.004058499349355316
Fitness changed from -67.23764333593692 to -67.24170183528628
Iteration 17 complete. Error: -67.24170183528628 Total: 8.5704; Orientation: 0.7562; Line Search: 6.7631
Adding measurement 7b41ecc8 to history. Total: 7
Accepted: LBFGS Orientation magnitude: 8.510e+05, gradient 8.849e-02, dot 0.024; [1c65956f-297b-4b4f-b395-4c292f3f9091 = 1.000/1.000e+00]
th(0)=-67.24170183528628;dx=-1822.7426212294808
New Minimum: -67.24170183528628 > -67.2417763985995
END: th(5.679347913191602E-5)=-67.2417763985995; dx=-1301.835068958595 evalInputDelta=7.45633132197554E-5
Fitness changed from -67.24170183528628 to -67.2417763985995
Iteration 18 complete. Error: -67.2417763985995 Total: 4.2294; Orientation: 0.9627; Line Search: 2.2234
Adding measurement 173f3019 to history. Total: 8
Accepted: LBFGS Orientation magnitude: 7.908e+05, gradient 8.887e-02, dot 0.022; [1c65956f-297b-4b4f-b395-4c292f3f9091 = 1.000/1.000e+00]
th(0)=-67.2417763985995;dx=-1570.827598007121
Armijo: th(1.2235784160940174E-4)=-67.21087169699388; dx=-1061.4651956070559 evalInputDelta=-0.0309047016056212
Armijo: th(6.117892080470087E-5)=-67.23078629445585; dx=-1186.8403551247225 evalInputDelta=-0.01099010414364443
Armijo: th(2.0392973601566955E-5)=-67.23823277449479; dx=-1191.84228361483 evalInputDelta=-0.0035436241047079875
Armijo: th(5.098243400391739E-6)=-67.24095974828163; dx=-1202.3686103517143 evalInputDelta=-8.166503178728135E-4
Armijo: th(1.0196486800783477E-6)=-67.24163437316973; dx=-1196.091493243086 evalInputDelta=-1.4202542976704535E-4
Armijo: th(1.6994144667972462E-7)=-67.24175154417095; dx=-1194.2781364185398 evalInputDelta=-2.4854428545495466E-5
Armijo: th(2.4277349525674945E-8)=-67.24176929733514; dx=-1196.626861551658 evalInputDelta=-7.101264358766457E-6
New Minimum: -67.2417763985995 > -67.2417799492314
END: th(3.034668690709368E-9)=-67.2417799492314; dx=-1196.4276668630137 evalInputDelta=3.5506319022715616E-6
Fitness changed from -67.2417763985995 to -67.2417799492314
Iteration 19 complete. Error: -67.2417799492314 Total: 12.1798; Orientation: 0.9450; Line Search: 10.1939
Adding measurement 30a1dd95 to history. Total: 9
Accepted: LBFGS Orientation magnitude: 7.925e+05, gradient 8.884e-02, dot 0.022; [1c65956f-297b-4b4f-b395-4c292f3f9091 = 1.000/1.000e+00]
th(0)=-67.2417799492314;dx=-1575.315313383613
Armijo: th(6.5379955000179E-9)=-67.2417763985995; dx=-1200.2673237107408 evalInputDelta=-3.5506319022715616E-6
Armijo: th(3.26899775000895E-9)=-67.2417799492314; dx=-1199.0179765139792 evalInputDelta=0.0
New Minimum: -67.2417799492314 > -67.24178349986312
END: th(1.08966591666965E-9)=-67.24178349986312; dx=-1197.1506574320226 evalInputDelta=3.5506317175304503E-6
Fitness changed from -67.2417799492314 to -67.24178349986312
Iteration 20 complete. Error: -67.24178349986312 Total: 6.6949; Orientation: 1.1288; Line Search: 4.4878
<a id="p-17"></a>Iteration 20
<a id="p-16"></a>
Adding measurement 49dc9f5f to history. Total: 10
Accepted: LBFGS Orientation magnitude: 7.922e+05, gradient 8.884e-02, dot 0.022; [1c65956f-297b-4b4f-b395-4c292f3f9091 = 1.000/1.000e+00]
th(0)=-67.24178349986312;dx=-1574.6719656067653
Armijo: th(2.3476140514184857E-9)=-67.2417763985995; dx=-1199.2724572320185 evalInputDelta=-7.101263619802012E-6
Armijo: th(1.1738070257092428E-9)=-67.2417763985995; dx=-1196.945622382471 evalInputDelta=-7.101263619802012E-6
Armijo: th(3.912690085697476E-10)=-67.24178349986312; dx=-1198.6455201853207 evalInputDelta=0.0
MIN ALPHA (9.78172521424369E-11): th(0.0)=-67.24178349986312
Fitness changed from -67.24178349986312 to -67.24178349986312
Static Iteration Total: 7.7854; Orientation: 1.1612; Line Search: 5.5515
Iteration 21 failed. Error: -67.24178349986312
Previous Error: 0.0 -> -67.24178349986312
Retrying iteration 21
Reset training subject: 1924923782780
Adding measurement 7390e2d9 to history. Total: 0
LBFGS Accumulation History: 1 points
th(0)=-67.24178349986312;dx=-0.007891170649302049
WOLFE (weak): th(2.1544346900318838E-10)=-67.24178349986312; dx=-0.007869600544028382 evalInputDelta=0.0
WOLFE (weak): th(4.3088693800637676E-10)=-67.24178349986312; dx=-0.007869651826115813 evalInputDelta=0.0
WOLFE (weak): th(1.2926608140191302E-9)=-67.24178349986312; dx=-0.007869476941071605 evalInputDelta=0.0
WOLFE (weak): th(5.170643256076521E-9)=-67.24178349986312; dx=-0.007869406726857285 evalInputDelta=0.0
Armijo: th(2.5853216280382606E-8)=-67.2417763985995; dx=-0.007869567817509976 evalInputDelta=-7.101263619802012E-6
Armijo: th(1.5511929768229562E-8)=-67.2417763985995; dx=-0.007869555269983713 evalInputDelta=-7.101263619802012E-6
WOLFE (weak): th(1.0341286512153042E-8)=-67.24178349986312; dx=-0.007869365726162184 evalInputDelta=0.0
Armijo: th(1.2926608140191303E-8)=-67.2417763985995; dx=-0.007869531933701154 evalInputDelta=-7.101263619802012E-6
WOLFE (weak): th(1.1633947326172171E-8)=-67.24178349986312; dx=-0.007869620321954833 evalInputDelta=0.0
WOLFE (weak): th(1.2280277733181737E-8)=-67.24178349986312; dx=-0.00786954227403928 evalInputDelta=0.0
Armijo: th(1.260344293668652E-8)=-67.2417763985995; dx=-0.007869561374404685 evalInputDelta=-7.101263619802012E-6
WOLFE (weak): th(1.2441860334934129E-8)=-67.24178349986312; dx=-0.007869545241439083 evalInputDelta=0.0
Armijo: th(1.2522651635810323E-8)=-67.2417763985995; dx=-0.007869415767106605 evalInputDelta=-7.101263619802012E-6
WOLFE (weak): th(1.2482255985372225E-8)=-67.24178349986312; dx=-0.007869735664175382 evalInputDelta=0.0
Armijo: th(1.2502453810591274E-8)=-67.2417763985995; dx=-0.007869542222611853 evalInputDelta=-7.101263619802012E-6
WOLFE (weak): th(1.249235489798175E-8)=-67.24178349986312; dx=-0.007869568143622774 evalInputDelta=0.0
WOLFE (weak): th(1.2497404354286511E-8)=-67.24178349986312; dx=-0.007869320130784915 evalInputDelta=0.0
WOLFE (weak): th(1.2499929082438893E-8)=-67.24178349986312; dx=-0.007869424572369475 evalInputDelta=0.0
WOLFE (weak): th(1.2501191446515084E-8)=-67.24178349986312; dx=-0.007868942032613652 evalInputDelta=0.0
Armijo: th(1.250182262855318E-8)=-67.2417763985995; dx=-0.007869576793352926 evalInputDelta=-7.101263619802012E-6
WOLFE (weak): th(1.2501507037534131E-8)=-67.24178349986312; dx=-0.007869631150569217 evalInputDelta=0.0
WOLFE (weak): th(1.2501664833043656E-8)=-67.24178349986312; dx=-0.007869467099183444 evalInputDelta=0.0
Armijo: th(1.2501743730798417E-8)=-67.2417763985995; dx=-0.007869734155461598 evalInputDelta=-7.101263619802012E-6
mu ~= nu (1.2501664833043656E-8): th(0.0)=-67.24178349986312
Fitness changed from -67.24178349986312 to -67.24178349986312
Static Iteration Total: 31.3283; Orientation: 0.0182; Line Search: 29.1978
Iteration 22 failed. Error: -67.24178349986312
Previous Error: 0.0 -> -67.24178349986312
Optimization terminated 22
Final threshold in iteration 22: -67.24178349986312 (> -Infinity) after 202.839s (< 3600.000s)
Returns
-67.24178349986312