BasicOptimizer.scala:89 executed in 582.53 seconds (4.707 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: 7680695145177
Reset training subject: 7693228673311
Adding measurement 763f0339 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD+Trust
th(0)=-37.9504035115242;dx=-1.6003704125824658E-6
New Minimum: -37.9504035115242 > -37.95040613412857
END: th(2.154434690031884)=-37.95040613412857; dx=-1.2402767805125463E-6 evalInputDelta=2.6226043701171875E-6
Fitness changed from -37.9504035115242 to -37.95040613412857
Iteration 1 complete. Error: -37.95040613412857 Total: 61.6574; Orientation: 0.0733; Line Search: 24.6099
<a id="p-3"></a>Iteration 1
<a id="p-2"></a>![Iteration 1](etc/71cfbbde-2a7a-4729-9d1c-a647d2d4e681.jpg)
Adding measurement 454c1335 to history. Total: 1
LBFGS Accumulation History: 2 points
th(0)=-37.95040613412857;dx=-1.2338213816005937E-6
New Minimum: -37.95040613412857 > -37.950412422418594
WOLFE (weak): th(4.641588833612779)=-37.950412422418594; dx=-1.2332361286793574E-6 evalInputDelta=6.288290023803711E-6
New Minimum: -37.950412422418594 > -37.95041933655739
WOLFE (weak): th(9.283177667225559)=-37.95041933655739; dx=-1.2328106479068867E-6 evalInputDelta=1.3202428817749023E-5
New Minimum: -37.95041933655739 > -37.95044609904289
WOLFE (weak): th(27.849533001676676)=-37.95044609904289; dx=-1.231486820265607E-6 evalInputDelta=3.9964914321899414E-5
New Minimum: -37.95044609904289 > -37.950564205646515
WOLFE (weak): th(111.3981320067067)=-37.950564205646515; dx=-1.2312328080723664E-6 evalInputDelta=1.5807151794433594E-4
New Minimum: -37.950564205646515 > -37.95119455456734
WOLFE (weak): th(556.9906600335335)=-37.95119455456734; dx=-1.2310001632121547E-6 evalInputDelta=7.884204387664795E-4
New Minimum: -37.95119455456734 > -37.95513001084328
WOLFE (weak): th(3341.9439602012008)=-37.95513001084328; dx=-1.230608214717285E-6 evalInputDelta=0.004723876714706421
New Minimum: -37.95513001084328 > -37.983429193496704
WOLFE (weak): th(23393.607721408407)=-37.983429193496704; dx=-1.22645319886577E-6 evalInputDelta=0.033023059368133545
New Minimum: -37.983429193496704 > -38.21054109930992
WOLFE (weak): th(187148.86177126726)=-38.21054109930992; dx=-1.1855838321613987E-6 evalInputDelta=0.2601349651813507
New Minimum: -38.21054109930992 > -39.84755766391754
END: th(1684339.7559414054)=-39.84755766391754; dx=-7.220924037200243E-7 evalInputDelta=1.897151529788971
Fitness changed from -37.95040613412857 to -39.84755766391754
Iteration 2 complete. Error: -39.84755766391754 Total: 138.2124; Orientation: 0.0733; Line Search: 124.6475
<a id="p-5"></a>Iteration 2
<a id="p-4"></a>![Iteration 2](etc/8e2cb720-3a65-4a41-b669-99d0f9c6a6d9.jpg)
Adding measurement 2fd54fa3 to history. Total: 2
LBFGS Accumulation History: 3 points
th(0)=-39.84755766391754;dx=-7.530712894180491E-7
New Minimum: -39.84755766391754 > -41.922106981277466
END: th(3628800.0000000005)=-41.922106981277466; dx=-3.3256121813717554E-7 evalInputDelta=2.0745493173599243
Fitness changed from -39.84755766391754 to -41.922106981277466
Iteration 3 complete. Error: -41.922106981277466 Total: 37.8522; Orientation: 0.0772; Line Search: 25.2312
<a id="p-7"></a>Iteration 3
<a id="p-6"></a>![Iteration 3](etc/12d1ee56-2b0f-4ab5-b0d8-2e78d3d2ad0f.jpg)
Adding measurement 5d3b104e to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.240e+03, gradient 6.492e-04, dot -0.614; [be50f866-7ec1-4541-8234-304c971d52be = 1.000/1.000e+00]
Orientation rejected. Popping history element from -41.922106981277466, -39.84755766391754, -37.95040613412857, -37.9504035115242
LBFGS Accumulation History: 3 points
Removed measurement 5d3b104e to history. Total: 3
th(0)=-41.922106981277466;dx=-4.214258236948085E-7
New Minimum: -41.922106981277466 > -44.01857954263687
END: th(7818012.603187701)=-44.01857954263687; dx=-1.324849101964937E-7 evalInputDelta=2.0964725613594055
Fitness changed from -41.922106981277466 to -44.01857954263687
Iteration 4 complete. Error: -44.01857954263687 Total: 40.3510; Orientation: 1.5648; Line Search: 25.2223
<a id="p-9"></a>Iteration 4
<a id="p-8"></a>![Iteration 4](etc/b7645f61-28c3-4dea-9c02-bee006a49bae.jpg)
Adding measurement 796fd622 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.401e+03, gradient 5.555e-04, dot -0.465; [be50f866-7ec1-4541-8234-304c971d52be = 1.000/1.000e+00]
Orientation rejected. Popping history element from -44.01857954263687, -39.84755766391754, -37.95040613412857, -37.9504035115242
LBFGS Accumulation History: 3 points
Removed measurement 796fd622 to history. Total: 3
th(0)=-44.01857954263687;dx=-3.0850053809015494E-7
New Minimum: -44.01857954263687 > -45.783736288547516
END: th(1.6843397559414055E7)=-45.783736288547516; dx=-1.5616750642913826E-8 evalInputDelta=1.7651567459106445
Fitness changed from -44.01857954263687 to -45.783736288547516
Iteration 5 complete. Error: -45.783736288547516 Total: 39.6376; Orientation: 1.5652; Line Search: 25.1148
<a id="p-11"></a>Iteration 5
<a id="p-10"></a>![Iteration 5](etc/1704a526-c1f8-4d72-9cfb-bac3a42c441d.jpg)
Adding measurement 16c3743c to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.626e+03, gradient 5.513e-04, dot -0.237; [be50f866-7ec1-4541-8234-304c971d52be = 1.000/1.000e+00]
Orientation rejected. Popping history element from -45.783736288547516, -39.84755766391754, -37.95040613412857, -37.9504035115242
LBFGS Accumulation History: 3 points
Removed measurement 16c3743c to history. Total: 3
th(0)=-45.783736288547516;dx=-3.039203133414348E-7
New Minimum: -45.783736288547516 > -46.14692270755768
WOLF (strong): th(3.628800000000001E7)=-46.14692270755768; dx=5.5135656729692806E-8 evalInputDelta=0.36318641901016235
New Minimum: -46.14692270755768 > -47.29748886823654
WOLF (strong): th(1.8144000000000004E7)=-47.29748886823654; dx=3.45185953151916E-8 evalInputDelta=1.5137525796890259
END: th(6048000.000000001)=-47.140692949295044; dx=-9.993230975317997E-8 evalInputDelta=1.356956660747528
Fitness changed from -45.783736288547516 to -47.29748886823654
Iteration 6 complete. Error: -47.29748886823654 Total: 66.3918; Orientation: 1.5459; Line Search: 51.2124
Adding measurement 27feecdb to history. Total: 3
Rejected: LBFGS Orientation magnitude: 3.723e+03, gradient 4.860e-04, dot -0.199; [be50f866-7ec1-4541-8234-304c971d52be = 1.000/1.000e+00]
Orientation rejected. Popping history element from -47.29748886823654, -39.84755766391754, -37.95040613412857, -37.9504035115242
LBFGS Accumulation History: 3 points
Removed measurement 27feecdb to history. Total: 3
th(0)=-47.29748886823654;dx=-2.361782727343226E-7
New Minimum: -47.29748886823654 > -48.876832604408264
END: th(1.3030021005312836E7)=-48.876832604408264; dx=-1.883180408481793E-8 evalInputDelta=1.5793437361717224
Fitness changed from -47.29748886823654 to -48.876832604408264
Iteration 7 complete. Error: -48.876832604408264 Total: 39.6664; Orientation: 1.5549; Line Search: 25.2254
Adding measurement 2ee3e3fc to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.334e+03, gradient 3.104e-04, dot -0.372; [be50f866-7ec1-4541-8234-304c971d52be = 1.000/1.000e+00]
Orientation rejected. Popping history element from -48.876832604408264, -39.84755766391754, -37.95040613412857, -37.9504035115242
LBFGS Accumulation History: 3 points
Removed measurement 2ee3e3fc to history. Total: 3
th(0)=-48.876832604408264;dx=-9.634166796188941E-8
New Minimum: -48.876832604408264 > -49.95663022994995
WOLF (strong): th(2.8072329265690096E7)=-49.95663022994995; dx=1.0982962113592721E-8 evalInputDelta=1.079797625541687
END: th(1.4036164632845048E7)=-49.85092294216156; dx=-2.9964648226130875E-8 evalInputDelta=0.9740903377532959
Fitness changed from -48.876832604408264 to -49.95663022994995
Iteration 8 complete. Error: -49.95663022994995 Total: 52.5487; Orientation: 1.5651; Line Search: 38.6970
Adding measurement 40889614 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 5.790e+03, gradient 3.562e-04, dot -0.266; [be50f866-7ec1-4541-8234-304c971d52be = 1.000/1.000e+00]
Orientation rejected. Popping history element from -49.95663022994995, -39.84755766391754, -37.95040613412857, -37.9504035115242
LBFGS Accumulation History: 3 points
Removed measurement 40889614 to history. Total: 3
th(0)=-49.95663022994995;dx=-1.2689041977223378E-7
New Minimum: -49.95663022994995 > -50.40136659145355
WOLF (strong): th(3.024000000000001E7)=-50.40136659145355; dx=4.9681812963983846E-8 evalInputDelta=0.4447363615036011
New Minimum: -50.40136659145355 > -50.913299322128296
END: th(1.5120000000000006E7)=-50.913299322128296; dx=-2.8885574807787047E-9 evalInputDelta=0.9566690921783447
Fitness changed from -49.95663022994995 to -50.913299322128296
Iteration 9 complete. Error: -50.913299322128296 Total: 53.6429; Orientation: 1.5510; Line Search: 39.2493
Adding measurement 26244ba2 to history. Total: 3
Rejected: LBFGS Orientation magnitude: 6.678e+03, gradient 2.336e-04, dot -0.422; [be50f866-7ec1-4541-8234-304c971d52be = 1.000/1.000e+00]
Orientation rejected. Popping history element from -50.913299322128296, -39.84755766391754, -37.95040613412857, -37.9504035115242
LBFGS Accumulation History: 3 points
Removed measurement 26244ba2 to history. Total: 3
th(0)=-50.913299322128296;dx=-5.4578367307728984E-8
New Minimum: -50.913299322128296 > -51.506881415843964
WOLF (strong): th(3.2575052513282094E7)=-51.506881415843964; dx=1.36922426793367E-8 evalInputDelta=0.5935820937156677
New Minimum: -51.506881415843964 > -51.53960645198822
END: th(1.6287526256641047E7)=-51.53960645198822; dx=-1.5148434256508748E-8 evalInputDelta=0.6263071298599243
Fitness changed from -50.913299322128296 to -51.53960645198822
Iteration 10 complete. Error: -51.53960645198822 Total: 51.8469; Orientation: 1.5874; Line Search: 37.9433
<a id="p-13"></a>Iteration 10
<a id="p-12"></a>![Iteration 10](etc/61dc932a-7ab0-4366-9fa7-f446440f2cef.jpg)
Final threshold in iteration 11: -51.53960645198822 (> -Infinity) after 582.531s (< 5400.000s)
Returns
-51.53960645198822