1. Test Modules
  2. Training Characteristics
    1. Input Learning
      1. Gradient Descent
      2. Conjugate Gradient Descent
      3. Limited-Memory BFGS
    2. Results
  3. Results

Subreport: Logs for com.simiacryptus.ref.lang.ReferenceCountingBase

Test Modules

Using Seed 5527985447593134080

Training Characteristics

Input Learning

In this apply, we use a network to learn this target input, given it's pre-evaluated output:

TrainingTester.java:332 executed in 0.00 seconds (0.000 gc):

    return RefArrays.stream(RefUtil.addRef(input_target)).flatMap(RefArrays::stream).map(x -> {
      try {
        return x.prettyPrint();
      } finally {
        x.freeRef();
      }
    }).reduce((a, b) -> a + "\n" + b).orElse("");

Returns

    [ 0.2049659950911198, -0.18733224785306635, 0.5890005223636507 ]
    [ -0.5504820050136703, -0.7600168390146784, -0.8797577546615933 ]
    [ 0.4387730796219065, -0.41131100368068063, -0.8857965867999613 ]
    [ 0.23885251031305121, 0.034156185349749624, 0.660541469650467 ]
    [ -0.4233625559326206, 0.872741008766529, -0.607690792233254 ]
    [ 0.2179924530777424, -0.23368770218495438, -0.19674538285536602 ]
    [ 0.7908394290198599, 0.5287032328077357, 0.8305630189252322 ]
    [ -0.4888387454557641, -0.8833030540582139, -0.7450277285719182 ]
    [ -0.2855540904161673, -0.16197670516909257, -0.6986172406353663 ]
    [ -0.841567096953352, 0.05566068620530307, -0.17146552949280225 ]
    [ 0.02392779500215969, -0.586153809676436, -0.6833659746354521 ]
    [ -0.3913822694187139, 0.7166155538562593, 0.7354178696052849 ]
    [ 0.29518355420076947, -0.8205279680857325, -0.4255622776421082 ]
    [ -0.5492884636498814, -0.02255424719466248, 0.3456464126725458 ]
    [ -0.25221322406196345, -0.09863151214049637, -0.6684821525945559 ]

Gradient Descent

First, we train using basic gradient descent method apply weak line search conditions.

TrainingTester.java:480 executed in 3.16 seconds (0.177 gc):

    IterativeTrainer iterativeTrainer = new IterativeTrainer(trainable.addRef());
    try {
      iterativeTrainer.setLineSearchFactory(label -> new ArmijoWolfeSearch());
      iterativeTrainer.setOrientation(new GradientDescent());
      iterativeTrainer.setMonitor(TrainingTester.getMonitor(history));
      iterativeTrainer.setTimeout(30, TimeUnit.SECONDS);
      iterativeTrainer.setMaxIterations(250);
      iterativeTrainer.setTerminateThreshold(0);
      return iterativeTrainer.run();
    } finally {
      iterativeTrainer.freeRef();
    }
Logging
Reset training subject: 4043958089755
BACKPROP_AGG_SIZE = 3
THREADS = 64
SINGLE_THREADED = false
Initialized CoreSettings = {
"backpropAggregationSize" : 3,
"jvmThreads" : 64,
"singleThreaded" : false
}
Reset training subject: 4043991536337
Constructing line search parameters: GD
th(0)=3.433869130362057;dx=-5.243261663559427E19
New Minimum: 3.433869130362057 > 0.09275084528614883
Armijo: th(2.154434690031884)=0.09275084528614883; dx=-3.921771726893637E25 evalInputDelta=3.3411182850759085
Armijo: th(1.077217345015942)=0.19391353057080468; dx=-9.8044292240356E24 evalInputDelta=3.2399555997912524
Armijo: th(0.3590724483386473)=0.3007911032742169; dx=-1.0893809834712928E24 evalInputDelta=3.1330780270878402
Armijo: th(0.08976811208466183)=0.37770436530721074; dx=-6.8086299817144364E22 evalInputDelta=3.0561647650548465
Armijo: th(0.017953622416932366)=0.4186430574847382; dx=-2.723449507392707E21 evalInputDelta=3.015226072877319
Armijo: th(0.002992270402822061)=0.4324359825247613; dx=-7.565094373090433E19 evalInputDelta=3.0014331478372958
Armijo: th(4.2746720040315154E-4)=0.4352722394871165; dx=-1.54383341055150848E18 evalInputDelta=2.9985968908749405
Armijo: th(5.343340005039394E-5)=0.43570194394748374; dx=-2.411430694461308E16 evalInputDelta=2.9981671864145736
Armijo: th(5.9370444500437714E-6)=0.4357568230915624; dx=-2.967943713845338E14 evalInputDelta=2.9981123072704947
Armijo: th(5.937044450043771E-7)=0.43576300146116376; dx=-2.875536800792876E12 evalInputDelta=2.9981061289008935
Armijo: th(5.397313136403428E-8)=0.47931676889204067; dx=1.365643322957524E17 evalInputDelta=2.9545523614700167
Armijo: th(4.4977609470028565E-9)=3.393259324557332; dx=5.5494014603657354E20 evalInputDelta=0.04060980580472506
Armijo: th(3.4598161130791205E-10)=1.082732799466126; dx=3.5855333285071862E18 evalInputDelta=2.3511363308959314
Armijo: th(2.4712972236279432E-11)=0.9964495771663108; dx=-8.5481449915230576E16 evalInputDelta=2.4374195531957463
Armijo: th(1.6475314824186289E-12)=1.5623546941146145; dx=-1.99343815013610035E18 evalInputDelta=1.8715144362474427
Armijo: th(1.029707176511643E-13)=3.4338691303619386; dx=-5.241479912200009E19 evalInputDelta=1.1857181902996672E-13
Armijo: th(6.057101038303783E-15)=3.43386913036205; dx=-5.243156854159949E19 evalInputDelta=7.105427357601002E-15
MIN ALPHA (3.3650561323909904E-16): th(2.154434690031884)=0.09275084528614883
Fitness changed from 3.433869130362057 to 0.09275084528614883
Iteration 1 complete. Error: 0.09275084528614883 Total: 0.1978; Orientation: 0.0042; Line Search: 0.1485
th(0)=0.09275084528614883;dx=-2.4717184051393564E35
New Minimum: 0.09275084528614883 > 0.09275084528614873
Armijo: th(2.154434690031884E-15)=0.09275084528614873; dx=-2.471720540337092E35 evalInputDelta=9.71445146547012E-17
Armijo: th(1.077217345015942E-15)=0.09275084528614878; dx=-2.4717194727382244E35 evalInputDelta=4.163336342344337E-17
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.09275084528614873
Fitness changed from 0.09275084528614883 to 0.09275084528614873
Iteration 2 complete. Error: 0.09275084528614873 Total: 0.0269; Orientation: 0.0013; Line Search: 0.0215
th(0)=0.09275084528614873;dx=-2.4717226755573178E35
New Minimum: 0.09275084528614873 > 0.09275084528614866
Armijo: th(2.154434690031884E-15)=0.09275084528614866; dx=-2.4717248108000354E35 evalInputDelta=6.938893903907228E-17
Armijo: th(1.077217345015942E-15)=0.0927508452861487; dx=-2.4717237431786768E35 evalInputDelta=2.7755575615628914E-17
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.09275084528614866
Fitness changed from 0.09275084528614873 to 0.09275084528614866
Iteration 3 complete. Error: 0.09275084528614866 Total: 0.0309; Orientation: 0.0020; Line Search: 0.0255
th(0)=0.09275084528614866;dx=-2.471726946065244E35
New Minimum: 0.09275084528614866 > 0.09275084528614856
Armijo: th(2.154434690031884E-15)=0.09275084528614856; dx=-2.471729081352944E35 evalInputDelta=9.71445146547012E-17
Armijo: th(1.077217345015942E-15)=0.09275084528614862; dx=-2.4717280137090936E35 evalInputDelta=4.163336342344337E-17
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.09275084528614856
Fitness changed from 0.09275084528614866 to 0.09275084528614856
Iteration 4 complete. Error: 0.09275084528614856 Total: 0.0273; Orientation: 0.0011; Line Search: 0.0231
th(0)=0.09275084528614856;dx=-2.4717312166631342E35
New Minimum: 0.09275084528614856 > 0.09275084528614849
Armijo: th(2.154434690031884E-15)=0.09275084528614849; dx=-2.471733351995817E35 evalInputDelta=6.938893903907228E-17
Armijo: th(1.077217345015942E-15)=0.09275084528614853; dx=-2.4717322843294752E35 evalInputDelta=2.7755575615628914E-17
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.09275084528614849
Fitness changed from 0.09275084528614856 to 0.09275084528614849
Iteration 5 complete. Error: 0.09275084528614849 Total: 0.0203; Orientation: 0.0011; Line Search: 0.0166
th(0)=0.09275084528614849;dx=-2.47173548735099E35
New Minimum: 0.09275084528614849 > 0.09275084528614838
Armijo: th(2.154434690031884E-15)=0.09275084528614838; dx=-2.471737622728655E35 evalInputDelta=1.1102230246251565E-16
Armijo: th(1.077217345015942E-15)=0.09275084528614844; dx=-2.4717365550398224E35 evalInputDelta=5.551115123125783E-17
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.09275084528614838
Fitness changed from 0.09275084528614849 to 0.09275084528614838
Iteration 6 complete. Error: 0.09275084528614838 Total: 0.0195; Orientation: 0.0011; Line Search: 0.0158
th(0)=0.09275084528614838;dx=-2.471739758128811E35
New Minimum: 0.09275084528614838 > 0.09275084528614833
Armijo: th(2.154434690031884E-15)=0.09275084528614833; dx=-2.4717418935514584E35 evalInputDelta=5.551115123125783E-17
Armijo: th(1.077217345015942E-15)=0.09275084528614837; dx=-2.4717408258401342E35 evalInputDelta=1.3877787807814457E-17
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.09275084528614833
Fitness changed from 0.09275084528614838 to 0.09275084528614833
Iteration 7 complete. Error: 0.09275084528614833 Total: 0.0188; Orientation: 0.0010; Line Search: 0.0154
th(0)=0.09275084528614833;dx=-2.4717440289965972E35
New Minimum: 0.09275084528614833 > 0.09275084528614821
Armijo: th(2.154434690031884E-15)=0.09275084528614821; dx=-2.471746164464228E35 evalInputDelta=1.1102230246251565E-16
Armijo: th(1.077217345015942E-15)=0.09275084528614827; dx=-2.471745096730412E35 evalInputDelta=5.551115123125783E-17
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.09275084528614821
Fitness changed from 0.09275084528614833 to 0.09275084528614821
Iteration 8 complete. Error: 0.09275084528614821 Total: 0.0301; Orientation: 0.0013; Line Search: 0.0260
th(0)=0.09275084528614821;dx=-2.471748299954349E35
New Minimum: 0.09275084528614821 > 0.09275084528614815
Armijo: th(2.154434690031884E-15)=0.09275084528614815; dx=-2.471750435466962E35 evalInputDelta=6.938893903907228E-17
Armijo: th(1.077217345015942E-15)=0.09275084528614819; dx=-2.4717493677106553E35 evalInputDelta=2.7755575615628914E-17
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.09275084528614815
Fitness changed from 0.09275084528614821 to 0.09275084528614815
Iteration 9 complete. Error: 0.09275084528614815 Total: 0.0194; Orientation: 0.0010; Line Search: 0.0158
th(0)=0.09275084528614815;dx=-2.471752571002066E35
New Minimum: 0.09275084528614815 > 0.09275084528614805
Armijo: th(2.154434690031884E-15)=0.09275084528614805; dx=-2.4717547065596623E35 evalInputDelta=9.71445146547012E-17
Armijo: th(1.077217345015942E-15)=0.0927508452861481; dx=-2.4717536387808637E35 evalInputDelta=4.163336342344337E-17
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.09275084528614805
Fitness changed from 0.09275084528614815 to 0.09275084528614805
Iteration 10 complete. Error: 0.09275084528614805 Total: 0.0192; Orientation: 0.0009; Line Search: 0.0145
th(0)=0.09275084528614805;dx=-2.471756842139749E35
New Minimum: 0.09275084528614805 > 0.09275084528614796
Armijo: th(2.154434690031884E-15)=0.09275084528614796; dx=-2.4717589777423276E35 evalInputDelta=8.326672684688674E-17
Armijo: th(1.077217345015942E-15)=0.092750845286148; dx=-2.4717579099410384E35 e

...skipping 134018 bytes...

71445146547012E-17
Armijo: th(1.077217345015942E-15)=0.09275084528612862; dx=-2.4727255001566453E35 evalInputDelta=4.163336342344337E-17
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.09275084528612856
Fitness changed from 0.09275084528612866 to 0.09275084528612856
Iteration 237 complete. Error: 0.09275084528612856 Total: 0.0080; Orientation: 0.0004; Line Search: 0.0063
th(0)=0.09275084528612856;dx=-2.4727287188352348E35
New Minimum: 0.09275084528612856 > 0.0927508452861285
Armijo: th(2.154434690031884E-15)=0.0927508452861285; dx=-2.4727308646509612E35 evalInputDelta=6.938893903907228E-17
Armijo: th(1.077217345015942E-15)=0.09275084528612855; dx=-2.4727297917430982E35 evalInputDelta=1.3877787807814457E-17
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.0927508452861285
Fitness changed from 0.09275084528612856 to 0.0927508452861285
Iteration 238 complete. Error: 0.0927508452861285 Total: 0.0082; Orientation: 0.0005; Line Search: 0.0064
th(0)=0.0927508452861285;dx=-2.4727330104891876E35
New Minimum: 0.0927508452861285 > 0.0927508452861284
Armijo: th(2.154434690031884E-15)=0.0927508452861284; dx=-2.4727351563499153E35 evalInputDelta=9.71445146547012E-17
Armijo: th(1.077217345015942E-15)=0.09275084528612847; dx=-2.4727340834195512E35 evalInputDelta=2.7755575615628914E-17
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.0927508452861284
Fitness changed from 0.0927508452861285 to 0.0927508452861284
Iteration 239 complete. Error: 0.0927508452861284 Total: 0.0081; Orientation: 0.0004; Line Search: 0.0065
th(0)=0.0927508452861284;dx=-2.4727373022331428E35
New Minimum: 0.0927508452861284 > 0.09275084528612833
Armijo: th(2.154434690031884E-15)=0.09275084528612833; dx=-2.4727394481388713E35 evalInputDelta=6.938893903907228E-17
Armijo: th(1.077217345015942E-15)=0.09275084528612837; dx=-2.4727383751860067E35 evalInputDelta=2.7755575615628914E-17
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.09275084528612833
Fitness changed from 0.0927508452861284 to 0.09275084528612833
Iteration 240 complete. Error: 0.09275084528612833 Total: 0.0081; Orientation: 0.0004; Line Search: 0.0064
th(0)=0.09275084528612833;dx=-2.4727415940671E35
New Minimum: 0.09275084528612833 > 0.09275084528612823
Armijo: th(2.154434690031884E-15)=0.09275084528612823; dx=-2.4727437400178294E35 evalInputDelta=9.71445146547012E-17
Armijo: th(1.077217345015942E-15)=0.09275084528612829; dx=-2.4727426670424638E35 evalInputDelta=4.163336342344337E-17
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.09275084528612823
Fitness changed from 0.09275084528612833 to 0.09275084528612823
Iteration 241 complete. Error: 0.09275084528612823 Total: 0.0085; Orientation: 0.0004; Line Search: 0.0069
th(0)=0.09275084528612823;dx=-2.4727458859910597E35
New Minimum: 0.09275084528612823 > 0.09275084528612816
Armijo: th(2.154434690031884E-15)=0.09275084528612816; dx=-2.47274803198679E35 evalInputDelta=6.938893903907228E-17
Armijo: th(1.077217345015942E-15)=0.09275084528612818; dx=-2.472746958988924E35 evalInputDelta=5.551115123125783E-17
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.09275084528612816
Fitness changed from 0.09275084528612823 to 0.09275084528612816
Iteration 242 complete. Error: 0.09275084528612816 Total: 0.0081; Orientation: 0.0004; Line Search: 0.0066
th(0)=0.09275084528612816;dx=-2.4727501780050207E35
New Minimum: 0.09275084528612816 > 0.09275084528612805
Armijo: th(2.154434690031884E-15)=0.09275084528612805; dx=-2.4727523240457517E35 evalInputDelta=1.1102230246251565E-16
Armijo: th(1.077217345015942E-15)=0.09275084528612812; dx=-2.4727512510253856E35 evalInputDelta=4.163336342344337E-17
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.09275084528612805
Fitness changed from 0.09275084528612816 to 0.09275084528612805
Iteration 243 complete. Error: 0.09275084528612805 Total: 0.0087; Orientation: 0.0004; Line Search: 0.0070
th(0)=0.09275084528612805;dx=-2.4727544701089833E35
New Minimum: 0.09275084528612805 > 0.09275084528612798
Armijo: th(2.154434690031884E-15)=0.09275084528612798; dx=-2.4727566161947162E35 evalInputDelta=6.938893903907228E-17
Armijo: th(1.077217345015942E-15)=0.09275084528612802; dx=-2.4727555431518492E35 evalInputDelta=2.7755575615628914E-17
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.09275084528612798
Fitness changed from 0.09275084528612805 to 0.09275084528612798
Iteration 244 complete. Error: 0.09275084528612798 Total: 0.0083; Orientation: 0.0005; Line Search: 0.0066
th(0)=0.09275084528612798;dx=-2.4727587623029483E35
New Minimum: 0.09275084528612798 > 0.09275084528612788
Armijo: th(2.154434690031884E-15)=0.09275084528612788; dx=-2.472760908433682E35 evalInputDelta=9.71445146547012E-17
Armijo: th(1.077217345015942E-15)=0.09275084528612794; dx=-2.4727598353683155E35 evalInputDelta=4.163336342344337E-17
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.09275084528612788
Fitness changed from 0.09275084528612798 to 0.09275084528612788
Iteration 245 complete. Error: 0.09275084528612788 Total: 0.0082; Orientation: 0.0004; Line Search: 0.0066
th(0)=0.09275084528612788;dx=-2.472763054586916E35
New Minimum: 0.09275084528612788 > 0.0927508452861278
Armijo: th(2.154434690031884E-15)=0.0927508452861278; dx=-2.472765200762652E35 evalInputDelta=8.326672684688674E-17
Armijo: th(1.077217345015942E-15)=0.09275084528612784; dx=-2.472764127674784E35 evalInputDelta=4.163336342344337E-17
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.0927508452861278
Fitness changed from 0.09275084528612788 to 0.0927508452861278
Iteration 246 complete. Error: 0.0927508452861278 Total: 0.0082; Orientation: 0.0004; Line Search: 0.0066
th(0)=0.0927508452861278;dx=-2.4727673469608877E35
New Minimum: 0.0927508452861278 > 0.09275084528612772
Armijo: th(2.154434690031884E-15)=0.09275084528612772; dx=-2.4727694931816243E35 evalInputDelta=8.326672684688674E-17
Armijo: th(1.077217345015942E-15)=0.09275084528612779; dx=-2.472768420071256E35 evalInputDelta=1.3877787807814457E-17
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.09275084528612772
Fitness changed from 0.0927508452861278 to 0.09275084528612772
Iteration 247 complete. Error: 0.09275084528612772 Total: 0.0083; Orientation: 0.0004; Line Search: 0.0066
th(0)=0.09275084528612772;dx=-2.4727716394248614E35
New Minimum: 0.09275084528612772 > 0.09275084528612763
Armijo: th(2.154434690031884E-15)=0.09275084528612763; dx=-2.4727737856905996E35 evalInputDelta=8.326672684688674E-17
Armijo: th(1.077217345015942E-15)=0.09275084528612769; dx=-2.4727727125577305E35 evalInputDelta=2.7755575615628914E-17
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.09275084528612763
Fitness changed from 0.09275084528612772 to 0.09275084528612763
Iteration 248 complete. Error: 0.09275084528612763 Total: 0.0084; Orientation: 0.0004; Line Search: 0.0068
th(0)=0.09275084528612763;dx=-2.4727759319788386E35
New Minimum: 0.09275084528612763 > 0.09275084528612754
Armijo: th(2.154434690031884E-15)=0.09275084528612754; dx=-2.472778078289579E35 evalInputDelta=9.71445146547012E-17
Armijo: th(1.077217345015942E-15)=0.0927508452861276; dx=-2.4727770051342076E35 evalInputDelta=2.7755575615628914E-17
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.09275084528612754
Fitness changed from 0.09275084528612763 to 0.09275084528612754
Iteration 249 complete. Error: 0.09275084528612754 Total: 0.0084; Orientation: 0.0004; Line Search: 0.0069
th(0)=0.09275084528612754;dx=-2.4727802246228197E35
New Minimum: 0.09275084528612754 > 0.09275084528612745
Armijo: th(2.154434690031884E-15)=0.09275084528612745; dx=-2.472782370978561E35 evalInputDelta=8.326672684688674E-17
Armijo: th(1.077217345015942E-15)=0.09275084528612751; dx=-2.4727812978006896E35 evalInputDelta=2.7755575615628914E-17
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.09275084528612745
Fitness changed from 0.09275084528612754 to 0.09275084528612745
Iteration 250 complete. Error: 0.09275084528612745 Total: 0.0079; Orientation: 0.0005; Line Search: 0.0062
Final threshold in iteration 251: 0.09275084528612745 (> 0.0) after 3.156s (< 30.000s)

Returns

    0.09275084528612745

This training apply resulted in the following configuration:

TrainingTester.java:610 executed in 0.00 seconds (0.000 gc):

    RefList<double[]> state = network.state();
    assert state != null;
    String description = state.stream().map(RefArrays::toString).reduce((a, b) -> a + "\n" + b)
        .orElse("");
    state.freeRef();
    return description;

Returns

    

And regressed input:

TrainingTester.java:622 executed in 0.00 seconds (0.000 gc):

    return RefArrays.stream(RefUtil.addRef(data)).flatMap(x -> {
      return RefArrays.stream(x);
    }).limit(1).map(x -> {
      String temp_18_0015 = x.prettyPrint();
      x.freeRef();
      return temp_18_0015;
    }).reduce((a, b) -> a + "\n" + b).orElse("");

Returns

    [ -0.3543891287459322, -0.8110944863155154, -3.493882685882412E8 ]

To produce the following output:

TrainingTester.java:633 executed in 0.00 seconds (0.000 gc):

    Result[] array = ConstantResult.batchResultArray(pop(RefUtil.addRef(data)));
    @Nullable
    Result eval = layer.eval(array);
    assert eval != null;
    TensorList tensorList = Result.getData(eval);
    String temp_18_0016 = tensorList.stream().limit(1).map(x -> {
      String temp_18_0017 = x.prettyPrint();
      x.freeRef();
      return temp_18_0017;
    }).reduce((a, b) -> a + "\n" + b).orElse("");
    tensorList.freeRef();
    return temp_18_0016;

Returns

    [ -0.015312715020398595, -0.07629559932945543, 2.751445537429337E26 ]

Conjugate Gradient Descent

First, we use a conjugate gradient descent method, which converges the fastest for purely linear functions.

TrainingTester.java:452 executed in 0.17 seconds (0.000 gc):

    IterativeTrainer iterativeTrainer = new IterativeTrainer(trainable.addRef());
    try {
      iterativeTrainer.setLineSearchFactory(label -> new QuadraticSearch());
      iterativeTrainer.setOrientation(new GradientDescent());
      iterativeTrainer.setMonitor(TrainingTester.getMonitor(history));
      iterativeTrainer.setTimeout(30, TimeUnit.SECONDS);
      iterativeTrainer.setMaxIterations(250);
      iterativeTrainer.setTerminateThreshold(0);
      return iterativeTrainer.run();
    } finally {
      iterativeTrainer.freeRef();
    }
Logging
Reset training subject: 4047135407773
Reset training subject: 4047137282326
Constructing line search parameters: GD
F(0.0) = LineSearchPoint{point=PointSample{avg=3.433869130362057}, derivative=-5.243261663559426E19}
New Minimum: 3.433869130362057 > 0.8077079372232265
F(1.0E-10) = LineSearchPoint{point=PointSample{avg=0.8077079372232265}, derivative=-8.540844201688654E8}, evalInputDelta = -2.626161193138831
F(7.000000000000001E-10) = LineSearchPoint{point=PointSample{avg=3.3957042357816456}, derivative=6.462823578105515E19}, evalInputDelta = -0.03816489458041161
3.3957042357816456 <= 3.433869130362057
F(3.1353634359573305E-10) = LineSearchPoint{point=PointSample{avg=1.082750045709027}, derivative=3.0771533216588984E18}, evalInputDelta = -2.35111908465303
Right bracket at 3.1353634359573305E-10
F(2.961556302204233E-10) = LineSearchPoint{point=PointSample{avg=1.0835118739918115}, derivative=2.8040285353529825E18}, evalInputDelta = -2.3503572563702457
1.0835118739918115 > 1.082750045709027
Fitness changed from 3.433869130362057 to 0.8077079372232265
Iteration 1 complete. Error: 0.8077079372232265 Total: 0.0368; Orientation: 0.0006; Line Search: 0.0317
F(0.0) = LineSearchPoint{point=PointSample{avg=0.8077079372232265}, derivative=-2.3581303719558875}
New Minimum: 0.8077079372232265 > 0.8077079364838671
F(3.1353634359573305E-10) = LineSearchPoint{point=PointSample{avg=0.8077079364838671}, derivative=-2.3581303581083315}, evalInputDelta = -7.393594625426658E-10
New Minimum: 0.8077079364838671 > 0.8077079320477096
F(2.1947544051701314E-9) = LineSearchPoint{point=PointSample{avg=0.8077079320477096}, derivative=-2.3581302750229995}, evalInputDelta = -5.1755169039324755E-9
New Minimum: 0.8077079320477096 > 0.8077079009946125
F(1.536328083619092E-8) = LineSearchPoint{point=PointSample{avg=0.8077079009946125}, derivative=-2.3581296934259295}, evalInputDelta = -3.622861399765753E-8
New Minimum: 0.8077079009946125 > 0.8077076836231478
F(1.0754296585333644E-7) = LineSearchPoint{point=PointSample{avg=0.8077076836231478}, derivative=-2.358125622258776}, evalInputDelta = -2.5360007871455537E-7
New Minimum: 0.8077076836231478 > 0.8077061620334025
F(7.52800760973355E-7) = LineSearchPoint{point=PointSample{avg=0.8077061620334025}, derivative=-2.3580971246931384}, evalInputDelta = -1.7751898240270236E-6
New Minimum: 0.8077061620334025 > 0.8076955114200082
F(5.269605326813485E-6) = LineSearchPoint{point=PointSample{avg=0.8076955114200082}, derivative=-2.3578976713458415}, evalInputDelta = -1.2425803218363285E-5
New Minimum: 0.8076955114200082 > 0.807620982334851
F(3.688723728769439E-5) = LineSearchPoint{point=PointSample{avg=0.807620982334851}, derivative=-2.3565029470567964}, evalInputDelta = -8.695488837551224E-5
New Minimum: 0.807620982334851 > 0.8071005079048541
F(2.5821066101386076E-4) = LineSearchPoint{point=PointSample{avg=0.8071005079048541}, derivative=-2.3468102550433914}, evalInputDelta = -6.074293183724322E-4
New Minimum: 0.8071005079048541 > 0.8035154318789772
F(0.0018074746270970252) = LineSearchPoint{point=PointSample{avg=0.8035154318789772}, derivative=-2.2822074529590197}, evalInputDelta = -0.004192505344249309
New Minimum: 0.8035154318789772 > 0.7807562964563697
F(0.012652322389679177) = LineSearchPoint{point=PointSample{avg=0.7807562964563697}, derivative=-1.9416565249619442}, evalInputDelta = -0.026951640766856855
New Minimum: 0.7807562964563697 > 0.6741555867721303
F(0.08856625672775424) = LineSearchPoint{point=PointSample{avg=0.6741555867721303}, derivative=-1.0761546277453347}, evalInputDelta = -0.13355235045109626
New Minimum: 0.6741555867721303 > 0.3792934704755925
F(0.6199637970942797) = LineSearchPoint{point=PointSample{avg=0.3792934704755925}, derivative=-0.347250743209751}, evalInputDelta = -0.42841446674763406
New Minimum: 0.3792934704755925 > 0.05287516259493019
F(4.339746579659958) = LineSearchPoint{point=PointSample{avg=0.05287516259493019}, derivative=-0.39909482023298154}, evalInputDelta = -0.7548327746282963
New Minimum: 0.05287516259493019 > 0.0
F(30.378226057619706) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-6.714936173158637}, evalInputDelta = -0.8077079372232265
F(212.64758240333794) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-261.8403881138008}, evalInputDelta = -0.8077079372232265
F(1488.5330768233655) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-12380.34212571034}, evalInputDelta = -0.8077079372232265
F(10419.731537763559) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-603508.4094154765}, evalInputDelta = -0.8077079372232265
F(72938.12076434492) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-2.955003408164677E7}, evalInputDelta = -0.8077079372232265
F(510566.8453504144) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-1.4477985446462092E9}, evalInputDelta = -0.8077079372232265
F(3573967.9174529007) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-7.094105683068637E10}, evalInputDelta = -0.8077079372232265
F(2.5017775422170304E7) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-3.47610428172529E12}, evalInputDelta = -0.8077079372232265
F(1.7512442795519212E8) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-1.703290572837113E14}, evalInputDelta = -0.8077079372232265
F(1.2258709956863449E9) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-8.34612343925608E15}, evalInputDelta = -0.8077079372232265
F(8.581096969804414E9) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-4.0896004595002752E17}, evalInputDelta = -0.8077079372232265
F(6.00676787886309E10) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-2.0039042233536705E19}, evalInputDelta = -0.8077079372232265
0.0 <= 0.8077079372232265
F(1.0E-10) = LineSearchPoint{point=PointSample{avg=0.8077079369874134}, derivative=-2.3581303675393164}, evalInputDelta = -2.3581314678722265E-10
Left bracket at 1.0E-10
Converged to left
Fitness changed from 0.8077079372232265 to 0.0
Iteration 2 complete. Error: 0.0 Total: 0.0570; Orientation: 0.0007; Line Search: 0.0548
F(0.0) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-371.2560507608155}
F(1.0E-10) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-371.2560508640566}, evalInputDelta = 0.0
F(7.000000000000001E-10) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-371.2560514835025}, evalInputDelta = 0.0
F(4.900000000000001E-9) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-371.2560558196249}, evalInputDelta = 0.0
F(3.430000000000001E-8) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-371.25608617248116}, evalInputDelta = 0.0
F(2.4010000000000004E-7) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-371.25629864247935}, evalInputDelta = 0.0
F(1.6807000000000003E-6) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-371.2577859326893}, evalInputDelta = 0.0
F(1.1764900000000001E-5) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-371.268196975069}, evalInputDelta = 0.0
F(8.235430000000001E-5) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-371.34107480631343}, evalInputDelta = 0.0
F(5.764801000000001E-4) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-371.85124581978044}, evalInputDelta = 0.0
F(0.004035360700000001) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-375.4237264570763}, evalInputDelta = 0.0
F(0.028247524900000005) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-400.493984526449}, evalInputDelta = 0.0
F(0.19773267430000002) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-579.0675778188586}, evalInputDelta = 0.0
F(1.3841287201) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-1980.0902843989409}, evalInputDelta = 0.0
F(9.688901040700001) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-19186.619353587103}, evalInputDelta = 0.0
F(67.8223072849) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-502201.4588711558}, evalInputDelta = 0.0
F(474.7561509943) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-2.1649193001123462E7}, evalInputDelta = 0.0
F(3323.2930569601003) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-1.0402066294127266E9}, evalInputDelta = 0.0
F(23263.0513987207) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-5.0826004969469955E10}, evalInputDelta = 0.0
F(162841.3597910449) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-2.489465511323495E12}, evalInputDelta = 0.0
F(1139889.5185373144) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-1.2197674903650927E14}, evalInputDelta = 0.0
F(7979226.6297612) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-5.976811275767482E15}, evalInputDelta = 0.0
F(5.58545864083284E7) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-2.9286340652356314E17}, evalInputDelta = 0.0
F(3.909821048582988E8) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-1.4350304497731398E19}, evalInputDelta = 0.0
F(2.7368747340080914E9) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-7.031649034353763E20}, evalInputDelta = 0.0
F(1.915812313805664E10) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-3.44550801496592E22}, evalInputDelta = 0.0
0.0 <= 0.0
F(1.0E-10) = LineSearchPoint{point=PointSample{avg=0.0}, derivative=-371.2560508640566}, evalInputDelta = 0.0
Left bracket at 1.0E-10
Converged to left
Fitness changed from 0.0 to 0.0
Static Iteration Total: 0.0714; Orientation: 0.0005; Line Search: 0.0694
Iteration 3 failed. Error: 0.0
Previous Error: 0.0 -> 0.0
Optimization terminated 3
Final threshold in iteration 3: 0.0 (> 0.0) after 0.165s (< 30.000s)

Returns

    0.0

Training Converged

Limited-Memory BFGS

Next, we apply the same optimization using L-BFGS, which is nearly ideal for purely second-order or quadratic functions.

TrainingTester.java:509 executed in 15.11 seconds (1.610 gc):

    IterativeTrainer iterativeTrainer = new IterativeTrainer(trainable.addRef());
    try {
      iterativeTrainer.setLineSearchFactory(label -> new ArmijoWolfeSearch());
      iterativeTrainer.setOrientation(new LBFGS());
      iterativeTrainer.setMonitor(TrainingTester.getMonitor(history));
      iterativeTrainer.setTimeout(30, TimeUnit.SECONDS);
      iterativeTrainer.setIterationsPerSample(100);
      iterativeTrainer.setMaxIterations(250);
      iterativeTrainer.setTerminateThreshold(0);
      return iterativeTrainer.run();
    } finally {
      iterativeTrainer.freeRef();
    }
Logging
Reset training subject: 4047308097018
Reset training subject: 4047310836110
Adding measurement 7b2d4156 to history. Total: 0
LBFGS Accumulation History: 1 points
Constructing line search parameters: GD
Non-optimal measurement 3.433869130362057 < 3.433869130362057. Total: 1
th(0)=3.433869130362057;dx=-5.243261663559426E19
Adding measurement 42ce06ab to history. Total: 1
New Minimum: 3.433869130362057 > 0.09275084528614883
Armijo: th(2.154434690031884)=0.09275084528614883; dx=-3.921771726893637E25 evalInputDelta=3.3411182850759085
Non-optimal measurement 0.19391353057080468 < 0.09275084528614883. Total: 2
Armijo: th(1.077217345015942)=0.19391353057080468; dx=-9.8044292240356E24 evalInputDelta=3.2399555997912524
Non-optimal measurement 0.3007911032742169 < 0.09275084528614883. Total: 2
Armijo: th(0.3590724483386473)=0.3007911032742169; dx=-1.0893809834712928E24 evalInputDelta=3.1330780270878402
Non-optimal measurement 0.37770436530721074 < 0.09275084528614883. Total: 2
Armijo: th(0.08976811208466183)=0.37770436530721074; dx=-6.8086299817144364E22 evalInputDelta=3.0561647650548465
Non-optimal measurement 0.4186430574847382 < 0.09275084528614883. Total: 2
Armijo: th(0.017953622416932366)=0.4186430574847382; dx=-2.723449507392707E21 evalInputDelta=3.015226072877319
Non-optimal measurement 0.4324359825247613 < 0.09275084528614883. Total: 2
Armijo: th(0.002992270402822061)=0.4324359825247613; dx=-7.565094373090433E19 evalInputDelta=3.0014331478372958
Non-optimal measurement 0.4352722394871165 < 0.09275084528614883. Total: 2
Armijo: th(4.2746720040315154E-4)=0.4352722394871165; dx=-1.54383341055150848E18 evalInputDelta=2.9985968908749405
Non-optimal measurement 0.43570194394748374 < 0.09275084528614883. Total: 2
Armijo: th(5.343340005039394E-5)=0.43570194394748374; dx=-2.411430694461308E16 evalInputDelta=2.9981671864145736
Non-optimal measurement 0.4357568230915624 < 0.09275084528614883. Total: 2
Armijo: th(5.9370444500437714E-6)=0.4357568230915624; dx=-2.967943713845338E14 evalInputDelta=2.9981123072704947
Non-optimal measurement 0.43576300146116376 < 0.09275084528614883. Total: 2
Armijo: th(5.937044450043771E-7)=0.43576300146116376; dx=-2.875536800792876E12 evalInputDelta=2.9981061289008935
Non-optimal measurement 0.47931676889204067 < 0.09275084528614883. Total: 2
Armijo: th(5.397313136403428E-8)=0.47931676889204067; dx=1.365643322957524E17 evalInputDelta=2.9545523614700167
Non-optimal measurement 3.393259324557332 < 0.09275084528614883. Total: 2
Armijo: th(4.4977609470028565E-9)=3.393259324557332; dx=5.549401460365736E20 evalInputDelta=0.04060980580472506
Non-optimal measurement 1.082732799466126 < 0.09275084528614883. Total: 2
Armijo: th(3.4598161130791205E-10)=1.082732799466126; dx=3.5855333285071862E18 evalInputDelta=2.3511363308959314
Non-optimal measurement 0.9964495771663108 < 0.09275084528614883. Total: 2
Armijo: th(2.4712972236279432E-11)=0.9964495771663108; dx=-8.5481449915230576E16 evalInputDelta=2.4374195531957463
Non-optimal measurement 1.5623546941146145 < 0.09275084528614883. Total: 2
Armijo: th(1.6475314824186289E-12)=1.5623546941146145; dx=-1.99343815013610035E18 evalInputDelta=1.8715144362474427
Non-optimal measurement 3.4338691303619386 < 0.09275084528614883. Total: 2
Armijo: th(1.029707176511643E-13)=3.4338691303619386; dx=-5.241479912200009E19 evalInputDelta=1.1857181902996672E-13
Non-optimal measurement 3.43386913036205 < 0.09275084528614883. Total: 2
Armijo: th(6.057101038303783E-15)=3.43386913036205; dx=-5.243156854159949E19 evalInputDelta=7.105427357601002E-15
Non-optimal measurement 0.09275084528614883 < 0.09275084528614883. Total: 2
MIN ALPHA (3.3650561323909904E-16): th(2.154434690031884)=0.09275084528614883
Fitness changed from 3.433869130362057 to 0.09275084528614883
Iteration 1 complete. Error: 0.09275084528614883 Total: 0.0811; Orientation: 0.0045; Line Search: 0.0708
Non-optimal measurement 0.09275084528614883 < 0.09275084528614883. Total: 2
LBFGS Accumulation History: 2 points
Non-optimal measurement 0.09275084528614883 < 0.09275084528614883. Total: 2
th(0)=0.09275084528614883;dx=-2.4717184051393564E35
Adding measurement 67d06007 to history. Total: 2
New Minimum: 0.09275084528614883 > 0.09275084528614873
Armijo: th(2.154434690031884E-15)=0.09275084528614873; dx=-2.4717205403370916E35 evalInputDelta=9.71445146547012E-17
Non-optimal measurement 0.09275084528614878 < 0.09275084528614873. Total: 3
Armijo: th(1.077217345015942E-15)=0.09275084528614878; dx=-2.4717194727382244E35 evalInputDelta=4.163336342344337E-17
Non-optimal measurement 0.09275084528614873 < 0.09275084528614873. Total: 3
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.09275084528614873
Fitness changed from 0.09275084528614883 to 0.09275084528614873
Iteration 2 complete. Error: 0.09275084528614873 Total: 0.0162; Orientation: 0.0015; Line Search: 0.0131
Non-optimal measurement 0.09275084528614873 < 0.09275084528614873. Total: 3
LBFGS Accumulation History: 3 points
Non-optimal measurement 0.09275084528614873 < 0.09275084528614873. Total: 3
th(0)=0.09275084528614873;dx=-2.471722675557318E35
Adding measurement 4a005939 to history. Total: 3
New Minimum: 0.09275084528614873 > 0.09275084528614866
Armijo: th(2.154434690031884E-15)=0.09275084528614866; dx=-2.4717248108000354E35 evalInputDelta=6.938893903907228E-17
Non-optimal measurement 0.0927508452861487 < 0.09275084528614866. Total: 4
Armijo: th(1.077217345015942E-15)=0.0927508452861487; dx=-2.4717237431786768E35 evalInputDelta=2.7755575615628914E-17
Non-optimal measurement 0.09275084528614866 < 0.09275084528614866. Total: 4
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.09275084528614866
Fitness changed from 0.09275084528614873 to 0.09275084528614866
Iteration 3 complete. Error: 0.09275084528614866 Total: 0.0152; Orientation: 0.0011; Line Search: 0.0125
Non-optimal measurement 0.09275084528614866 < 0.09275084528614866. Total: 4
Accepted: LBFGS Orientation magnitude: 1.561e+10, gradient 4.972e+17, dot 0.011; [bfc4761e-0a8f-4839-a6e1-38ca0810709e = 1.000/1.000e+00, e5e42c9e-852c-4e6d-a6fd-2aaf777e1f5e = 1.000/1.000e+00, f4eee14c-f4e7-448b-a443-6d0e79a339b8 = 1.000/1.000e+00, e8df0bdb-2528-4d23-9b70-f85f20037155 = 1.000/1.000e+00, a3992eb2-acca-4125-b443-3fdd0b5a1680 = 1.000/1.000e+00, d0a9c6f7-2acb-44ed-b018-f894d2c32a9f = 1.000/1.000e+00, 96bc083b-3661-4faa-8491-2439de9be135 = 1.000/1.000e+00, 835529ff-27fe-429a-b12f-cca6c93c640c = 1.000/1.000e+00, 328df2e3-aae5-4494-81e8-812caf267ba0 = 1.000/1.000e+00, a745f3c6-778a-4b59-821d-6ec6d77375f3 = 1.000/1.000e+00, 761544b3-6071-453b-8168-de012a5aa72d = 1.000/1.000e+00, b3be129c-02c1-4aea-bb47-e29794d980e5 = 1.000/1.000e+00, 8b82b9fa-e7bd-4bd3-b352-6c49675a326a = 1.000/1.000e+00, 877cb444-0bbc-4891-a94f-07610db90509 = 1.000/1.000e+00, 44a73362-f0c1-4904-8e21-6d391693aba5 = 1.000/1.000e+00]
Constructing line search parameters: LBFGS
Non-optimal measurement 0.09275084528614866 < 0.09275084528614866. Total: 4
th(0)=0.09275084528614866;dx=-8.44963847448693E25
Adding measurement 4bb64422 to history. Total: 4
New Minimum: 0.09275084528614866 > 0.030540639587370542
Armijo: th(2.154434690031884)=0.030540639587370542; dx=-8.407934003146716E26 evalInputDelta=0.062210205698778116
Non-optimal measurement 0.04832868957549166 < 0.030540639587370542. Total: 5
Armijo: th(1.077217345015942)=0.04832868957549166; dx=-3.645928581801026E26 evalInputDelta=0.044422155710656996
Non-optimal measurement 0.06287866130535076 < 0.030540639587370542. Total: 5
Armijo: th(0.3590724483386473)=0.06287866130535076; dx=-1.5607253492335425E26 evalInputDelta=0.029872183980797898
Non-optimal measurement 0.08024416608152182 < 0.030540639587370542. Total: 5
Armijo: th(0.08976811208466183)=0.08024416608152182; dx=-1.0034767157387245E26 evalInputDelta=0.012506679204626836
Non-optimal measurement 0.08970578459464662 < 0.030540639587370542. Total: 5
Armijo: th(0.017953622416932366)=0.08970578459464662; dx=-8.755769540583696E25 evalInputDelta=0.0030450606915020384
Non-optimal measurement 0.09224126308932772 < 0.030540639587370542. Total: 5
Armijo: th(0.002992270402822061)=0.09224126308932772; dx=-8.500282031666832E25 evalInputDelta=5.09582196820943E-4
Non-optimal measureme

...skipping 181130 bytes...

= 1.000/1.000e+00, e5e42c9e-852c-4e6d-a6fd-2aaf777e1f5e = 1.000/1.000e+00, f4eee14c-f4e7-448b-a443-6d0e79a339b8 = 1.000/1.000e+00, 328df2e3-aae5-4494-81e8-812caf267ba0 = 1.000/1.000e+00, a3992eb2-acca-4125-b443-3fdd0b5a1680 = 1.000/1.000e+00]
Removed measurement 6579dd5a to history. Total: 31
Removed measurement 3680db93 to history. Total: 30
Adding measurement 78c964d6 to history. Total: 30
th(0)=0.030540639587345764;dx=-8.36722509783056E27
Adding measurement d998e1e to history. Total: 31
New Minimum: 0.030540639587345764 > 0.030540639587345497
Armijo: th(2.154434690031884E-15)=0.030540639587345497; dx=-8.367225097830669E27 evalInputDelta=2.671474153004283E-16
Non-optimal measurement 0.030540639587345632 < 0.030540639587345497. Total: 32
Armijo: th(1.077217345015942E-15)=0.030540639587345632; dx=-8.367225097830614E27 evalInputDelta=1.3183898417423734E-16
Non-optimal measurement 0.030540639587345497 < 0.030540639587345497. Total: 32
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.030540639587345497
Fitness changed from 0.030540639587345764 to 0.030540639587345497
Iteration 97 complete. Error: 0.030540639587345497 Total: 0.1381; Orientation: 0.1297; Line Search: 0.0075
Non-optimal measurement 0.030540639587345497 < 0.030540639587345497. Total: 32
Accepted: LBFGS Orientation magnitude: 1.321e+11, gradient 4.950e+18, dot 0.013; [bfc4761e-0a8f-4839-a6e1-38ca0810709e = 1.000/1.000e+00, f4eee14c-f4e7-448b-a443-6d0e79a339b8 = 1.000/1.000e+00, e5e42c9e-852c-4e6d-a6fd-2aaf777e1f5e = 1.000/1.000e+00, 877cb444-0bbc-4891-a94f-07610db90509 = 1.000/1.000e+00, 8b82b9fa-e7bd-4bd3-b352-6c49675a326a = 1.000/1.000e+00, e8df0bdb-2528-4d23-9b70-f85f20037155 = 1.000/1.000e+00, d0a9c6f7-2acb-44ed-b018-f894d2c32a9f = 1.000/1.000e+00, b3be129c-02c1-4aea-bb47-e29794d980e5 = 1.000/1.000e+00, a745f3c6-778a-4b59-821d-6ec6d77375f3 = 1.000/1.000e+00, 328df2e3-aae5-4494-81e8-812caf267ba0 = 1.000/1.000e+00, a3992eb2-acca-4125-b443-3fdd0b5a1680 = 1.000/1.000e+00, 96bc083b-3661-4faa-8491-2439de9be135 = 1.000/1.000e+00, 44a73362-f0c1-4904-8e21-6d391693aba5 = 1.000/1.000e+00, 761544b3-6071-453b-8168-de012a5aa72d = 1.000/1.000e+00, 835529ff-27fe-429a-b12f-cca6c93c640c = 1.000/1.000e+00]
Removed measurement d998e1e to history. Total: 31
Removed measurement 78c964d6 to history. Total: 30
Adding measurement 5e7d6830 to history. Total: 30
th(0)=0.030540639587345497;dx=-8.367225097830782E27
Adding measurement 3b05be69 to history. Total: 31
New Minimum: 0.030540639587345497 > 0.030540639587345226
Armijo: th(2.154434690031884E-15)=0.030540639587345226; dx=-8.367225097830893E27 evalInputDelta=2.706168622523819E-16
Non-optimal measurement 0.030540639587345365 < 0.030540639587345226. Total: 32
Armijo: th(1.077217345015942E-15)=0.030540639587345365; dx=-8.367225097830837E27 evalInputDelta=1.3183898417423734E-16
Non-optimal measurement 0.030540639587345226 < 0.030540639587345226. Total: 32
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.030540639587345226
Fitness changed from 0.030540639587345497 to 0.030540639587345226
Iteration 98 complete. Error: 0.030540639587345226 Total: 0.1712; Orientation: 0.1602; Line Search: 0.0099
Non-optimal measurement 0.030540639587345226 < 0.030540639587345226. Total: 32
Accepted: LBFGS Orientation magnitude: 1.321e+11, gradient 4.950e+18, dot 0.013; [bfc4761e-0a8f-4839-a6e1-38ca0810709e = 1.000/1.000e+00, 44a73362-f0c1-4904-8e21-6d391693aba5 = 1.000/1.000e+00, 835529ff-27fe-429a-b12f-cca6c93c640c = 1.000/1.000e+00, 877cb444-0bbc-4891-a94f-07610db90509 = 1.000/1.000e+00, b3be129c-02c1-4aea-bb47-e29794d980e5 = 1.000/1.000e+00, 96bc083b-3661-4faa-8491-2439de9be135 = 1.000/1.000e+00, e5e42c9e-852c-4e6d-a6fd-2aaf777e1f5e = 1.000/1.000e+00, a745f3c6-778a-4b59-821d-6ec6d77375f3 = 1.000/1.000e+00, 8b82b9fa-e7bd-4bd3-b352-6c49675a326a = 1.000/1.000e+00, a3992eb2-acca-4125-b443-3fdd0b5a1680 = 1.000/1.000e+00, d0a9c6f7-2acb-44ed-b018-f894d2c32a9f = 1.000/1.000e+00, e8df0bdb-2528-4d23-9b70-f85f20037155 = 1.000/1.000e+00, f4eee14c-f4e7-448b-a443-6d0e79a339b8 = 1.000/1.000e+00, 328df2e3-aae5-4494-81e8-812caf267ba0 = 1.000/1.000e+00, 761544b3-6071-453b-8168-de012a5aa72d = 1.000/1.000e+00]
Removed measurement 3b05be69 to history. Total: 31
Removed measurement 5e7d6830 to history. Total: 30
Adding measurement 67492209 to history. Total: 30
th(0)=0.030540639587345226;dx=-8.367225097831005E27
Adding measurement 2ada0fc to history. Total: 31
New Minimum: 0.030540639587345226 > 0.030540639587344952
Armijo: th(2.154434690031884E-15)=0.030540639587344952; dx=-8.367225097831116E27 evalInputDelta=2.740863092043355E-16
Non-optimal measurement 0.03054063958734509 < 0.030540639587344952. Total: 32
Armijo: th(1.077217345015942E-15)=0.03054063958734509; dx=-8.367225097831061E27 evalInputDelta=1.3530843112619095E-16
Non-optimal measurement 0.030540639587344952 < 0.030540639587344952. Total: 32
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.030540639587344952
Fitness changed from 0.030540639587345226 to 0.030540639587344952
Iteration 99 complete. Error: 0.030540639587344952 Total: 0.1364; Orientation: 0.1281; Line Search: 0.0073
Non-optimal measurement 0.030540639587344952 < 0.030540639587344952. Total: 32
Accepted: LBFGS Orientation magnitude: 1.321e+11, gradient 4.950e+18, dot 0.013; [877cb444-0bbc-4891-a94f-07610db90509 = 1.000/1.000e+00, b3be129c-02c1-4aea-bb47-e29794d980e5 = 1.000/1.000e+00, 761544b3-6071-453b-8168-de012a5aa72d = 1.000/1.000e+00, a3992eb2-acca-4125-b443-3fdd0b5a1680 = 1.000/1.000e+00, d0a9c6f7-2acb-44ed-b018-f894d2c32a9f = 1.000/1.000e+00, a745f3c6-778a-4b59-821d-6ec6d77375f3 = 1.000/1.000e+00, 8b82b9fa-e7bd-4bd3-b352-6c49675a326a = 1.000/1.000e+00, e5e42c9e-852c-4e6d-a6fd-2aaf777e1f5e = 1.000/1.000e+00, 96bc083b-3661-4faa-8491-2439de9be135 = 1.000/1.000e+00, bfc4761e-0a8f-4839-a6e1-38ca0810709e = 1.000/1.000e+00, e8df0bdb-2528-4d23-9b70-f85f20037155 = 1.000/1.000e+00, 44a73362-f0c1-4904-8e21-6d391693aba5 = 1.000/1.000e+00, f4eee14c-f4e7-448b-a443-6d0e79a339b8 = 1.000/1.000e+00, 328df2e3-aae5-4494-81e8-812caf267ba0 = 1.000/1.000e+00, 835529ff-27fe-429a-b12f-cca6c93c640c = 1.000/1.000e+00]
Removed measurement 2ada0fc to history. Total: 31
Removed measurement 67492209 to history. Total: 30
Adding measurement 21998c65 to history. Total: 30
th(0)=0.030540639587344952;dx=-8.367225097831228E27
Adding measurement 6a9780d5 to history. Total: 31
New Minimum: 0.030540639587344952 > 0.030540639587344688
Armijo: th(2.154434690031884E-15)=0.030540639587344688; dx=-8.367225097831339E27 evalInputDelta=2.636779683484747E-16
Non-optimal measurement 0.030540639587344827 < 0.030540639587344688. Total: 32
Armijo: th(1.077217345015942E-15)=0.030540639587344827; dx=-8.367225097831283E27 evalInputDelta=1.249000902703301E-16
Non-optimal measurement 0.030540639587344688 < 0.030540639587344688. Total: 32
MIN ALPHA (3.5907244833864734E-16): th(2.154434690031884E-15)=0.030540639587344688
Fitness changed from 0.030540639587344952 to 0.030540639587344688
Iteration 100 complete. Error: 0.030540639587344688 Total: 0.1389; Orientation: 0.1298; Line Search: 0.0080
Reset training subject: 4062409458669
Adding measurement 4ee34188 to history. Total: 0
LBFGS Accumulation History: 1 points
Non-optimal measurement 0.030540639587344688 < 0.030540639587344688. Total: 1
th(0)=0.030540639587344688;dx=-2.4505846647457083E37
Non-optimal measurement 0.030540639587344688 < 0.030540639587344688. Total: 1
Armijo: th(2.154434690031884E-15)=0.030540639587344688; dx=-2.4505913378211426E37 evalInputDelta=0.0
Non-optimal measurement 0.030540639587344688 < 0.030540639587344688. Total: 1
Armijo: th(1.077217345015942E-15)=0.030540639587344688; dx=-2.450588001283424E37 evalInputDelta=0.0
Non-optimal measurement 0.030540639587344688 < 0.030540639587344688. Total: 1
MIN ALPHA (3.5907244833864734E-16): th(0.0)=0.030540639587344688
Fitness changed from 0.030540639587344688 to 0.030540639587344688
Static Iteration Total: 0.0090; Orientation: 0.0009; Line Search: 0.0061
Iteration 101 failed. Error: 0.030540639587344688
Previous Error: 0.0 -> 0.030540639587344688
Optimization terminated 101
Final threshold in iteration 101: 0.030540639587344688 (> 0.0) after 15.111s (< 30.000s)

Returns

    0.030540639587344688

This training apply resulted in the following configuration:

TrainingTester.java:610 executed in 0.00 seconds (0.000 gc):

    RefList<double[]> state = network.state();
    assert state != null;
    String description = state.stream().map(RefArrays::toString).reduce((a, b) -> a + "\n" + b)
        .orElse("");
    state.freeRef();
    return description;

Returns

    

And regressed input:

TrainingTester.java:622 executed in 0.00 seconds (0.000 gc):

    return RefArrays.stream(RefUtil.addRef(data)).flatMap(x -> {
      return RefArrays.stream(x);
    }).limit(1).map(x -> {
      String temp_18_0015 = x.prettyPrint();
      x.freeRef();
      return temp_18_0015;
    }).reduce((a, b) -> a + "\n" + b).orElse("");

Returns

    [ -0.3543891287459322, -0.8110944863155154, -1.1023875152713382E9 ]

To produce the following output:

TrainingTester.java:633 executed in 0.00 seconds (0.000 gc):

    Result[] array = ConstantResult.batchResultArray(pop(RefUtil.addRef(data)));
    @Nullable
    Result eval = layer.eval(array);
    assert eval != null;
    TensorList tensorList = Result.getData(eval);
    String temp_18_0016 = tensorList.stream().limit(1).map(x -> {
      String temp_18_0017 = x.prettyPrint();
      x.freeRef();
      return temp_18_0017;
    }).reduce((a, b) -> a + "\n" + b).orElse("");
    tensorList.freeRef();
    return temp_18_0016;

Returns

    [ -0.015312715020398595, -0.07629559932945543, 8.590797773943937E27 ]

TrainingTester.java:432 executed in 0.11 seconds (0.000 gc):

    return TestUtil.compare(title + " vs Iteration", runs);
Logging
Plotting range=[1.0, -1.515121872114374], [250.0, -0.09274564935178804]; valueStats=DoubleSummaryStatistics{count=351, sum=27.236114, min=0.030541, average=0.077596, max=0.807708}
Plotting 250 points for GD
Plotting 2 points for CjGD
Plotting 100 points for LBFGS

Returns

Result

TrainingTester.java:435 executed in 0.01 seconds (0.000 gc):

    return TestUtil.compareTime(title + " vs Time", runs);
Logging
Plotting range=[0.0, -1.515121872114374], [15.021, -0.09274564935178804]; valueStats=DoubleSummaryStatistics{count=351, sum=27.236114, min=0.030541, average=0.077596, max=0.807708}
Plotting 250 points for GD
Plotting 2 points for CjGD
Plotting 100 points for LBFGS

Returns

Result

Results

TrainingTester.java:255 executed in 0.00 seconds (0.000 gc):

    return grid(inputLearning, modelLearning, completeLearning);

Returns

Result

TrainingTester.java:258 executed in 0.00 seconds (0.000 gc):

    return new ComponentResult(null == inputLearning ? null : inputLearning.value,
        null == modelLearning ? null : modelLearning.value, null == completeLearning ? null : completeLearning.value);

Returns

    {"input":{ "LBFGS": { "type": "NonConverged", "value": 0.030540639587344688 }, "CjGD": { "type": "Converged", "value": 0.0 }, "GD": { "type": "NonConverged", "value": 0.09275084528612745 } }, "model":null, "complete":null}

LayerTests.java:425 executed in 0.00 seconds (0.000 gc):

    throwException(exceptions.addRef());

Results

detailsresult
{"input":{ "LBFGS": { "type": "NonConverged", "value": 0.030540639587344688 }, "CjGD": { "type": "Converged", "value": 0.0 }, "GD": { "type": "NonConverged", "value": 0.09275084528612745 } }, "model":null, "complete":null}OK
  {
    "result": "OK",
    "performance": {
      "execution_time": "20.037",
      "gc_time": "2.935"
    },
    "created_on": 1586738631763,
    "file_name": "trainingTest",
    "report": {
      "simpleName": "NNNTest",
      "canonicalName": "com.simiacryptus.mindseye.layers.java.ProductInputsLayerTest.NNNTest",
      "link": "https://github.com/SimiaCryptus/mindseye-java/tree/93db34cedee48c0202777a2b25deddf1dfaf5731/src/test/java/com/simiacryptus/mindseye/layers/java/ProductInputsLayerTest.java",
      "javaDoc": ""
    },
    "training_analysis": {
      "input": {
        "LBFGS": {
          "type": "NonConverged",
          "value": 0.030540639587344688
        },
        "CjGD": {
          "type": "Converged",
          "value": 0.0
        },
        "GD": {
          "type": "NonConverged",
          "value": 0.09275084528612745
        }
      }
    },
    "archive": "s3://code.simiacrypt.us/tests/com/simiacryptus/mindseye/layers/java/ProductInputsLayer/NNNTest/trainingTest/202004134351",
    "id": "2e7af7d1-a790-4159-bd90-48ac66a9971f",
    "report_type": "Components",
    "display_name": "Comparative Training",
    "target": {
      "simpleName": "ProductInputsLayer",
      "canonicalName": "com.simiacryptus.mindseye.layers.java.ProductInputsLayer",
      "link": "https://github.com/SimiaCryptus/mindseye-java/tree/93db34cedee48c0202777a2b25deddf1dfaf5731/src/main/java/com/simiacryptus/mindseye/layers/java/ProductInputsLayer.java",
      "javaDoc": ""
    }
  }