BasicOptimizer.scala:89 executed in 45.48 seconds (0.843 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: 216857937311000
Reset training subject: 216858578922900
Adding measurement 57dc566f to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-142.0856709546216;dx=-0.24951812283939492
New Minimum: -142.0856709546216 > -142.3941349574838
WOLFE (weak): th(2.154434690031884)=-142.3941349574838; dx=-0.24917835229536495 evalInputDelta=0.3084640028621948
New Minimum: -142.3941349574838 > -142.70154089663956
WOLFE (weak): th(4.308869380063768)=-142.70154089663956; dx=-0.24895200757975944 evalInputDelta=0.6158699420179516
New Minimum: -142.70154089663956 > -143.89562464504434
WOLFE (weak): th(12.926608140191302)=-143.89562464504434; dx=-0.24620221819270055 evalInputDelta=1.8099536904227307
New Minimum: -143.89562464504434 > -148.87434026724935
WOLFE (weak): th(51.70643256076521)=-148.87434026724935; dx=-0.23369524655690377 evalInputDelta=6.788669312627746
New Minimum: -148.87434026724935 > -163.11750116825044
END: th(258.53216280382605)=-163.11750116825044; dx=-0.14553453053522442 evalInputDelta=21.031830213628837
Fitness changed from -142.0856709546216 to -163.11750116825044
Iteration 1 complete. Error: -163.11750116825044 Total: 5.4826; Orientation: 0.0165; Line Search: 3.7155
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/05b20462-ec21-4850-b804-e9fc905108e4.jpg)
Adding measurement 4afbdd3b to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-163.11750116825044;dx=-0.25408115070688797
New Minimum: -163.11750116825044 > -201.98452653666814
END: th(556.9906600335335)=-201.98452653666814; dx=-0.11578129533282679 evalInputDelta=38.8670253684177
Fitness changed from -163.11750116825044 to -201.98452653666814
Iteration 2 complete. Error: -201.98452653666814 Total: 1.7802; Orientation: 0.0157; Line Search: 1.2047
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/8b46c925-fb1c-438e-8200-96bdd42d02ee.jpg)
Adding measurement 30d75d44 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-201.98452653666814;dx=-0.21235477278383666
New Minimum: -201.98452653666814 > -280.2085894183012
END: th(1200.0)=-280.2085894183012; dx=-0.09133337108359102 evalInputDelta=78.22406288163305
Fitness changed from -201.98452653666814 to -280.2085894183012
Iteration 3 complete. Error: -280.2085894183012 Total: 1.7800; Orientation: 0.0158; Line Search: 1.2048
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/d7d287be-d21f-4f40-976c-e5e089121a37.jpg)
Adding measurement 425e8ea3 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.093e+03, gradient 4.663e-01, dot -0.437; [22226502-1333-4cab-9ead-7c5bee70beef = 1.000/1.000e+00]
Orientation rejected. Popping history element from -280.2085894183012, -201.98452653666814, -163.11750116825044, -142.0856709546216
LBFGS Accumulation History: 3 points
Removed measurement 425e8ea3 to history. Total: 3
th(0)=-280.2085894183012;dx=-0.2172836740094571
New Minimum: -280.2085894183012 > -371.8183746143308
END: th(2585.3216280382608)=-371.8183746143308; dx=-0.053484174190385064 evalInputDelta=91.60978519602963
Fitness changed from -280.2085894183012 to -371.8183746143308
Iteration 4 complete. Error: -371.8183746143308 Total: 2.4126; Orientation: 0.2974; Line Search: 1.5292
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/f5487acc-4196-41d9-9bb2-df1b3cbef329.jpg)
Adding measurement 6e7c44fd to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.493e+03, gradient 4.411e-01, dot -0.334; [22226502-1333-4cab-9ead-7c5bee70beef = 1.000/1.000e+00]
Orientation rejected. Popping history element from -371.8183746143308, -201.98452653666814, -163.11750116825044, -142.0856709546216
LBFGS Accumulation History: 3 points
Removed measurement 6e7c44fd to history. Total: 3
th(0)=-371.8183746143308;dx=-0.19412603246776167
New Minimum: -371.8183746143308 > -442.01592884354216
END: th(5569.9066003353355)=-442.01592884354216; dx=-0.02565746596114291 evalInputDelta=70.19755422921133
Fitness changed from -371.8183746143308 to -442.01592884354216
Iteration 5 complete. Error: -442.01592884354216 Total: 2.0468; Orientation: 0.2927; Line Search: 1.2018
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/6c8b63fb-0c74-44f8-9612-cb43a3c63406.jpg)
Adding measurement 5650b071 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.213e+03, gradient 4.095e-01, dot -0.223; [22226502-1333-4cab-9ead-7c5bee70beef = 1.000/1.000e+00]
Orientation rejected. Popping history element from -442.01592884354216, -201.98452653666814, -163.11750116825044, -142.0856709546216
LBFGS Accumulation History: 3 points
Removed measurement 5650b071 to history. Total: 3
th(0)=-442.01592884354216;dx=-0.1675580329863504
New Minimum: -442.01592884354216 > -497.1402035738231
END: th(12000.000000000002)=-497.1402035738231; dx=-0.0119015930555091 evalInputDelta=55.124274730280945
Fitness changed from -442.01592884354216 to -497.1402035738231
Iteration 6 complete. Error: -497.1402035738231 Total: 2.1372; Orientation: 0.3012; Line Search: 1.2500
Adding measurement 5aa3ee1 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.418e+03, gradient 3.836e-01, dot -0.139; [22226502-1333-4cab-9ead-7c5bee70beef = 1.000/1.000e+00]
Orientation rejected. Popping history element from -497.1402035738231, -201.98452653666814, -163.11750116825044, -142.0856709546216
LBFGS Accumulation History: 3 points
Removed measurement 5aa3ee1 to history. Total: 3
th(0)=-497.1402035738231;dx=-0.1469805377391482
Armijo: th(25853.21628038261)=-400.9227310174753; dx=-0.0013081185277644442 evalInputDelta=-96.21747255634779
New Minimum: -497.1402035738231 > -655.0553599996882
END: th(12926.608140191305)=-655.0553599996882; dx=-0.014822325376028588 evalInputDelta=157.91515642586512
Fitness changed from -497.1402035738231 to -655.0553599996882
Iteration 7 complete. Error: -655.0553599996882 Total: 2.7094; Orientation: 0.2920; Line Search: 1.8496
Adding measurement 1b3e1b17 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.438e+03, gradient 3.619e-01, dot -0.150; [22226502-1333-4cab-9ead-7c5bee70beef = 1.000/1.000e+00]
Orientation rejected. Popping history element from -655.0553599996882, -201.98452653666814, -163.11750116825044, -142.0856709546216
LBFGS Accumulation History: 3 points
Removed measurement 1b3e1b17 to history. Total: 3
th(0)=-655.0553599996882;dx=-0.1307675879312397
Armijo: th(27849.533001676682)=-501.28775130680947; dx=-1.1759840332199219E-5 evalInputDelta=-153.76760869287875
New Minimum: -655.0553599996882 > -877.3627413610039
END: th(13924.766500838341)=-877.3627413610039; dx=-0.016403726930342227 evalInputDelta=222.30738136131572
Fitness changed from -655.0553599996882 to -877.3627413610039
Iteration 8 complete. Error: -877.3627413610039 Total: 2.6788; Orientation: 0.2963; Line Search: 1.8231
Adding measurement 1d12c72b to history. Total: 3
Rejected: LBFGS Orientation magnitude: 1.370e+04, gradient 3.657e-01, dot -0.169; [22226502-1333-4cab-9ead-7c5bee70beef = 1.000/1.000e+00]
Orientation rejected. Popping history element from -877.3627413610039, -201.98452653666814, -163.11750116825044, -142.0856709546216
LBFGS Accumulation History: 3 points
Removed measurement 1d12c72b to history. Total: 3
th(0)=-877.3627413610039;dx=-0.13360193947488164
Armijo: th(30000.00000000001)=-691.5642348160684; dx=0.003983764302974503 evalInputDelta=-185.79850654493555
New Minimum: -877.3627413610039 > -1164.7694818034963
END: th(15000.000000000005)=-1164.7694818034963; dx=-0.01426253267284668 evalInputDelta=287.4067404424924
Fitness changed from -877.3627413610039 to -1164.7694818034963
Iteration 9 complete. Error: -1164.7694818034963 Total: 2.9528; Orientation: 0.2933; Line Search: 2.0906
Adding measurement 3f7cc880 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.701e+04, gradient 3.580e-01, dot -0.195; [22226502-1333-4cab-9ead-7c5bee70beef = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1164.7694818034963, -201.98452653666814, -163.11750116825044, -142.0856709546216
LBFGS Accumulation History: 3 points
Removed measurement 3f7cc880 to history. Total: 3
th(0)=-1164.7694818034963;dx=-0.12799859291393348
Armijo: th(32316.52035047827)=-913.4634667259312; dx=0.004503273462897054 evalInputDelta=-251.30601507756512
New Minimum: -1164.7694818034963 > -1447.4722661002131
END: th(16158.260175239135)=-1447.4722661002131; dx=-0.015076470741208055 evalInputDelta=282.7027842967168
Fitness changed from -1164.7694818034963 to -1447.4722661002131
Iteration 10 complete. Error: -1447.4722661002131 Total: 2.6383; Orientation: 0.2792; Line Search: 1.7825
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/165d7ff8-b021-4f73-91df-75a746603ceb.jpg)
Adding measurement 30a8c778 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 7.646e+05, gradient 3.579e-01, dot -0.222; [22226502-1333-4cab-9ead-7c5bee70beef = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1447.4722661002131, -201.98452653666814, -163.11750116825044, -142.0856709546216
LBFGS Accumulation History: 3 points
Removed measurement 30a8c778 to history. Total: 3
th(0)=-1447.4722661002131;dx=-0.12795021224161518
Armijo: th(34811.916252095856)=-1097.049733250441; dx=0.0069335855735010235 evalInputDelta=-350.4225328497721
New Minimum: -1447.4722661002131 > -1737.8206748905775
END: th(17405.958126047928)=-1737.8206748905775; dx=-0.011751481501164607 evalInputDelta=290.3484087903644
Fitness changed from -1447.4722661002131 to -1737.8206748905775
Iteration 11 complete. Error: -1737.8206748905775 Total: 2.6850; Orientation: 0.2904; Line Search: 1.8199
Adding measurement 4e055974 to history. Total: 3
Accepted: LBFGS Orientation magnitude: 7.115e+04, gradient 3.772e-01, dot 0.232; [22226502-1333-4cab-9ead-7c5bee70beef = 1.000/1.000e+00]
Constructing line search parameters: LBFGS+Trust
th(0)=-1737.8206748905775;dx=-6232.9315462750965
Armijo: th(37500.000000000015)=400.22113633924846; dx=0.031061132703208455 evalInputDelta=-2138.0418112298257
Armijo: th(18750.000000000007)=398.12313467834764; dx=0.06174552766717808 evalInputDelta=-2135.943809568925
Armijo: th(6250.000000000003)=395.8518162069847; dx=0.185626996513245 evalInputDelta=-2133.672491097562
Armijo: th(1562.5000000000007)=384.2804438980368; dx=0.7292958754322814 evalInputDelta=-2122.1011187886143
Armijo: th(312.5000000000001)=354.147984736424; dx=3.5229038643938573 evalInputDelta=-2091.9686596270017
Armijo: th(52.08333333333335)=317.3955612950142; dx=20.118198170146623 evalInputDelta=-2055.2162361855917
Armijo: th(7.4404761904761925)=172.96968863269916; dx=118.5055662205815 evalInputDelta=-1910.7903635232767
Armijo: th(0.9300595238095241)=-536.7511573368477; dx=310.5461536339665 evalInputDelta=-1201.0695175537298
Armijo: th(0.10333994708994712)=-1665.4760126040314; dx=-1681.357342995591 evalInputDelta=-72.34466228654605
New Minimum: -1737.8206748905775 > -1744.6632485512666
END: th(0.010333994708994713)=-1744.6632485512666; dx=-3687.160863629863 evalInputDelta=6.8425736606891405
Fitness changed from -1737.8206748905775 to -1744.6632485512666
Iteration 12 complete. Error: -1744.6632485512666 Total: 7.7440; Orientation: 0.2896; Line Search: 6.8782
Adding measurement 2c3de58c to history. Total: 4
Rejected: LBFGS Orientation magnitude: 1.015e+05, gradient 3.751e-01, dot -0.187; [22226502-1333-4cab-9ead-7c5bee70beef = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1744.6632485512666, -1737.8206748905775, -201.98452653666814, -163.11750116825044, -142.0856709546216
Rejected: LBFGS Orientation magnitude: 1.769e+05, gradient 3.751e-01, dot -0.197; [22226502-1333-4cab-9ead-7c5bee70beef = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1744.6632485512666, -1737.8206748905775, -201.98452653666814, -163.11750116825044
LBFGS Accumulation History: 3 points
Removed measurement 2c3de58c to history. Total: 4
Removed measurement 4e055974 to history. Total: 3
th(0)=-1744.6632485512666;dx=-0.1405423302674425
New Minimum: -1744.6632485512666 > -1744.6649879270303
END: th(0.022263916687664153)=-1744.6649879270303; dx=-0.11904028424122282 evalInputDelta=0.0017393757636909868
Fitness changed from -1744.6632485512666 to -1744.6649879270303
Iteration 13 complete. Error: -1744.6649879270303 Total: 2.4479; Orientation: 0.6375; Line Search: 1.2342
Adding measurement 1f1c70ce to history. Total: 3
Accepted: LBFGS Orientation magnitude: 9.043e+04, gradient 3.750e-01, dot 0.225; [22226502-1333-4cab-9ead-7c5bee70beef = 1.000/1.000e+00]
th(0)=-1744.6649879270303;dx=-7610.808780245865
Armijo: th(0.04796615444788341)=-1711.17396785021; dx=-2797.562947217764 evalInputDelta=-33.491020076820405
Armijo: th(0.023983077223941704)=-1740.0283358394151; dx=-3593.7578207456863 evalInputDelta=-4.636652087615175
New Minimum: -1744.6649879270303 > -1746.8984082401382
END: th(0.007994359074647234)=-1746.8984082401382; dx=-4299.882476787803 evalInputDelta=2.2334203131078993
Fitness changed from -1744.6649879270303 to -1746.8984082401382
Iteration 14 complete. Error: -1746.8984082401382 Total: 3.2297; Orientation: 0.2904; Line Search: 2.3920
Adding measurement 46ae1df7 to history. Total: 4
Rejected: LBFGS Orientation magnitude: 1.969e+05, gradient 3.727e-01, dot -0.192; [22226502-1333-4cab-9ead-7c5bee70beef = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1746.8984082401382, -1744.6649879270303, -201.98452653666814, -163.11750116825044, -142.0856709546216
Rejected: LBFGS Orientation magnitude: 3.222e+05, gradient 3.727e-01, dot -0.199; [22226502-1333-4cab-9ead-7c5bee70beef = 1.000/1.000e+00]
Orientation rejected. Popping history element from -1746.8984082401382, -1744.6649879270303, -201.98452653666814, -163.11750116825044
LBFGS Accumulation History: 3 points
Removed measurement 46ae1df7 to history. Total: 4
Removed measurement 1f1c70ce to history. Total: 3
th(0)=-1746.8984082401382;dx=-0.1388369894487413
New Minimum: -1746.8984082401382 > -1746.8996544932302
END: th(0.01722332451499119)=-1746.8996544932302; dx=-0.11652120015310273 evalInputDelta=0.0012462530919492565
Fitness changed from -1746.8984082401382 to -1746.8996544932302
Iteration 15 complete. Error: -1746.8996544932302 Total: 2.7296; Orientation: 0.8455; Line Search: 1.3278
<a id="p-15"></a>Iteration 15
<a id="p-14"></a>![Iteration 15](etc/1041fd1b-76a6-4158-b7bf-52d9e1786fc0.jpg)
Final threshold in iteration 16: -1746.8996544932302 (> -Infinity) after 45.478s (< 5400.000s)
Returns
-1746.8996544932302