"""
Platform: On one V100 GPU, single machine
Framework: Tensorflow 1.14, CUDA 10.2
Model/Dataset: 2conv + 2 dense with MNIST
	# ---------
	# Variables: name (type shape) [size]
	# ---------
	# conv_layer1/conv2d/kernel:0 (float32_ref 5x5x1x32) [800, bytes: 3200]
	# conv_layer1/conv2d/bias:0 (float32_ref 32) [32, bytes: 128]
	# conv_layer2/conv2d/kernel:0 (float32_ref 5x5x32x64) [51200, bytes: 204800]
	# conv_layer2/conv2d/bias:0 (float32_ref 64) [64, bytes: 256]
	# dense/kernel:0 (float32_ref 3136x1024) [3211264, bytes: 12845056]
	# dense/bias:0 (float32_ref 1024) [1024, bytes: 4096]
	# dense_1/kernel:0 (float32_ref 1024x10) [10240, bytes: 40960]
	# dense_1/bias:0 (float32_ref 10) [10, bytes: 40]
	# Total size of variables: 3274634
	# Total bytes of variables: 13098536
"""
import matplotlib.pyplot as plt
import numpy as np
import math
from scipy.optimize import curve_fit

NAMELIST_32 = ['Adam/mul', 'Adam/mul_1', 'Adam/update_conv_layer1/conv2d/bias/ApplyAdam', 'Adam/update_conv_layer1/conv2d/kernel/ApplyAdam', 'Adam/update_conv_layer2/conv2d/bias/ApplyAdam', 'Adam/update_conv_layer2/conv2d/kernel/ApplyAdam', 'Adam/update_dense/bias/ApplyAdam', 'Adam/update_dense/kernel/ApplyAdam', 'Adam/update_dense_1/bias/ApplyAdam', 'Adam/update_dense_1/kernel/ApplyAdam', 'Cast', 'conv_layer1/conv2d/BiasAdd', 'conv_layer1/conv2d/Conv2D', 'conv_layer1/conv2d/Relu', 'conv_layer2/conv2d/BiasAdd', 'conv_layer2/conv2d/Conv2D', 'conv_layer2/conv2d/Relu', 'dense/BiasAdd', 'dense/MatMul', 'dense/Relu', 'dense_1/BiasAdd', 'dense_1/MatMul', 'dropout/dropout/Cast', 'dropout/dropout/mul', 'dropout/dropout/mul_1', 'gradients/conv_layer1/conv2d/BiasAdd_grad/BiasAddGrad', 'gradients/conv_layer1/conv2d/Conv2D_grad/Conv2DBackpropFilter', 'gradients/conv_layer1/conv2d/Relu_grad/ReluGrad', 'gradients/conv_layer2/conv2d/BiasAdd_grad/BiasAddGrad', 'gradients/conv_layer2/conv2d/Conv2D_grad/Conv2DBackpropFilter', 'gradients/conv_layer2/conv2d/Conv2D_grad/Conv2DBackpropInput', 'gradients/conv_layer2/conv2d/Relu_grad/ReluGrad', 'gradients/dense/BiasAdd_grad/BiasAddGrad', 'gradients/dense/MatMul_grad/MatMul', 'gradients/dense/MatMul_grad/MatMul_1', 'gradients/dense/Relu_grad/ReluGrad', 'gradients/dense_1/BiasAdd_grad/BiasAddGrad', 'gradients/dense_1/MatMul_grad/MatMul', 'gradients/dense_1/MatMul_grad/MatMul_1', 'gradients/dropout/dropout/mul_1_grad/Mul', 'gradients/dropout/dropout/mul_grad/Mul', 'gradients/softmax_cross_entropy_loss/xentropy_grad/mul', 'softmax_cross_entropy_loss/Cast']
DATA_32 = {
	"B=100": {
		"D=1024":{
			"K=5": [0.037849999999999995, 0.027709999999999953, 0.031239999999999952, 0.03365249999999996, 0.03135000000000001, 0.03427499999999998, 0.025690000000000025, 0.0829924999999999, 0.03878249999999995, 0.035424999999999984, 0.12418499999999995, 0.06959499999999998, 0.15876499999999993, 0.05509499999999996, 0.031664999999999985, 0.08117333333333333, 0.027544999999999993, 0.02482999999999997, 0.08455333333333326, 0.026329999999999982, 0.026089999999999957, 0.04519333333333329, 0.046664999999999936, 0.034265, 0.04554499999999999, 0.048764999999999975, 0.10948333333333334, 0.050455000000000035, 0.05133999999999997, 0.09336833333333334, 0.10496333333333342, 0.04216999999999997, 0.03489999999999997, 0.11033499999999996, 0.06576500000000012, 0.03243999999999998, 0.04390500000000001, 0.04729999999999994, 0.04671499999999999, 0.033745, 0.033905000000000025, 0.03267, 0.06342000000000002]
		}
	},
	"B=200": {
		"D=1024":{
			"K=5": [0.04357000000000001, 0.031044999999999975, 0.031680000000000035, 0.03620999999999998, 0.045004999999999996, 0.03343499999999996, 0.028412500000000052, 0.0720399999999999, 0.039385, 0.03680249999999995, 0.15085000000000004, 0.07773500000000004, 0.1749025, 0.06183499999999999, 0.04010499999999993, 0.10209000000000015, 0.03644, 0.02675999999999997, 0.11472333333333343, 0.02333499999999996, 0.026814999999999967, 0.04547999999999998, 0.03355499999999998, 0.036265, 0.030544999999999992, 0.04967249999999997, 0.13271666666666668, 0.07065000000000002, 0.056455000000000005, 0.12044500000000004, 0.12553000000000006, 0.05297499999999996, 0.05550999999999998, 0.12580999999999995, 0.0898600000000001, 0.03497499999999999, 0.04602999999999999, 0.04991999999999997, 0.049590000000000016, 0.038034999999999985, 0.03793, 0.03535499999999999, 0.07363999999999998]
		}
	},
	"B=300": {
		"D=1024":{
			"K=5": [0.039724999999999955, 0.02833499999999999, 0.02632250000000004, 0.03224250000000005, 0.044605, 0.029897499999999976, 0.026445000000000083, 0.06944499999999987, 0.038164999999999984, 0.03500749999999998, 0.20464000000000004, 0.09099500000000006, 0.17814750000000004, 0.08241500000000006, 0.07086500000000003, 0.13494333333333342, 0.04275999999999998, 0.025099999999999983, 0.1422000000000001, 0.02108499999999995, 0.028524999999999988, 0.06311999999999997, 0.03601499999999999, 0.034665, 0.03150999999999999, 0.04789750000000012, 0.12684666666666666, 0.08487500000000012, 0.05628000000000002, 0.14177999999999996, 0.13761500000000004, 0.059524999999999995, 0.05235999999999997, 0.14419500000000007, 0.11493499999999995, 0.03564999999999999, 0.04554000000000002, 0.050010000000000006, 0.05020333333333327, 0.03769999999999998, 0.035074999999999995, 0.03507999999999998, 0.09751999999999995]
		}
	},
	"B=400": {
		"D=1024":{
			"K=5": [0.03615999999999995, 0.02755499999999995, 0.028752500000000042, 0.030557500000000078, 0.03787, 0.03029999999999996, 0.02588500000000003, 0.07519749999999988, 0.04552999999999997, 0.034617499999999975, 0.14543999999999993, 0.11663999999999987, 0.18838499999999986, 0.08111499999999998, 0.05915000000000003, 0.1339366666666668, 0.04975000000000003, 0.027110000000000026, 0.19658499999999995, 0.022624999999999954, 0.02926499999999997, 0.04892333333333331, 0.029499999999999985, 0.03168499999999999, 0.029169999999999953, 0.04685750000000002, 0.14984666666666696, 0.10153499999999996, 0.051509999999999966, 0.17787666666666702, 0.16352500000000017, 0.06788499999999999, 0.036054999999999976, 0.1984699999999999, 0.15698999999999994, 0.032959999999999996, 0.04328999999999998, 0.048259999999999977, 0.049156666666666654, 0.03580999999999997, 0.03525499999999996, 0.03358, 0.059955]
		}
	},
	"B=500": {
		"D=1024":{
			"K=5": [0.03193499999999995, 0.02438499999999996, 0.02673750000000008, 0.028057500000000072, 0.05775749999999995, 0.02942249999999999, 0.025495000000000004, 0.06695749999999986, 0.03774249999999996, 0.035399999999999966, 0.17909499999999995, 0.1670299999999999, 0.17378499999999997, 0.10080000000000001, 0.06327999999999999, 0.16798833333333363, 0.05365000000000003, 0.027159999999999997, 0.21997499999999992, 0.02153999999999995, 0.023359999999999957, 0.041526666666666684, 0.02909999999999998, 0.03072499999999999, 0.027655000000000002, 0.054062500000000034, 0.14475333333333323, 0.11972999999999995, 0.061970000000000046, 0.20173833333333338, 0.17443333333333355, 0.07632000000000001, 0.05441, 0.19414500000000018, 0.17530500000000007, 0.03510999999999998, 0.043004999999999995, 0.048599999999999983, 0.04820999999999995, 0.03602499999999998, 0.035835, 0.03331, 0.06266999999999999]
		}
	},
	"B=600": {
		"D=1024":{
			"K=5": [0.03464499999999992, 0.02595499999999996, 0.027742500000000066, 0.030382500000000104, 0.039637500000000034, 0.03049999999999999, 0.02543750000000003, 0.0678874999999998, 0.03716749999999993, 0.03417499999999996, 0.20965999999999985, 0.13780500000000004, 0.18800000000000022, 0.12159999999999989, 0.06895000000000001, 0.16382833333333335, 0.06024, 0.025639999999999996, 0.24706999999999993, 0.04031500000000008, 0.02266999999999997, 0.03867, 0.028224999999999986, 0.026979999999999973, 0.026539999999999987, 0.05829000000000004, 0.15735333333333348, 0.13894500000000007, 0.062464999999999965, 0.2299533333333338, 0.1913300000000005, 0.08432000000000008, 0.052955000000000016, 0.23930499999999977, 0.2002550000000002, 0.03428999999999997, 0.043335, 0.046090000000000006, 0.045429999999999936, 0.03539999999999998, 0.036124999999999956, 0.033719999999999986, 0.0717]
		}
	},
	"B=700": {
		"D=1024":{
			"K=5": [0.03335999999999996, 0.025999999999999943, 0.028880000000000076, 0.028832500000000066, 0.043297500000000017, 0.03177999999999994, 0.026387500000000036, 0.06743499999999977, 0.036997499999999996, 0.03522749999999995, 0.29869, 0.15169000000000007, 0.1604625, 0.12996500000000005, 0.08038500000000007, 0.2021133333333334, 0.06600999999999994, 0.026474999999999946, 0.27959499999999976, 0.02243, 0.021904999999999956, 0.04177999999999997, 0.028309999999999967, 0.028054999999999962, 0.026494999999999963, 0.06026250000000007, 0.1781366666666669, 0.15688499999999997, 0.07028499999999993, 0.27844166666666686, 0.22118999999999958, 0.09381999999999997, 0.05258500000000006, 0.2597350000000001, 0.23786499999999994, 0.03624999999999996, 0.04503000000000003, 0.04800999999999993, 0.04680666666666668, 0.03788999999999998, 0.03638999999999996, 0.03287499999999999, 0.04929]
		}
	},
	"B=800": {
		"D=1024":{
			"K=5": [0.032669999999999935, 0.02600499999999996, 0.029667500000000072, 0.030127500000000085, 0.04908500000000001, 0.03331249999999996, 0.02779250000000003, 0.06813499999999982, 0.03583500000000003, 0.03399749999999998, 0.2119549999999999, 0.163835, 0.19921500000000017, 0.1288200000000001, 0.10400000000000002, 0.21114666666666723, 0.07257000000000002, 0.028814999999999966, 0.3336549999999999, 0.02412499999999998, 0.022849999999999968, 0.044123333333333306, 0.028254999999999978, 0.02882999999999996, 0.027569999999999987, 0.06449250000000008, 0.19870333333333365, 0.17622999999999994, 0.07205500000000004, 0.303806666666667, 0.24035833333333342, 0.10323499999999998, 0.05636500000000003, 0.3193350000000001, 0.27356500000000034, 0.03996499999999997, 0.03920000000000004, 0.04340999999999997, 0.056530000000000094, 0.03566999999999995, 0.037094999999999975, 0.03139499999999995, 0.07204499999999997]
		}
	},
	"B=900": {
		"D=1024":{
			"K=5": [0.031864999999999935, 0.02308999999999996, 0.027540000000000023, 0.026672500000000047, 0.04377000000000005, 0.029449999999999966, 0.027039999999999988, 0.06618999999999982, 0.03240250000000002, 0.03075750000000001, 0.18789500000000003, 0.17505000000000018, 0.19151249999999997, 0.13896000000000006, 0.093555, 0.22261000000000025, 0.07656999999999997, 0.027129999999999984, 0.29341500000000004, 0.021534999999999985, 0.022239999999999975, 0.046879999999999936, 0.02847500000000001, 0.029055000000000004, 0.02717499999999995, 0.06770500000000014, 0.19786666666666694, 0.19250499999999998, 0.07427499999999998, 0.3236850000000002, 0.2546683333333337, 0.11118499999999998, 0.055869999999999996, 0.3247150000000001, 0.2911100000000002, 0.03721499999999997, 0.039460000000000044, 0.04365000000000002, 0.04433333333333338, 0.03231499999999996, 0.03300499999999997, 0.028289999999999958, 0.10220999999999993]
		}
	},
	
	"B=1000": {
		"D=1024": {
			"K=1": [0.031029999999999926, 0.022569999999999965, 0.03598750000000001, 0.026325000000000008, 0.031905000000000024, 0.031297500000000054, 0.024822499999999987, 0.06597249999999985, 0.05238500000000001, 0.03267999999999994, 0.25940500000000005, 0.20106999999999997, 0.17994749999999982, 0.15628499999999998, 0.10417000000000004, 0.09649750000000008, 0.0834950000000001, 0.029389999999999986, 0.35001499999999985, 0.02232999999999999, 0.020844999999999957, 0.043786666666666633, 0.028144999999999993, 0.028694999999999932, 0.02765999999999999, 0.06948750000000006, 0.21901666666666675, 0.213665, 0.07673500000000005, 0.16042333333333347, 0.1025080000000001, 0.12730000000000002, 0.04187999999999996, 0.3728449999999996, 0.3134300000000001, 0.03645999999999999, 0.04194999999999999, 0.048474999999999956, 0.0459866666666667, 0.03702499999999997, 0.037915000000000004, 0.03020499999999996, 0.044109999999999934],
			"K=3": [0.03325999999999995, 0.026024999999999954, 0.028352500000000034, 0.03025000000000009, 0.03200500000000008, 0.031182499999999943, 0.026702500000000004, 0.08248749999999996, 0.04491749999999998, 0.034550000000000025, 0.3451300000000001, 0.199375, 0.18290000000000015, 0.15439499999999998, 0.10512499999999997, 0.17965000000000012, 0.08349000000000005, 0.029630000000000004, 0.3458499999999999, 0.023224999999999992, 0.03791499999999994, 0.0424533333333333, 0.02909000000000002, 0.04506999999999998, 0.028339999999999973, 0.0728775000000001, 0.2167533333333336, 0.21171999999999985, 0.09146000000000008, 0.19195874999999965, 0.18517500000000012, 0.15604500000000004, 0.04091499999999999, 0.34259, 0.31106000000000006, 0.03901499999999997, 0.040620000000000045, 0.04786999999999996, 0.04711333333333337, 0.035389999999999956, 0.03854, 0.031124999999999972, 0.06401000000000001],
			"K=5": [0.03261999999999994, 0.02577499999999996, 0.0298275000000001, 0.029492500000000112, 0.04423000000000003, 0.03148499999999997, 0.026920000000000065, 0.0669299999999998, 0.032647500000000024, 0.03016250000000001, 0.22351999999999989, 0.19252499999999984, 0.18491500000000002, 0.15533000000000002, 0.10297000000000002, 0.24545333333333375, 0.08392500000000004, 0.029919999999999974, 0.3292, 0.022444999999999996, 0.022069999999999965, 0.04243666666666666, 0.028779999999999983, 0.08226000000000004, 0.03103499999999997, 0.07042999999999996, 0.2317366666666669, 0.212535, 0.08037000000000001, 0.346218333333333, 0.27203500000000014, 0.12133000000000002, 0.05500999999999995, 0.32594500000000004, 0.2968600000000001, 0.04134999999999999, 0.039565, 0.042359999999999995, 0.04366000000000016, 0.031669999999999934, 0.036209999999999985, 0.029269999999999984, 0.08383999999999997],
			"K=7": [0.03398499999999995, 0.025519999999999956, 0.02760500000000005, 0.03565000000000008, 0.029545000000000016, 0.027799999999999964, 0.027994999999999978, 0.06806749999999996, 0.03136500000000001, 0.02919499999999997, 0.233175, 0.19453999999999985, 0.3200433333333335, 0.15282500000000013, 0.10554000000000002, 0.3437799999999996, 0.08313500000000004, 0.02939499999999999, 0.3547899999999998, 0.022514999999999993, 0.021104999999999957, 0.0416933333333333, 0.028474999999999997, 0.02868999999999996, 0.027969999999999943, 0.06703750000000007, 0.22258666666666693, 0.20937999999999987, 0.08187000000000005, 0.35638624999999924, 0.3355616666666668, 0.13054499999999994, 0.03728999999999999, 0.3448199999999998, 0.31633, 0.034925, 0.04439000000000001, 0.041124999999999995, 0.04273666666666669, 0.030674999999999945, 0.03255999999999999, 0.028544999999999963, 0.07976500000000004],
			"K=9": [0.03413999999999994, 0.025254999999999965, 0.029072500000000074, 0.03783250000000007, 0.030410000000000065, 0.031434999999999935, 0.028749999999999977, 0.06834499999999996, 0.03249000000000001, 0.029977499999999963, 0.26184999999999997, 0.19593999999999998, 0.37259000000000025, 0.15619500000000008, 0.10653499999999999, 0.3523816666666667, 0.11356000000000005, 0.031214999999999958, 0.3402450000000002, 0.023850000000000017, 0.02284499999999996, 0.04307, 0.029795000000000006, 0.03195499999999996, 0.029154999999999973, 0.07090500000000004, 0.33588999999999963, 0.21191999999999983, 0.07955000000000012, 0.34733999999999876, 0.3321533333333333, 0.12967499999999998, 0.036394999999999976, 0.33009, 0.2997050000000001, 0.03598499999999999, 0.03983000000000004, 0.04255500000000002, 0.043133333333333364, 0.032759999999999956, 0.035675, 0.030154999999999963, 0.13443999999999992],
			"K=11": [0.034849999999999944, 0.02632499999999996, 0.028967500000000087, 0.03772500000000005, 0.03089750000000008, 0.031894999999999944, 0.030597499999999965, 0.06997499999999998, 0.0337075, 0.03102749999999999, 0.1848849999999999, 0.19358499999999992, 0.44035666666666706, 0.1534300000000001, 0.12758500000000006, 0.3315416666666669, 0.08751000000000003, 0.031944999999999946, 0.3353800000000001, 0.025589999999999984, 0.022789999999999973, 0.04350666666666668, 0.030474999999999978, 0.029769999999999998, 0.029509999999999984, 0.07061499999999997, 0.3327899999999997, 0.21190499999999982, 0.08398000000000005, 0.349313749999999, 0.3248799999999998, 0.1333250000000001, 0.051744999999999965, 0.32400000000000007, 0.2960700000000001, 0.03871, 0.039939999999999996, 0.045049999999999944, 0.05769666666666674, 0.032314999999999976, 0.03652499999999997, 0.029275, 0.092805],
			"K=13": [0.03324999999999993, 0.024544999999999945, 0.027455000000000073, 0.04069000000000003, 0.02929500000000006, 0.030802499999999927, 0.028857499999999984, 0.0699674999999999, 0.03125499999999994, 0.029964999999999957, 0.23229499999999986, 0.19193000000000007, 0.5083333333333333, 0.15452000000000005, 0.12243000000000002, 0.32231666666666653, 0.08541000000000003, 0.03054499999999996, 0.32962499999999983, 0.022599999999999988, 0.021569999999999978, 0.041703333333333294, 0.030419999999999985, 0.03005999999999999, 0.029339999999999963, 0.06754749999999998, 0.42396333333333314, 0.21122999999999986, 0.07795000000000005, 0.3434712499999997, 0.328266666666667, 0.13088500000000006, 0.036959999999999986, 0.31909000000000004, 0.29741000000000023, 0.036655, 0.039489999999999977, 0.04258499999999998, 0.043966666666666716, 0.03158999999999995, 0.03534499999999997, 0.029834999999999987, 0.07844000000000001],
			"K=15": [0.04749499999999998, 0.023804999999999948, 0.028762500000000055, 0.036979999999999964, 0.02959500000000002, 0.03317749999999991, 0.029652499999999984, 0.07014499999999996, 0.032590000000000015, 0.030764999999999976, 0.20537999999999987, 0.19274999999999998, 0.6150599999999999, 0.15426499999999999, 0.13756000000000007, 0.33744166666666703, 0.08590000000000003, 0.03317999999999997, 0.359395, 0.025669999999999984, 0.02481499999999999, 0.044739999999999974, 0.031004999999999967, 0.03224999999999998, 0.03268499999999998, 0.06845250000000007, 0.5727599999999999, 0.21203499999999978, 0.07828000000000004, 0.35333124999999915, 0.3289116666666671, 0.12793000000000004, 0.03581499999999996, 0.33439999999999975, 0.3113250000000002, 0.06660999999999995, 0.03790499999999999, 0.043454999999999994, 0.04446999999999996, 0.032394999999999965, 0.03451499999999999, 0.029084999999999958, 0.07033500000000001],
			# [0.013329999999999988, 0.010954999999999979, 0.012504999999999955, 0.013427499999999936, 0.01221749999999996, 0.025222499999999967, 0.013084999999999944, 0.09714749999999996, 0.013222499999999944, 0.014214999999999927, 0.030679999999999957, 0.04670500000000003, 0.0771224999999999, 0.03777500000000002, 0.029759999999999967, 0.09839714285714275, 0.025334999999999976, 0.012369999999999961, 0.0841299999999999, 0.011169999999999984, 0.009569999999999978, 0.024864999999999967, 0.012194999999999982, 0.01206999999999998, 0.010649999999999982, 0.02351749999999997, 0.07054999999999977, 0.05250000000000005, 0.020217499999999954, 0.1148162499999999, 0.09248714285714284, 0.031699999999999964, 0.01742499999999998, 0.091955, 0.06370499999999998, 0.012109999999999971, 0.017126666666666648, 0.01817499999999997, 0.01674999999999999, 0.012154999999999987, 0.016014999999999974, 0.012379999999999967, 0.02466499999999997]
			"K=17": [0.03500999999999995, 0.02526499999999998, 0.028500000000000036, 0.038059999999999955, 0.03184750000000005, 0.03860749999999999, 0.03030249999999993, 0.0703549999999999, 0.03385499999999995, 0.03188249999999995, 0.21135500000000002, 0.19537000000000007, 0.7589566666666666, 0.15816000000000008, 0.12309000000000003, 0.3302933333333336, 0.08605500000000008, 0.03460999999999999, 0.3493300000000001, 0.025924999999999997, 0.025104999999999975, 0.04999333333333333, 0.03483999999999999, 0.03527999999999998, 0.03402999999999996, 0.0737475000000001, 0.6780866666666658, 0.21609499999999987, 0.08181500000000007, 0.3512449999999992, 0.33335666666666636, 0.13382999999999992, 0.037709999999999966, 0.33028999999999975, 0.30737000000000003, 0.037444999999999985, 0.041709999999999976, 0.046575000000000005, 0.046533333333333295, 0.033024999999999985, 0.03640499999999999, 0.03235499999999997, 0.06024999999999994],
			"K=19": [0.03294499999999994, 0.040064999999999976, 0.02779000000000009, 0.028104999999999977, 0.030387500000000008, 0.05100999999999988, 0.029199999999999962, 0.06922249999999998, 0.03453250000000002, 0.04058749999999996, 0.23772500000000002, 0.1941100000000001, 0.31565866666666714, 0.1533950000000002, 0.10518500000000007, 0.3324466666666663, 0.0844900000000001, 0.031864999999999984, 0.3553100000000001, 0.02431999999999998, 0.03892499999999999, 0.04839333333333323, 0.031784999999999966, 0.03213999999999998, 0.031034999999999972, 0.06801500000000008, 0.8215966666666663, 0.21363499999999994, 0.08239499999999998, 0.35718874999999967, 0.3354916666666666, 0.14203000000000002, 0.03697, 0.34321999999999986, 0.32654000000000005, 0.03917500000000002, 0.040799999999999975, 0.046390000000000035, 0.04587999999999998, 0.033815, 0.03954999999999998, 0.03097999999999999, 0.08764499999999999],
			# [0.03154999999999995, 0.04320000000000004, 0.027612500000000043, 0.028847499999999967, 0.028707499999999987, 0.042837499999999924, 0.02971249999999997, 0.0689674999999999, 0.03185999999999998, 0.038272499999999945, 0.34198000000000006, 0.18942000000000014, 0.29406400000000005, 0.15389500000000014, 0.10398500000000005, 0.3223066666666665, 0.08483500000000006, 0.030894999999999975, 0.3366100000000001, 0.023444999999999983, 0.09203999999999989, 0.043966666666666626, 0.03362000000000002, 0.030374999999999975, 0.029859999999999963, 0.06711500000000012, 0.7784899999999996, 0.21168999999999985, 0.08105499999999997, 0.3503787499999989, 0.32881833333333355, 0.15084499999999998, 0.033604999999999954, 0.32634500000000005, 0.30552500000000005, 0.03853500000000001, 0.04019999999999993, 0.045229999999999965, 0.04538333333333325, 0.032589999999999966, 0.03671999999999999, 0.04826499999999996, 0.18601999999999985],
			"K=21": [0.031394999999999944, 0.022514999999999966, 0.026635000000000065, 0.035452500000000074, 0.027987500000000044, 0.05620749999999996, 0.02862750000000003, 0.06879249999999994, 0.034249999999999975, 0.029379999999999976, 0.1846999999999999, 0.1980799999999999, 1.0057266666666675, 0.16423000000000004, 0.10509000000000006, 0.8006840000000002, 0.08795500000000007, 0.03399999999999998, 0.33112499999999995, 0.024604999999999985, 0.024344999999999978, 0.04833666666666659, 0.030919999999999975, 0.03218499999999998, 0.030559999999999986, 0.07533249999999996, 0.864609999999999, 0.21410500000000002, 0.09449499999999997, 1.2477763636363626, 0.8055073333333348, 0.12492500000000004, 0.03462999999999998, 0.31543, 0.29746000000000017, 0.03577999999999999, 0.04218499999999997, 0.06885999999999998, 0.04609666666666663, 0.03382000000000001, 0.035325, 0.03192999999999999, 0.07447499999999999],
			"K=23": [0.02999499999999995, 0.02328499999999997, 0.026132500000000065, 0.034375000000000086, 0.028145000000000028, 0.04699499999999987, 0.029725000000000005, 0.0690699999999999, 0.03323749999999999, 0.0299775, 0.16517499999999996, 0.19168500000000013, 1.1214366666666662, 0.15541000000000008, 0.103435, 0.7994673333333333, 0.08545500000000006, 0.03222499999999998, 0.32725000000000015, 0.024419999999999987, 0.023999999999999973, 0.04503666666666659, 0.031134999999999996, 0.03313499999999999, 0.031249999999999983, 0.07314999999999998, 1.0851966666666653, 0.21272999999999986, 0.09306000000000009, 1.2433790909090852, 0.8053573333333326, 0.12391500000000014, 0.03443999999999998, 0.31525500000000006, 0.2993550000000001, 0.03501499999999997, 0.03839499999999998, 0.04325999999999999, 0.04391999999999995, 0.03234499999999995, 0.035089999999999996, 0.02924500000000001, 0.12561999999999995],
			"K=25": [0.03151499999999996, 0.025114999999999964, 0.027475000000000062, 0.028294999999999994, 0.030625000000000055, 0.043774999999999856, 0.03910749999999994, 0.07092249999999992, 0.05143250000000006, 0.03037499999999996, 0.46145500000000034, 0.18783499999999997, 0.3606327272727266, 0.15309000000000014, 0.10503499999999995, 0.8057026666666653, 0.08740000000000006, 0.055939999999999976, 0.33199, 0.025939999999999998, 0.024789999999999996, 0.04676333333333325, 0.03297999999999998, 0.033310000000000006, 0.03268999999999997, 0.06806500000000001, 1.1941433333333316, 0.21366999999999997, 0.08083499999999999, 1.251976363636365, 0.8043713333333329, 0.12630999999999995, 0.03520999999999997, 0.31779, 0.2959350000000001, 0.03652999999999999, 0.043174999999999936, 0.04728999999999999, 0.048489999999999964, 0.03383, 0.03641999999999998, 0.03261000000000002, 0.10305499999999994],
			"K=27": [0.03074499999999994, 0.022279999999999946, 0.02565750000000004, 0.027017499999999993, 0.029224999999999956, 0.04813249999999997, 0.02831499999999995, 0.06744249999999996, 0.03275749999999993, 0.02883249999999996, 0.28863000000000005, 0.18815500000000016, 0.37109818181818094, 0.16912500000000005, 0.10120000000000007, 1.121137272727273, 0.08473500000000002, 0.032129999999999985, 0.3265, 0.02468499999999999, 0.022884999999999985, 0.04464666666666663, 0.03017499999999997, 0.03135999999999996, 0.030534999999999965, 0.13441999999999996, 0.47673909090908906, 0.21635000000000004, 0.07884000000000005, 1.2564390909090892, 1.033108999999998, 0.12476000000000004, 0.03330999999999999, 0.31497, 0.2944700000000005, 0.03321999999999998, 0.03955499999999999, 0.043199999999999975, 0.04344666666666664, 0.032824999999999986, 0.03870999999999995, 0.029854999999999975, 0.23404999999999995]
		},
		"D=8192": {
			"K=5": [0.036084999999999964, 0.026369999999999984, 0.0294074999999999, 0.030607499999999916, 0.04196749999999998, 0.031244999999999933, 0.028815000000000018, 0.33655249999999953, 0.03916999999999992, 0.03292749999999996, 0.30471999999999994, 0.19835500000000017, 0.2252150000000001, 0.16124499999999997, 0.10664000000000007, 0.25342333333333344, 0.09123999999999999, 0.07815499999999996, 2.1028000000000016, 0.06650999999999994, 0.026374999999999954, 0.07729, 0.06170000000000008, 0.07826000000000001, 0.08909500000000001, 0.07394500000000007, 0.21035000000000004, 0.21466499999999997, 0.07912000000000004, 0.3499533333333332, 0.2776216666666663, 0.12099500000000012, 0.100115, 2.1271500000000008, 1.9592500000000015, 0.09330500000000003, 0.04772999999999995, 0.06924999999999998, 0.06283000000000004, 0.07158999999999999, 0.08913000000000006, 0.03421999999999999, 0.11603]
		},
		"D=4096": {
			"K=5": [0.029079999999999946, 0.02154999999999997, 0.02480750000000004, 0.025545000000000054, 0.03787499999999993, 0.02929499999999994, 0.026759999999999992, 0.17969500000000024, 0.03429000000000001, 0.028227499999999975, 0.31327, 0.20760000000000006, 0.21226500000000023, 0.17335000000000003, 0.10995499999999998, 0.2556500000000001, 0.119165, 0.05299499999999999, 1.1538749999999998, 0.044644999999999976, 0.023699999999999964, 0.06405666666666669, 0.04577000000000003, 0.05217999999999999, 0.05682500000000003, 0.06538250000000001, 0.2003000000000002, 0.2125, 0.07429999999999998, 0.34435166666666644, 0.26913333333333306, 0.11852000000000007, 0.07200999999999987, 1.0410850000000014, 1.011570000000001, 0.06353500000000002, 0.04436499999999996, 0.05684500000000003, 0.05205333333333335, 0.05092499999999993, 0.058220000000000036, 0.032444999999999995, 0.06968499999999994]
		},
		"D=2048": {
			"K=5": [0.031969999999999936, 0.024684999999999947, 0.027992500000000038, 0.027675000000000057, 0.043487500000000054, 0.02836999999999996, 0.029615000000000027, 0.1056975000000003, 0.04342500000000004, 0.029514999999999958, 0.27840499999999985, 0.20401500000000009, 0.2220825000000002, 0.1581350000000001, 0.11226000000000015, 0.2537816666666668, 0.0862400000000001, 0.03915999999999998, 0.6808000000000001, 0.03275000000000003, 0.022319999999999965, 0.05047333333333323, 0.03581999999999997, 0.039509999999999976, 0.04042, 0.0684475000000001, 0.21441666666666695, 0.21120999999999998, 0.08330500000000005, 0.3660550000000003, 0.2888399999999995, 0.12315000000000008, 0.068545, 0.6564799999999995, 0.5712250000000002, 0.04519999999999994, 0.03896500000000005, 0.04796500000000001, 0.04509333333333329, 0.03637499999999999, 0.04344000000000001, 0.028335, 0.07592499999999998]
		},
		"D=512": {
			"K=5": [0.030414999999999952, 0.02292999999999997, 0.026000000000000058, 0.026527500000000058, 0.03480000000000003, 0.028112499999999988, 0.025405000000000073, 0.04678749999999998, 0.031127500000000037, 0.029847500000000013, 0.24406499999999995, 0.1977699999999999, 0.15535250000000017, 0.16237999999999997, 0.10082000000000008, 0.24399333333333403, 0.09618000000000004, 0.026375000000000006, 0.21611499999999995, 0.020949999999999958, 0.022109999999999953, 0.04349666666666674, 0.028354999999999984, 0.029449999999999976, 0.025604999999999992, 0.06521500000000001, 0.19792000000000018, 0.20854499999999984, 0.081815, 0.3434599999999994, 0.27258166666666717, 0.12275499999999996, 0.05383499999999999, 0.18035999999999977, 0.177625, 0.03157500000000001, 0.036365, 0.039905000000000024, 0.03983666666666667, 0.028274999999999984, 0.03315499999999999, 0.027319999999999997, 0.07878500000000002]
		},
		"D=256": {
			"K=5": [0.03147499999999995, 0.024769999999999945, 0.027827500000000095, 0.02825500000000007, 0.03468250000000004, 0.029492499999999987, 0.02666500000000005, 0.04163999999999998, 0.032067500000000033, 0.03158750000000006, 0.23915999999999996, 0.18744999999999987, 0.17409750000000007, 0.15864999999999996, 0.10068499999999998, 0.23401333333333382, 0.08314000000000009, 0.02513999999999997, 0.15499500000000002, 0.02156499999999996, 0.021094999999999964, 0.04053333333333335, 0.02753499999999996, 0.02700499999999996, 0.023134999999999954, 0.06813999999999992, 0.19813000000000025, 0.2108649999999998, 0.07655, 0.3391449999999996, 0.2634133333333341, 0.11996500000000003, 0.05291999999999998, 0.11849999999999997, 0.12133, 0.035195, 0.03931500000000001, 0.04193499999999999, 0.04208000000000001, 0.03000999999999996, 0.035725, 0.028419999999999983, 0.057969999999999994]
		},
		"D=128": {
			"K=5": [0.03181999999999993, 0.02464999999999996, 0.02708500000000007, 0.03598250000000004, 0.02739500000000004, 0.02847999999999997, 0.03335749999999998, 0.03579999999999999, 0.0321325, 0.03212250000000004, 0.15784499999999993, 0.18460499999999994, 0.17364500000000016, 0.152345, 0.11708499999999997, 0.2319416666666668, 0.08366500000000009, 0.024929999999999963, 0.11662500000000002, 0.02134999999999996, 0.021104999999999978, 0.03884499999999999, 0.028564999999999962, 0.02885499999999995, 0.024819999999999964, 0.07363499999999998, 0.1963600000000001, 0.20991500000000013, 0.07214, 0.33906833333333336, 0.26301166666666737, 0.1217999999999999, 0.04127, 0.08126500000000003, 0.09058500000000008, 0.033874999999999995, 0.04024, 0.04164499999999997, 0.043873333333333334, 0.02911999999999995, 0.034989999999999986, 0.030049999999999976, 0.06932]
		}
	},
	"B=2000": {
		"D=1024": {
			"K=5": [0.030099999999999932, 0.023209999999999984, 0.025372500000000034, 0.026037500000000036, 0.03503250000000005, 0.02717249999999998, 0.02572250000000003, 0.06482249999999988, 0.030617500000000023, 0.02773250000000003, 0.23625999999999994, 0.34317, 0.21669749999999982, 0.278755, 0.17875999999999997, 0.42091666666666766, 0.14643000000000003, 0.03472499999999997, 0.5730350000000001, 0.030940000000000037, 0.021724999999999973, 0.05522333333333333, 0.035410000000000025, 0.039490000000000046, 0.040490000000000005, 0.09490250000000014, 0.30825, 0.3927949999999997, 0.11458000000000004, 0.6297416666666656, 0.4314716666666673, 0.212435, 0.056095, 0.5481900000000002, 0.5321399999999994, 0.04157999999999998, 0.03878500000000003, 0.05049999999999996, 0.04929000000000001, 0.03488999999999996, 0.04117499999999997, 0.02788499999999999, 0.06918999999999999]
		} 
	},
	"B=3000": {
		"D=1024": {
			"K=5": [0.029229999999999944, 0.021909999999999957, 0.02533000000000007, 0.025232500000000005, 0.03299500000000002, 0.025884999999999984, 0.02463500000000003, 0.07135749999999998, 0.06633999999999983, 0.027217500000000058, 0.6630300000000005, 0.5026599999999999, 0.28159250000000013, 0.4094150000000005, 0.25683999999999985, 0.5966066666666663, 0.2082349999999999, 0.04381000000000003, 0.8128149999999996, 0.03650000000000002, 0.021974999999999963, 0.05506666666666662, 0.037324999999999976, 0.04279999999999995, 0.046365000000000024, 0.11767250000000005, 0.43319666666666656, 0.5811149999999997, 0.08003000000000002, 0.921844999999998, 0.6187866666666666, 0.3009849999999998, 0.04193499999999999, 0.8231149999999997, 0.7728049999999996, 0.04907500000000005, 0.09119499999999985, 0.04867999999999999, 0.04574000000000007, 0.039705, 0.048245, 0.028089999999999976, 0.16270500000000002]
		} 
	},
	"B=4000": {
		"D=1024": {
			"K=5": [0.02953499999999995, 0.06056500000000002, 0.02671000000000006, 0.034392500000000055, 0.028387500000000107, 0.02746499999999999, 0.026335000000000008, 0.06573249999999985, 0.03073750000000002, 0.027337500000000074, 0.7599849999999999, 0.6650600000000004, 0.30975000000000036, 0.5373050000000004, 0.35114500000000004, 0.7886466666666666, 0.2730949999999999, 0.04723, 1.126725, 0.04109499999999995, 0.022649999999999962, 0.05846666666666667, 0.07085000000000002, 0.04871499999999997, 0.05348500000000001, 0.15583250000000037, 0.5194933333333331, 0.7965700000000002, 0.09600000000000009, 3.0263466666666585, 0.8074933333333325, 0.3943750000000001, 0.047589999999999986, 1.0111449999999989, 1.0002900000000003, 0.05602000000000005, 0.039910000000000015, 0.05337500000000004, 0.0497066666666667, 0.04524999999999997, 0.055520000000000035, 0.028149999999999994, 0.13000999999999993]
		} 
	},
	"B=5000": {
		"D=1024": {
			"K=5": [0.029909999999999933, 0.022999999999999955, 0.026272500000000046, 0.03473000000000018, 0.027655000000000082, 0.028064999999999996, 0.026960000000000067, 0.06659499999999997, 0.030405000000000015, 0.035427500000000035, 0.44496500000000005, 0.8387999999999997, 0.3576550000000001, 0.6648900000000008, 0.41400499999999996, 0.9666866666666641, 0.3342649999999998, 0.05418000000000005, 1.259545, 0.04673000000000001, 0.03798499999999992, 0.05983000000000005, 0.04385499999999995, 0.05320499999999991, 0.062355, 0.17612500000000003, 0.6270233333333325, 0.9644700000000005, 0.11121749999999996, 3.7643666666666613, 1.0074533333333313, 0.48948500000000045, 0.052840000000000005, 1.331525000000001, 1.2399499999999994, 0.06438000000000002, 0.040390000000000016, 0.05425500000000003, 0.052393333333333354, 0.04984999999999996, 0.06393999999999997, 0.027934999999999984, 0.08461000000000002]
		} 
	},
	"B=6000": {
		"D=1024": {
			"K=5": \
			# [0.029809999999999937, 0.022014999999999976, 0.02495500000000003, 0.03801250000000012, 0.026905000000000068, 0.02588749999999997, 0.026012500000000036, 0.06427999999999996, 0.031152500000000014, 0.03525750000000003, 0.9453100000000002, 0.99047, 0.39697000000000043, 0.7932350000000002, 0.494315, 1.1390883333333288, 0.40095500000000056, 0.05954000000000001, 1.4972849999999998, 0.05027000000000003, 0.039259999999999934, 0.06572000000000006, 0.048904999999999955, 0.05849000000000005, 0.06839999999999999, 0.20550750000000007, 0.7576766666666653, 1.162250000000001, 0.1257125, 4.516176666666672, 1.1969466666666613, 0.5817600000000005, 0.057885000000000006, 1.5487949999999993, 1.4809600000000005, 0.07129499999999997, 0.03920500000000002, 0.05862000000000001, 0.05546666666666676, 0.05534999999999997, 0.07131000000000004, 0.02834, 0.19506499999999996]
			[0.029219999999999944, 0.023234999999999954, 0.039737500000000196, 0.03650750000000019, 0.02780000000000005, 0.028217499999999993, 0.026435000000000056, 0.06611499999999994, 0.030650000000000007, 0.03433500000000001, 1.1423950000000007, 0.9914050000000009, 0.3894425000000003, 0.8153550000000003, 0.49273000000000006, 1.1352116666666618, 0.4011350000000001, 0.059295, 1.4941700000000013, 0.05177000000000005, 0.022174999999999962, 0.06315000000000004, 0.04724499999999999, 0.05704000000000004, 0.06743500000000002, 0.20375750000000006, 0.7534499999999993, 1.1768600000000005, 0.12413000000000002, 4.514076666666667, 1.1922433333333289, 0.582265, 0.054389999999999994, 1.5459950000000005, 1.4779299999999995, 0.07080499999999991, 0.03826500000000001, 0.054034999999999986, 0.05415666666666668, 0.055189999999999975, 0.06988500000000004, 0.027759999999999993, 0.09684000000000002]
		} 
	},
	"B=7000": {
		"D=1024": {
			"K=5": [0.029564999999999956, 0.02145499999999996, 0.024797500000000024, 0.025042500000000047, 0.026065000000000053, 0.03566249999999999, 0.025070000000000005, 0.06477250000000001, 0.031795000000000025, 0.02674500000000004, 1.5549000000000006, 1.163185, 0.4283500000000002, 0.9206950000000006, 0.5729549999999999, 1.324921666666663, 0.46836500000000036, 0.06986999999999995, 1.8070650000000006, 0.06413999999999992, 0.021864999999999964, 0.06647499999999999, 0.056375000000000064, 0.06466000000000001, 0.07601000000000008, 0.24163000000000015, 0.8673566666666657, 1.3874249999999997, 0.13791999999999993, 5.247586666666674, 1.3812733333333287, 0.6751900000000006, 0.057255000000000014, 1.7922849999999997, 1.719309999999999, 0.07910499999999997, 0.039615000000000025, 0.06014, 0.06508000000000003, 0.060539999999999976, 0.07737499999999997, 0.02767999999999998, 0.14840500000000006]
		} 
	},
	"B=8000": {
		"D=1024": {
			"K=5": [0.028644999999999955, 0.023109999999999953, 0.025977500000000056, 0.026825000000000068, 0.02737250000000009, 0.03465, 0.026717500000000043, 0.06541749999999996, 0.030882499999999993, 0.027995000000000075, 0.5594850000000003, 1.326335000000001, 0.46997000000000033, 1.052489999999999, 0.6546800000000005, 1.5081616666666613, 0.5309850000000007, 0.07123500000000008, 2.2108150000000024, 0.061360000000000116, 0.022199999999999952, 0.09455999999999996, 0.055814999999999976, 0.06938000000000011, 0.083965, 0.26929999999999976, 0.9855133333333328, 1.5941049999999999, 0.1551674999999999, 5.9879766666666745, 1.5719566666666605, 0.7730150000000003, 0.06263999999999999, 1.9912949999999998, 1.9562149999999996, 0.08574999999999998, 0.04023500000000002, 0.06101999999999997, 0.06833000000000004, 0.06585000000000008, 0.08516499999999992, 0.028314999999999993, 0.24055000000000024]
		} 
	},
	"B=9000": {
		"D=1024": {
			"K=5": [0.03222499999999993, 0.023064999999999967, 0.026707500000000058, 0.027367500000000065, 0.028315000000000073, 0.03683499999999998, 0.03830750000000019, 0.06548499999999997, 0.03175500000000002, 0.028512500000000038, 2.0942649999999996, 1.5069150000000007, 0.5063550000000004, 1.1828200000000004, 0.7367000000000005, 1.7023833333333256, 0.5941700000000005, 0.09591500000000013, 2.274470000000001, 0.068385, 0.024909999999999953, 0.08855500000000002, 0.06320500000000001, 0.07681500000000002, 0.0933699999999999, 0.29871999999999954, 1.1087633333333329, 1.8085899999999993, 0.1701525, 6.73430333333334, 1.7689649999999957, 0.8646149999999997, 0.06634499999999997, 2.2791399999999995, 2.2035449999999996, 0.09386000000000001, 0.042409999999999996, 0.06892499999999996, 0.06669666666666671, 0.072575, 0.0927349999999999, 0.02827499999999998, 0.05020000000000005]
			# [0.012224999999999986, 0.009129999999999975, 0.010869999999999982, 0.011152499999999978, 0.011779999999999975, 0.01207499999999994, 0.010574999999999987, 0.09376000000000012, 0.012219999999999962, 0.01125749999999996, 0.6299800000000005, 3.3474749999999984, 1.0041650000000006, 2.3933350000000004, 1.5719900000000004, 3.4022116666666746, 1.2002950000000003, 0.11609999999999991, 3.0957399999999966, 0.10620499999999997, 0.01410999999999995, 0.071925, 0.08367500000000011, 0.10889999999999991, 0.15361999999999992, 0.5910399999999997, 4.15832333333333, 4.4151700000000025, 0.33770000000000056, 4.179420000000002, 3.269463333333341, 2.0828399999999982, 0.07505000000000009, 2.98649, 2.883185, 0.15466499999999994, 0.02311999999999998, 0.06761500000000005, 0.10577999999999997, 0.10498999999999988, 0.1547, 0.012004999999999967, 0.01344999999999998]
		} 
	},
	"B=10000": {
		"D=1024": {
			"K=5": [0.03251499999999994, 0.024489999999999967, 0.026967500000000068, 0.02653250000000007, 0.02873000000000003, 0.03786249999999999, 0.027087500000000053, 0.06549749999999992, 0.03181000000000004, 0.02736250000000001, 0.6601699999999999, 1.6915799999999992, 0.5924699999999999, 1.3152100000000007, 0.8205500000000003, 1.8981283333333283, 0.683955000000001, 0.10175999999999988, 2.5172749999999993, 0.07279, 0.028739999999999953, 0.10580000000000006, 0.06828500000000001, 0.08355500000000005, 0.09900999999999995, 0.32875749999999987, 1.2355399999999988, 2.0184550000000008, 0.1874200000000002, 7.51029666666667, 1.9665666666666652, 0.9658600000000003, 0.07048500000000005, 2.5899499999999995, 2.4467750000000015, 0.10297999999999993, 0.045879999999999976, 0.07644000000000001, 0.07006666666666678, 0.07735000000000006, 0.10107499999999997, 0.03098999999999999, 0.08209500000000013]
		}
	}
}

NAMELIST_16 = ['Adam/mul', 'Adam/mul_1', 'Adam/update_conv_layer1/conv2d/bias/ApplyAdam', 'Adam/update_conv_layer1/conv2d/bias/ArithmeticOptimizer/ReorderCastLikeAndValuePreserving_float_Cast', 'Adam/update_conv_layer1/conv2d/bias/ArithmeticOptimizer/ReorderCastLikeAndValuePreserving_float_Cast_1', 'Adam/update_conv_layer1/conv2d/kernel/ApplyAdam', 'Adam/update_conv_layer1/conv2d/kernel/ArithmeticOptimizer/ReorderCastLikeAndValuePreserving_float_Cast', 'Adam/update_conv_layer1/conv2d/kernel/ArithmeticOptimizer/ReorderCastLikeAndValuePreserving_float_Cast_1', 'Adam/update_conv_layer2/conv2d/bias/ApplyAdam', 'Adam/update_conv_layer2/conv2d/bias/Cast', 'Adam/update_conv_layer2/conv2d/bias/Cast_1', 'Adam/update_conv_layer2/conv2d/kernel/ApplyAdam', 'Adam/update_conv_layer2/conv2d/kernel/Cast', 'Adam/update_conv_layer2/conv2d/kernel/Cast_1', 'Adam/update_dense/bias/ApplyAdam', 'Adam/update_dense/bias/Cast', 'Adam/update_dense/bias/Cast_1', 'Adam/update_dense/kernel/ApplyAdam', 'Adam/update_dense/kernel/Cast', 'Adam/update_dense/kernel/Cast_1', 'Adam/update_dense_1/bias/ApplyAdam', 'Adam/update_dense_1/bias/Cast', 'Adam/update_dense_1/bias/Cast_1', 'Adam/update_dense_1/kernel/ApplyAdam', 'Adam/update_dense_1/kernel/Cast', 'Adam/update_dense_1/kernel/Cast_1', 'ArithmeticOptimizer/ReorderCastLikeAndValuePreserving_float_Cast_1', 'Cast', 'Cast_2', 'Cast_3', 'Cast_4', 'conv_layer1/ArithmeticOptimizer/ReorderCastLikeAndValuePreserving_float_Cast', 'conv_layer1/Cast_1', 'conv_layer1/conv2d/BiasAdd', 'conv_layer1/conv2d/Conv2D', 'conv_layer1/conv2d/Relu', 'conv_layer2/Cast', 'conv_layer2/Cast_1', 'conv_layer2/conv2d/BiasAdd', 'conv_layer2/conv2d/Conv2D', 'conv_layer2/conv2d/Relu', 'dense/BiasAdd', 'dense/MatMul', 'dense/Relu', 'dense_1/BiasAdd', 'dense_1/MatMul', 'dropout/dropout/Cast', 'dropout/dropout/mul', 'dropout/dropout/mul_1', 'gradients/Cast_1_grad/ArithmeticOptimizer/ArithmeticOptimizer/ReorderCastLikeAndValuePreserving_float_ReorderCastLikeAndValuePreserving_float_Cast', 'gradients/Cast_2_grad/ArithmeticOptimizer/ArithmeticOptimizer/ReorderCastLikeAndValuePreserving_float_ReorderCastLikeAndValuePreserving_float_Cast', 'gradients/Cast_3_grad/Cast', 'gradients/Cast_4_grad/ArithmeticOptimizer/ArithmeticOptimizer/ReorderCastLikeAndValuePreserving_float_ReorderCastLikeAndValuePreserving_float_Cast', 'gradients/conv_layer1/Cast_1_grad/Cast', 'gradients/conv_layer1/conv2d/BiasAdd_grad/BiasAddGrad', 'gradients/conv_layer1/conv2d/Conv2D_grad/Conv2DBackpropFilter', 'gradients/conv_layer1/conv2d/Relu_grad/ReluGrad', 'gradients/conv_layer2/Cast_1_grad/Cast', 'gradients/conv_layer2/Cast_grad/Cast', 'gradients/conv_layer2/conv2d/BiasAdd_grad/BiasAddGrad', 'gradients/conv_layer2/conv2d/Conv2D_grad/Conv2DBackpropFilter', 'gradients/conv_layer2/conv2d/Conv2D_grad/Conv2DBackpropInput', 'gradients/conv_layer2/conv2d/Relu_grad/ReluGrad', 'gradients/dense/BiasAdd_grad/BiasAddGrad', 'gradients/dense/MatMul_grad/MatMul', 'gradients/dense/MatMul_grad/MatMul_1', 'gradients/dense/Relu_grad/ReluGrad', 'gradients/dense_1/BiasAdd_grad/BiasAddGrad', 'gradients/dense_1/MatMul_grad/MatMul', 'gradients/dense_1/MatMul_grad/MatMul_1', 'gradients/dropout/dropout/mul_grad/Mul', 'gradients/softmax_cross_entropy_loss/xentropy_grad/mul', 'softmax_cross_entropy_loss/Cast']
DATA_16 = {
	"B=100": {
		"D=1024":{
			"K=5": [0.04002000000000001, 0.07005499999999996, 0.03406000000000001, 0.040929999999999966, 0.05753499999999998, 0.037985, 0.033339999999999974, 0.041194999999999975, 0.03737499999999998, 0.03259999999999999, 0.03135499999999999, 0.03880499999999999, 0.03144999999999998, 0.038189999999999974, 0.03519249999999996, 0.03385499999999996, 0.036950000000000004, 0.0537075, 0.0479, 0.05099000000000002, 0.049812499999999996, 0.03120999999999999, 0.07407999999999998, 0.03844999999999999, 0.04371999999999999, 0.08703499999999995, 0.03952999999999998, 0.12553, 0.02935499999999997, 0.064645, 0.02818999999999997, 0.107205, 0.052125000000000005, 0.04874999999999998, 0.15472, 0.03987499999999999, 0.033694999999999996, 0.040109999999999965, 0.03744999999999998, 0.09071666666666676, 0.029229999999999964, 0.033839999999999974, 0.07698666666666658, 0.027919999999999976, 0.02790499999999997, 0.05308333333333335, 0.03346000000000001, 0.03299999999999999, 0.03066499999999999, 0.04400499999999998, 0.03249499999999996, 0.04696999999999999, 0.03106499999999998, 0.040684999999999985, 0.047549999999999974, 0.0701100000000001, 0.039934999999999984, 0.04280499999999998, 0.033170000000000005, 0.047564999999999996, 0.08229166666666667, 0.09064500000000032, 0.04031999999999998, 0.04233500000000001, 0.062400000000000094, 0.07573500000000004, 0.036019999999999996, 0.04886000000000001, 0.05533499999999993, 0.04921499999999999, 0.038095, 0.04231499999999997, 0.12293499999999995]
		}
	},
	"B=200": {
		"D=1024":{
			"K=5": [0.038984999999999964, 0.027449999999999992, 0.027037500000000093, 0.05539999999999998, 0.08423999999999995, 0.047884999999999935, 0.03624499999999999, 0.04034499999999999, 0.03405749999999998, 0.02562999999999998, 0.02886499999999998, 0.03701999999999998, 0.03072499999999998, 0.027059999999999987, 0.03359249999999994, 0.026744999999999984, 0.025899999999999982, 0.051800000000000006, 0.03713999999999997, 0.04293, 0.038709999999999994, 0.050829999999999986, 0.052875, 0.036099999999999986, 0.03598999999999999, 0.038389999999999966, 0.03694499999999996, 0.1412950000000001, 0.027669999999999986, 0.08138500000000005, 0.028904999999999955, 0.138925, 0.05487999999999996, 0.07180500000000001, 0.1818533333333334, 0.04356499999999995, 0.033254999999999965, 0.036964999999999984, 0.04203999999999996, 0.09508166666666681, 0.028325000000000003, 0.03069000000000001, 0.0807466666666667, 0.02589499999999996, 0.04348500000000002, 0.05506333333333332, 0.03394, 0.03853499999999998, 0.029569999999999957, 0.044445, 0.032154999999999975, 0.03032999999999998, 0.028294999999999976, 0.0472, 0.04846500000000002, 0.09559000000000022, 0.04668999999999998, 0.049104999999999996, 0.06070999999999996, 0.05578000000000001, 0.08773666666666659, 0.0923500000000002, 0.046280000000000016, 0.041489999999999985, 0.06802500000000004, 0.05847000000000003, 0.034364999999999986, 0.04323499999999998, 0.05021499999999998, 0.0483566666666666, 0.03668499999999998, 0.04083999999999997, 0.05970999999999994]
		}
	},
	"B=300": {
		"D=1024":{
			"K=5": [0.03992, 0.030424999999999983, 0.02729750000000007, 0.09541500000000001, 0.044575, 0.04136500000000006, 0.08659999999999995, 0.05988499999999999, 0.031207500000000058, 0.03122499999999999, 0.03160499999999997, 0.039032499999999984, 0.02794499999999997, 0.03496999999999999, 0.028877500000000115, 0.027649999999999973, 0.03714999999999999, 0.052902500000000005, 0.02924499999999998, 0.042974999999999985, 0.03940999999999998, 0.03036999999999999, 0.051715, 0.03909249999999999, 0.02975499999999998, 0.04589999999999996, 0.03837499999999999, 0.13428500000000002, 0.027979999999999946, 0.03287999999999995, 0.02918999999999997, 0.13083999999999998, 0.06661500000000002, 0.08719000000000005, 0.15884000000000006, 0.05352999999999998, 0.03547999999999996, 0.043379999999999974, 0.050125, 0.10678666666666672, 0.03488000000000001, 0.031234999999999995, 0.08771666666666678, 0.026874999999999982, 0.04113000000000001, 0.05280999999999999, 0.033685000000000014, 0.032055, 0.02900499999999999, 0.04709999999999998, 0.035445, 0.03174999999999999, 0.029859999999999966, 0.05698499999999998, 0.04369250000000009, 0.10836166666666677, 0.054825, 0.05037499999999994, 0.0619, 0.05570499999999996, 0.09078499999999975, 0.10418428571428578, 0.05172499999999999, 0.041030000000000004, 0.06831499999999999, 0.12465999999999999, 0.03618499999999999, 0.043945000000000005, 0.05581999999999998, 0.051823333333333325, 0.03846, 0.04189999999999998, 0.11815999999999999]
		}
	},
	"B=400": {
		"D=1024":{
			"K=5": [0.03857999999999998, 0.028174999999999978, 0.026225000000000057, 0.06186500000000002, 0.049395000000000015, 0.035217500000000124, 0.04192999999999999, 0.03896999999999998, 0.02790500000000009, 0.02948499999999998, 0.03215999999999997, 0.038669999999999975, 0.03194999999999999, 0.028259999999999983, 0.03335499999999996, 0.040494999999999955, 0.027259999999999996, 0.05237249999999997, 0.04515999999999999, 0.030129999999999976, 0.03904749999999994, 0.03778499999999997, 0.026529999999999984, 0.03648999999999997, 0.05625, 0.029274999999999957, 0.03469499999999998, 0.21738999999999994, 0.028569999999999957, 0.03114499999999999, 0.029874999999999985, 0.09085000000000003, 0.074395, 0.12106999999999993, 0.17345, 0.05984499999999996, 0.04403999999999994, 0.04687999999999999, 0.05918499999999994, 0.10756166666666679, 0.040144999999999965, 0.028494999999999972, 0.16526999999999997, 0.027984999999999968, 0.029409999999999978, 0.06475666666666666, 0.05873499999999998, 0.03338000000000001, 0.060190000000000035, 0.042499999999999975, 0.03171499999999999, 0.031334999999999995, 0.03717499999999999, 0.06511000000000002, 0.04223750000000017, 0.11884333333333347, 0.06219999999999997, 0.05397499999999998, 0.03594000000000004, 0.05612999999999997, 0.09778499999999976, 0.1040242857142859, 0.05478999999999993, 0.040200000000000014, 0.08059499999999996, 0.06441999999999991, 0.033810000000000014, 0.042589999999999975, 0.05194999999999997, 0.051539999999999954, 0.03685000000000001, 0.03357499999999999, 0.057799999999999976]
		}
	},
	"B=500": {
		"D=1024":{
			"K=5": [0.035629999999999946, 0.02530999999999997, 0.026060000000000073, 0.04881500000000002, 0.08466500000000002, 0.031747500000000116, 0.030270000000000005, 0.05811499999999997, 0.02787500000000003, 0.026904999999999988, 0.029629999999999983, 0.03443000000000003, 0.028884999999999973, 0.028324999999999986, 0.028122500000000064, 0.026719999999999952, 0.02963999999999999, 0.05469250000000003, 0.034789999999999995, 0.03874499999999998, 0.039082500000000006, 0.031809999999999984, 0.038389999999999945, 0.03606499999999997, 0.029629999999999983, 0.03481999999999995, 0.04842499999999996, 0.130605, 0.027039999999999984, 0.027489999999999966, 0.03119999999999997, 0.14323, 0.09011499999999989, 0.11464999999999995, 0.2359933333333334, 0.06079500000000006, 0.04075999999999995, 0.050414999999999995, 0.06676999999999994, 0.11733666666666681, 0.03928500000000003, 0.027749999999999986, 0.09562666666666657, 0.025999999999999978, 0.04322000000000001, 0.05257000000000004, 0.030944999999999973, 0.03204499999999998, 0.02923499999999997, 0.04237500000000001, 0.03151999999999997, 0.02926499999999997, 0.02802499999999997, 0.07759000000000002, 0.04328500000000009, 0.15061166666666637, 0.07266, 0.05917499999999998, 0.06939499999999994, 0.06275500000000003, 0.1182816666666667, 0.12443571428571447, 0.05694000000000002, 0.041544999999999964, 0.08112000000000007, 0.18811999999999995, 0.03509000000000001, 0.054979999999999966, 0.052584999999999986, 0.05098999999999998, 0.03700499999999997, 0.03933499999999997, 0.10554499999999996]
		}
	},
	"B=600": {
		"D=1024":{
			"K=5": [0.03233499999999994, 0.026039999999999952, 0.02774500000000009, 0.04034999999999999, 0.07415999999999999, 0.03223000000000007, 0.07623500000000002, 0.04942999999999999, 0.0318650000000001, 0.05296000000000002, 0.029689999999999973, 0.03170000000000009, 0.05731, 0.030034999999999968, 0.03498000000000001, 0.07350499999999999, 0.05245499999999998, 0.0544075, 0.05305499999999999, 0.03896999999999997, 0.04196749999999996, 0.06721, 0.042344999999999994, 0.039235000000000006, 0.057259999999999964, 0.04279499999999997, 0.03532999999999995, 0.21278500000000009, 0.028769999999999966, 0.03255500000000001, 0.03157500000000001, 0.13277000000000005, 0.09258000000000002, 0.12951000000000001, 0.21015999999999987, 0.07489500000000003, 0.042910000000000004, 0.056135000000000046, 0.07364000000000004, 0.12106166666666693, 0.04238499999999998, 0.030245, 0.09721333333333347, 0.02805499999999999, 0.04621500000000005, 0.053306666666666655, 0.03551999999999999, 0.03532, 0.033564999999999984, 0.04634499999999996, 0.033464999999999995, 0.03502, 0.031874999999999966, 0.08760999999999998, 0.04694250000000002, 0.163346666666667, 0.08392500000000007, 0.060930000000000026, 0.07218, 0.06268500000000002, 0.11865999999999993, 0.11998714285714308, 0.06131999999999998, 0.04206999999999999, 0.08911500000000007, 0.07292500000000005, 0.03739000000000001, 0.04643999999999998, 0.05468499999999997, 0.06852333333333331, 0.038965, 0.041299999999999976, 0.08704999999999996]
		}
	},
	"B=700": {
		"D=1024":{
			"K=5": [0.03465999999999994, 0.028084999999999957, 0.026987500000000057, 0.04782999999999998, 0.06221499999999999, 0.031715000000000104, 0.03592499999999997, 0.03659499999999999, 0.028387500000000027, 0.04189999999999996, 0.02955999999999999, 0.0390525000000001, 0.05058999999999998, 0.02916999999999995, 0.02666750000000003, 0.06636500000000002, 0.045109999999999977, 0.05314000000000002, 0.07612999999999998, 0.042009999999999985, 0.040037499999999955, 0.07515999999999995, 0.04485999999999994, 0.039497499999999984, 0.055584999999999996, 0.032779999999999955, 0.03628499999999994, 0.2941500000000001, 0.028014999999999995, 0.030959999999999977, 0.031234999999999968, 0.091085, 0.10293999999999993, 0.14479, 0.18840666666666656, 0.07499500000000003, 0.04620000000000002, 0.064635, 0.09232, 0.14091500000000018, 0.04673000000000001, 0.027519999999999985, 0.1404250000000002, 0.025634999999999963, 0.029169999999999963, 0.05423999999999997, 0.03179999999999996, 0.06829, 0.03564999999999998, 0.04226, 0.03130999999999999, 0.031014999999999973, 0.03973999999999999, 0.09878499999999998, 0.04512000000000008, 0.18027999999999955, 0.09244000000000004, 0.06613499999999999, 0.04320999999999994, 0.05569500000000009, 0.12991000000000014, 0.137797142857143, 0.06454, 0.04138999999999997, 0.08771500000000007, 0.2307199999999999, 0.035199999999999995, 0.045474999999999974, 0.05486999999999998, 0.050289999999999994, 0.03851499999999998, 0.03513999999999998, 0.06966000000000006]
		}
	},
	"B=800": {
		"D=1024":{
			"K=5": [0.030079999999999944, 0.022374999999999954, 0.026045000000000082, 0.06068999999999998, 0.08412999999999998, 0.029835000000000056, 0.11174999999999999, 0.03895499999999997, 0.027207500000000037, 0.026979999999999987, 0.027719999999999984, 0.03694250000000006, 0.031244999999999995, 0.04151, 0.026755000000000043, 0.03899999999999995, 0.03963999999999998, 0.05185500000000002, 0.028279999999999972, 0.03828499999999999, 0.0381225, 0.03704999999999997, 0.039020000000000006, 0.03429499999999998, 0.027759999999999965, 0.056229999999999995, 0.035764999999999984, 0.42872500000000024, 0.023294999999999982, 0.02650499999999997, 0.02755999999999997, 0.15776999999999997, 0.117705, 0.15820000000000006, 0.23192000000000032, 0.078245, 0.04912499999999997, 0.06568500000000001, 0.08956499999999998, 0.13694166666666688, 0.04718000000000001, 0.026244999999999952, 0.12206000000000004, 0.021439999999999952, 0.028189999999999958, 0.0643666666666667, 0.02888999999999998, 0.045194999999999964, 0.02966499999999994, 0.04445000000000003, 0.029789999999999973, 0.02889999999999999, 0.03360499999999999, 0.10648499999999998, 0.048000000000000084, 0.19872999999999963, 0.10027999999999991, 0.06782500000000002, 0.045189999999999966, 0.04278750000000004, 0.14151666666666682, 0.13652285714285706, 0.06541500000000003, 0.03989999999999996, 0.10811999999999994, 0.0791300000000001, 0.03390499999999999, 0.04224499999999997, 0.048344999999999964, 0.04752, 0.03668999999999999, 0.031595, 0.046659999999999986]
		}
	},
	"B=900": {
		"D=1024":{
			"K=5": [0.03311499999999994, 0.02556499999999994, 0.026762500000000054, 0.046354999999999986, 0.06920000000000001, 0.030527500000000075, 0.034760000000000006, 0.03613499999999997, 0.028037500000000045, 0.04198500000000001, 0.03571499999999999, 0.04041750000000016, 0.033254999999999986, 0.08772500000000003, 0.026500000000000083, 0.04019999999999999, 0.03774499999999999, 0.05073499999999995, 0.03722499999999999, 0.04244499999999997, 0.04255750000000002, 0.03271499999999998, 0.03545999999999996, 0.038919999999999975, 0.03979999999999995, 0.042404999999999964, 0.03786999999999996, 0.18642000000000006, 0.024894999999999987, 0.03050999999999997, 0.029744999999999973, 0.14408, 0.12654000000000004, 0.17111499999999996, 0.2528333333333336, 0.08746999999999992, 0.05438500000000001, 0.07165000000000005, 0.09638499999999992, 0.15467166666666682, 0.05239, 0.027469999999999974, 0.14302500000000004, 0.02288499999999996, 0.029214999999999988, 0.05592, 0.03133499999999996, 0.049085000000000004, 0.03365499999999996, 0.04294, 0.030994999999999984, 0.031184999999999977, 0.037685, 0.11944999999999989, 0.05074500000000006, 0.21905833333333338, 0.11141500000000004, 0.077575, 0.048160000000000064, 0.04865250000000005, 0.14841000000000035, 0.15827428571428606, 0.07288499999999996, 0.041294999999999984, 0.1083750000000001, 0.2760849999999998, 0.03485499999999999, 0.05357499999999999, 0.05676499999999996, 0.051833333333333335, 0.03950499999999999, 0.03499000000000001, 0.06050499999999997]
		}
	},
	"B=1000": {
		"D=1024": {
			"K=1": [0.03466499999999997, 0.08379000000000003, 0.028027500000000052, 0.06023999999999998, 0.09209000000000002, 0.030525000000000115, 0.03459999999999997, 0.05541500000000003, 0.03226250000000006, 0.02680499999999997, 0.029904999999999973, 0.05028499999999997, 0.049170000000000026, 0.03882999999999997, 0.028920000000000088, 0.026419999999999968, 0.034854999999999976, 0.05229250000000005, 0.025954999999999978, 0.07506, 0.04917249999999994, 0.02721499999999997, 0.04334, 0.04722999999999998, 0.028289999999999968, 0.044660000000000005, 0.03881999999999994, 0.341905, 0.025320000000000006, 0.02599999999999998, 0.08586499999999997, 0.11203000000000002, 0.14160499999999998, 0.19262500000000002, 0.22845000000000004, 0.09278000000000011, 0.05151499999999996, 0.07636500000000002, 0.10583500000000007, 0.13623666666666664, 0.05476000000000008, 0.02723499999999999, 0.13389999999999994, 0.02243999999999998, 0.025104999999999964, 0.05219333333333327, 0.028485, 0.028500000000000015, 0.030704999999999982, 0.05251999999999999, 0.03302499999999999, 0.03191499999999996, 0.031969999999999985, 0.12519000000000013, 0.050860000000000107, 0.15303333333333335, 0.11879999999999998, 0.13316500000000006, 0.05225500000000003, 0.050824999999999995, 0.0939816666666667, 0.10574166666666691, 0.08166000000000001, 0.04761000000000001, 0.12081, 0.09209000000000005, 0.036299999999999985, 0.05094499999999998, 0.06078499999999995, 0.05454666666666667, 0.04304999999999998, 0.03738499999999999, 0.052770000000000004],
			"K=3": [0.03849999999999995, 0.02224999999999996, 0.03757500000000007, 0.09215999999999999, 0.04855000000000005, 0.032050000000000016, 0.043000000000000024, 0.05080499999999998, 0.041780000000000025, 0.03163999999999998, 0.053699999999999984, 0.02950500000000007, 0.031029999999999988, 0.04428999999999996, 0.02782500000000008, 0.055365000000000004, 0.04464499999999998, 0.05135000000000007, 0.029634999999999957, 0.09266, 0.03967249999999996, 0.03028499999999996, 0.03954999999999998, 0.03709499999999996, 0.036059999999999974, 0.032324999999999965, 0.03927999999999994, 0.22707500000000003, 0.023999999999999976, 0.026335, 0.02705999999999996, 0.12860000000000002, 0.13514999999999994, 0.18908499999999992, 0.22815000000000002, 0.09490499999999996, 0.05476499999999996, 0.07706, 0.1125700000000001, 0.10473500000000047, 0.05564500000000006, 0.029744999999999952, 0.13010500000000025, 0.021859999999999956, 0.025434999999999975, 0.04739000000000002, 0.027709999999999967, 0.028679999999999994, 0.03092999999999998, 0.051889999999999964, 0.03191499999999995, 0.03140499999999996, 0.03771500000000002, 0.12821500000000008, 0.05627000000000008, 0.19677166666666696, 0.11666500000000003, 0.08125, 0.04953000000000003, 0.04833749999999989, 0.10949499999999991, 0.20156000000000007, 0.07793999999999998, 0.06819499999999996, 0.1111700000000001, 0.08473999999999995, 0.03496999999999996, 0.04673999999999998, 0.05308999999999995, 0.04676999999999998, 0.040164999999999985, 0.04936500000000002, 0.09315000000000002],
			"K=5": [0.03452999999999994, 0.024814999999999962, 0.02770500000000007, 0.03804999999999999, 0.07934999999999999, 0.03196250000000011, 0.029149999999999978, 0.03518999999999999, 0.027790000000000075, 0.04354999999999998, 0.03510999999999998, 0.038325000000000164, 0.031465, 0.03344499999999999, 0.02915000000000008, 0.04061499999999997, 0.035135, 0.05313250000000002, 0.030254999999999987, 0.03743500000000001, 0.04173749999999996, 0.02715499999999999, 0.03668000000000002, 0.03666249999999998, 0.027484999999999985, 0.037454999999999974, 0.03914499999999994, 0.4543450000000002, 0.034709999999999984, 0.02732499999999998, 0.028564999999999993, 0.10544499999999993, 0.14464500000000002, 0.18385499999999994, 0.2141533333333335, 0.09769499999999993, 0.054659999999999966, 0.07654500000000003, 0.10269500000000002, 0.1366650000000003, 0.054055000000000054, 0.027984999999999954, 0.1346500000000002, 0.021469999999999958, 0.026399999999999976, 0.05303333333333335, 0.029999999999999978, 0.048844999999999895, 0.03223999999999997, 0.054525, 0.03352999999999999, 0.03206, 0.03755500000000001, 0.13016000000000003, 0.05166750000000011, 0.23581000000000032, 0.12097500000000004, 0.08302000000000005, 0.05112499999999999, 0.04717249999999987, 0.15668666666666675, 0.14637714285714293, 0.07877500000000001, 0.042369999999999956, 0.11352500000000008, 0.08901999999999999, 0.035574999999999954, 0.04563499999999997, 0.057259999999999964, 0.04858333333333329, 0.04209999999999994, 0.035795000000000014, 0.06326500000000007],
			"K=7": [0.03249499999999996, 0.02424499999999996, 0.028527500000000074, 0.087195, 0.05632999999999996, 0.028682500000000066, 0.05192999999999997, 0.04221999999999998, 0.02734000000000004, 0.027804999999999948, 0.060389999999999965, 0.029487499999999972, 0.028949999999999972, 0.032689999999999976, 0.027450000000000065, 0.028049999999999985, 0.056694999999999975, 0.05054750000000002, 0.027214999999999975, 0.043054999999999934, 0.03765999999999997, 0.028369999999999954, 0.05046499999999995, 0.035789999999999995, 0.037759999999999946, 0.066505, 0.03918499999999993, 0.26102500000000023, 0.023699999999999995, 0.0245, 0.023684999999999977, 0.1733000000000001, 0.15047500000000005, 0.19787500000000008, 0.2808900000000002, 0.10743000000000003, 0.05260000000000002, 0.07658500000000006, 0.10979000000000003, 0.180353333333333, 0.055765000000000044, 0.02652999999999997, 0.13411999999999993, 0.021604999999999982, 0.02281499999999997, 0.04589333333333324, 0.02681, 0.027670000000000024, 0.028284999999999977, 0.04999000000000001, 0.03102499999999999, 0.03139999999999996, 0.03547999999999999, 0.12924000000000005, 0.05134500000000008, 0.5181837499999989, 0.12020000000000004, 0.08092499999999996, 0.04989999999999996, 0.059027500000000004, 0.26778250000000015, 0.25585857142857105, 0.08144499999999999, 0.040069999999999995, 0.11458999999999998, 0.08669500000000002, 0.03453499999999996, 0.04471000000000001, 0.05279000000000001, 0.05265999999999998, 0.03870499999999997, 0.033429999999999994, 0.05169999999999999],
			"K=9": [0.03423499999999993, 0.02409999999999996, 0.02788750000000008, 0.04353499999999998, 0.086995, 0.02935250000000005, 0.027794999999999986, 0.04670000000000002, 0.02967999999999994, 0.058115000000000014, 0.03685499999999999, 0.032802499999999936, 0.04265999999999996, 0.07219999999999999, 0.028287500000000087, 0.03563499999999997, 0.02764499999999997, 0.052460000000000034, 0.043965, 0.030529999999999988, 0.036602499999999975, 0.051614999999999994, 0.03138499999999999, 0.0349875, 0.058149999999999986, 0.07966999999999995, 0.03958499999999994, 0.4273749999999999, 0.023255000000000005, 0.025085000000000007, 0.02229499999999997, 0.18498499999999993, 0.13969500000000004, 0.18141499999999997, 0.3111866666666667, 0.14083, 0.05035499999999999, 0.07706, 0.10276000000000002, 0.22744999999999996, 0.05455000000000008, 0.028104999999999963, 0.13827500000000015, 0.023044999999999972, 0.02130499999999997, 0.04455333333333338, 0.026864999999999983, 0.027280000000000013, 0.028254999999999968, 0.05221499999999994, 0.03136999999999997, 0.030929999999999937, 0.029629999999999955, 0.128135, 0.056342500000000066, 0.4657972727272705, 0.12108000000000006, 0.08117000000000005, 0.052435, 0.07635499999999998, 0.3636424999999997, 0.3152866666666665, 0.07690000000000005, 0.04142499999999999, 0.1150300000000001, 0.08573499999999999, 0.03503, 0.04209999999999999, 0.04842999999999997, 0.04210000000000001, 0.04012999999999997, 0.030999999999999986, 0.07065500000000008],
			"K=11": [0.03373999999999994, 0.026249999999999964, 0.028717500000000097, 0.05948999999999998, 0.08837499999999997, 0.029765000000000073, 0.06780499999999995, 0.040940000000000004, 0.03049999999999994, 0.027329999999999976, 0.07442999999999998, 0.033107499999999936, 0.028459999999999975, 0.07014999999999996, 0.0397325000000001, 0.031269999999999964, 0.03795999999999997, 0.052002499999999986, 0.02622499999999997, 0.03305999999999996, 0.038855, 0.05032499999999991, 0.03127499999999997, 0.05008249999999996, 0.027994999999999964, 0.04414999999999995, 0.04034499999999997, 0.21667499999999992, 0.02517999999999998, 0.025555000000000005, 0.024964999999999953, 0.13232500000000003, 0.14599000000000006, 0.192865, 0.3984966666666668, 0.10838000000000006, 0.058174999999999956, 0.07987500000000002, 0.105065, 0.34465999999999947, 0.05781000000000004, 0.030234999999999963, 0.14053500000000013, 0.023699999999999964, 0.024624999999999963, 0.04994000000000004, 0.02754999999999999, 0.027945, 0.02943499999999996, 0.04866999999999999, 0.035559999999999974, 0.032399999999999936, 0.03247999999999997, 0.13005000000000005, 0.06120999999999996, 0.4697318181818165, 0.12256000000000004, 0.08089500000000008, 0.053069999999999916, 0.04758749999999992, 0.3291462500000001, 0.31318499999999994, 0.08032500000000002, 0.07539499999999996, 0.15014499999999997, 0.08857499999999999, 0.03681999999999997, 0.04263499999999997, 0.05123999999999993, 0.06026666666666672, 0.040249999999999966, 0.030729999999999976, 0.04064999999999995],
			"K=13": [0.03202999999999996, 0.023279999999999964, 0.028802500000000064, 0.08457499999999996, 0.04489, 0.029635000000000026, 0.039575, 0.028724999999999987, 0.03093499999999995, 0.03315999999999997, 0.08014999999999999, 0.03430999999999992, 0.038999999999999986, 0.024859999999999965, 0.03836750000000006, 0.03213999999999997, 0.02826499999999995, 0.050932499999999964, 0.03613499999999997, 0.04377999999999995, 0.032747500000000034, 0.04081499999999999, 0.09296500000000009, 0.04377250000000003, 0.042555, 0.046165000000000005, 0.04307499999999992, 0.28418000000000004, 0.02322499999999999, 0.037714999999999985, 0.021869999999999976, 0.10753499999999992, 0.13677000000000003, 0.189615, 0.501196666666667, 0.09478499999999994, 0.05245499999999998, 0.08098499999999997, 0.11379000000000004, 0.3526949999999995, 0.06481500000000005, 0.02728499999999999, 0.13729999999999998, 0.02281499999999998, 0.021219999999999958, 0.045179999999999915, 0.026440000000000005, 0.028370000000000017, 0.02752999999999999, 0.050115, 0.031480000000000015, 0.027429999999999958, 0.027609999999999957, 0.12756000000000003, 0.06017250000000013, 0.4776354545454526, 0.12192000000000008, 0.08162500000000002, 0.053254999999999934, 0.04947250000000002, 0.33930250000000006, 0.3304116666666666, 0.07749500000000001, 0.041074999999999945, 0.12114500000000003, 0.09251000000000005, 0.03520500000000002, 0.061200000000000004, 0.04641499999999996, 0.050426666666666765, 0.05254999999999997, 0.027579999999999983, 0.12131500000000002],
			"K=15": [0.03350999999999997, 0.025549999999999944, 0.029702500000000104, 0.07974999999999995, 0.09993, 0.02986500000000004, 0.054994999999999974, 0.05472000000000003, 0.031074999999999985, 0.03156999999999996, 0.04268499999999995, 0.036807499999999924, 0.028739999999999977, 0.026434999999999976, 0.03748750000000006, 0.02901999999999998, 0.026019999999999974, 0.0519725, 0.02805999999999996, 0.031334999999999946, 0.035067500000000036, 0.026599999999999974, 0.03811499999999996, 0.050222500000000024, 0.029039999999999972, 0.044144999999999976, 0.041474999999999936, 0.3310650000000001, 0.02406999999999999, 0.02498999999999999, 0.023634999999999958, 0.11812999999999997, 0.14643000000000003, 0.23042000000000024, 0.6289866666666668, 0.10130000000000004, 0.05730999999999999, 0.07976, 0.11246000000000002, 0.3509233333333333, 0.06642000000000006, 0.029289999999999986, 0.1418, 0.023, 0.02302999999999996, 0.045853333333333274, 0.028205000000000004, 0.027805000000000003, 0.028769999999999973, 0.049890000000000025, 0.033659999999999995, 0.029324999999999976, 0.028539999999999947, 0.12872499999999995, 0.06219500000000013, 0.4830936363636341, 0.12306000000000009, 0.08060500000000005, 0.054194999999999965, 0.046777500000000034, 0.33778499999999945, 0.32828666666666656, 0.07773999999999999, 0.04189999999999995, 0.117075, 0.09018499999999996, 0.035995000000000006, 0.04190999999999998, 0.048189999999999976, 0.05377333333333336, 0.03841999999999998, 0.029054999999999977, 0.05455000000000006],
			"K=17": [0.03184499999999994, 0.02299999999999995, 0.02800750000000006, 0.04963, 0.06665499999999995, 0.027760000000000028, 0.05838500000000003, 0.06089499999999998, 0.031177499999999966, 0.030239999999999993, 0.02812999999999999, 0.03473499999999994, 0.03006499999999996, 0.04179499999999994, 0.038182500000000015, 0.02479499999999999, 0.027749999999999976, 0.05291249999999996, 0.024089999999999986, 0.02511499999999998, 0.033015000000000023, 0.02719999999999998, 0.02652999999999999, 0.03826749999999999, 0.025624999999999988, 0.03309000000000001, 0.03951499999999996, 0.27393999999999996, 0.026379999999999994, 0.026560000000000018, 0.023569999999999963, 0.126195, 0.13856000000000002, 0.21927000000000008, 0.7391966666666666, 0.10140500000000001, 0.05388999999999999, 0.08302, 0.10852500000000004, 0.3365833333333332, 0.05664000000000006, 0.030914999999999974, 0.14864499999999994, 0.030594999999999956, 0.022204999999999964, 0.04748333333333326, 0.028785000000000012, 0.02865000000000002, 0.03007999999999998, 0.04828999999999998, 0.029689999999999994, 0.029909999999999957, 0.028269999999999986, 0.12769000000000005, 0.06168000000000017, 0.471624545454543, 0.12078500000000013, 0.08283000000000003, 0.05407999999999999, 0.048882499999999995, 0.3368137499999999, 0.32379833333333347, 0.07917, 0.03976499999999994, 0.11211000000000007, 0.09238000000000002, 0.03185499999999999, 0.040279999999999955, 0.04457499999999996, 0.05213666666666676, 0.035099999999999985, 0.028424999999999957, 0.07658000000000001],
			"K=19": [0.03123499999999995, 0.021684999999999958, 0.026872500000000032, 0.061984999999999964, 0.06738, 0.026890000000000032, 0.031334999999999995, 0.039554999999999986, 0.04632249999999992, 0.025029999999999962, 0.02888999999999999, 0.03644999999999999, 0.04159999999999996, 0.032004999999999985, 0.029339999999999998, 0.033199999999999986, 0.038324999999999984, 0.05008750000000007, 0.04312499999999998, 0.04882499999999999, 0.03337750000000002, 0.026484999999999977, 0.04111499999999998, 0.029619999999999994, 0.027639999999999984, 0.03875999999999999, 0.038784999999999924, 0.4532300000000001, 0.022760000000000002, 0.023794999999999993, 0.022954999999999965, 0.11660500000000004, 0.1361850000000001, 0.1841549999999999, 0.2616526666666664, 0.09107499999999993, 0.05221999999999999, 0.07577, 0.10062999999999998, 0.3114800000000004, 0.05353000000000006, 0.027454999999999955, 0.1352200000000001, 0.021159999999999957, 0.022074999999999977, 0.04490000000000002, 0.02794999999999997, 0.027644999999999986, 0.027544999999999962, 0.04632999999999999, 0.02794999999999997, 0.028649999999999988, 0.024094999999999967, 0.15190499999999993, 0.054547500000000096, 0.46828999999999765, 0.11977000000000007, 0.082645, 0.05473499999999996, 0.04758249999999993, 0.33765250000000013, 0.32403499999999996, 0.078815, 0.03770499999999998, 0.13195500000000002, 0.08895, 0.03111499999999997, 0.04045500000000001, 0.045474999999999995, 0.039540000000000006, 0.03431999999999999, 0.028049999999999967, 0.06917499999999997],
			"K=21": [0.03176499999999994, 0.024524999999999957, 0.028840000000000105, 0.08502499999999992, 0.1472649999999999, 0.03010750000000008, 0.03368499999999996, 0.05647500000000001, 0.034937499999999885, 0.058315, 0.02701499999999996, 0.03807250000000002, 0.04101499999999998, 0.028759999999999973, 0.043330000000000056, 0.027434999999999956, 0.03421999999999997, 0.05359250000000005, 0.029794999999999974, 0.04264999999999996, 0.044120000000000006, 0.02706999999999998, 0.04377999999999995, 0.03391499999999994, 0.03316999999999998, 0.03925999999999998, 0.0417, 0.4183650000000003, 0.02831999999999995, 0.028669999999999956, 0.027539999999999978, 0.10647999999999998, 0.13630499999999995, 0.18343500000000001, 0.9714466666666663, 0.09361499999999992, 0.05521999999999993, 0.08011500000000002, 0.10312000000000002, 0.7798333333333336, 0.057425000000000004, 0.04121499999999996, 0.14334499999999992, 0.029934999999999982, 0.025854999999999982, 0.049769999999999946, 0.031709999999999974, 0.03260999999999996, 0.033239999999999964, 0.045234999999999984, 0.029704999999999968, 0.03154499999999999, 0.02871000000000001, 0.14374999999999996, 0.057282500000000056, 0.46381636363636214, 0.12275000000000003, 0.08188000000000006, 0.05609999999999998, 0.07440499999999996, 1.2499390909090895, 0.7768553333333356, 0.07700999999999997, 0.039454999999999976, 0.10759499999999995, 0.0906300000000001, 0.031919999999999976, 0.043724999999999986, 0.049135, 0.04455000000000001, 0.03815999999999998, 0.031089999999999965, 0.09485000000000003],
			"K=23": [0.033674999999999955, 0.02494499999999996, 0.02776000000000007, 0.05937999999999999, 0.09374499999999991, 0.029295000000000043, 0.05332000000000004, 0.057620000000000005, 0.031434999999999914, 0.05907499999999998, 0.03376499999999999, 0.03810749999999998, 0.028145000000000003, 0.03888499999999999, 0.02974000000000005, 0.02953999999999996, 0.03905999999999998, 0.05230749999999998, 0.03462999999999999, 0.037469999999999955, 0.035587499999999966, 0.03141999999999999, 0.03514999999999998, 0.03281249999999997, 0.10776999999999987, 0.058929999999999934, 0.04233999999999998, 0.5210349999999998, 0.04243499999999998, 0.027339999999999955, 0.02650999999999999, 0.1787849999999999, 0.137695, 0.18405999999999983, 1.1393833333333343, 0.09508500000000002, 0.051829999999999946, 0.09569000000000001, 0.10362500000000006, 0.7834493333333318, 0.05732000000000002, 0.029164999999999962, 0.13524500000000003, 0.02481, 0.025864999999999975, 0.07461333333333328, 0.03145, 0.03102999999999998, 0.03184499999999997, 0.04450500000000001, 0.029874999999999985, 0.030965000000000006, 0.02806000000000001, 0.12813999999999987, 0.05307500000000008, 0.4582154545454534, 0.12070000000000008, 0.08247500000000006, 0.05536999999999998, 0.047742499999999854, 1.2497463636363637, 0.7761939999999999, 0.077345, 0.038984999999999964, 0.107775, 0.08964500000000009, 0.032944999999999974, 0.0438, 0.05141500000000003, 0.045146666666666745, 0.03670999999999995, 0.03243500000000002, 0.07857500000000002],
			"K=25": [0.03230499999999997, 0.023194999999999952, 0.02842250000000007, 0.04121999999999999, 0.07230500000000002, 0.029132500000000047, 0.029639999999999958, 0.035155, 0.032267499999999866, 0.11376999999999998, 0.029584999999999976, 0.04843499999999991, 0.047809999999999964, 0.034539999999999974, 0.02950750000000004, 0.03566999999999999, 0.048355000000000016, 0.0518175, 0.03443999999999999, 0.1027549999999999, 0.037137499999999976, 0.03532499999999998, 0.04034499999999999, 0.032512499999999965, 0.04853000000000005, 0.05612999999999998, 0.04133999999999999, 0.5702300000000006, 0.030489999999999986, 0.02937499999999997, 0.02510999999999998, 0.11605999999999998, 0.14356, 0.18160999999999988, 0.332601818181818, 0.09233000000000001, 0.05175999999999994, 0.10380500000000004, 0.10267500000000002, 0.7823306666666656, 0.05671, 0.02909499999999998, 0.1344, 0.023129999999999984, 0.02468999999999998, 0.04798666666666664, 0.032795, 0.02904999999999997, 0.03163499999999995, 0.044624999999999984, 0.030704999999999986, 0.031445, 0.028669999999999994, 0.14346000000000003, 0.0532200000000001, 0.4579999999999982, 0.12134000000000017, 0.08095000000000006, 0.056255, 0.0468774999999999, 1.2473263636363663, 0.778080666666666, 0.076385, 0.039089999999999965, 0.10887499999999997, 0.09177000000000002, 0.031854999999999974, 0.043725000000000014, 0.05004500000000005, 0.043453333333333365, 0.037079999999999995, 0.03041499999999999, 0.071125],
			"K=27": [0.031144999999999933, 0.023289999999999953, 0.026497500000000097, 0.035449999999999975, 0.07607999999999998, 0.02748250000000006, 0.03446999999999998, 0.035745, 0.02857499999999994, 0.03189499999999998, 0.02904999999999998, 0.04040749999999997, 0.03203500000000001, 0.042444999999999976, 0.03751249999999995, 0.031915, 0.027739999999999983, 0.058967500000000034, 0.024124999999999997, 0.09832999999999995, 0.04377249999999989, 0.03060499999999999, 0.03181, 0.04967500000000002, 0.025375, 0.03406499999999997, 0.041120000000000004, 0.3376750000000001, 0.025899999999999965, 0.026164999999999976, 0.03055, 0.14076500000000003, 0.13881499999999997, 0.17926999999999982, 0.3585809090909088, 0.09293000000000001, 0.05333499999999997, 0.07866000000000006, 0.10019499999999998, 1.119967272727273, 0.057780000000000005, 0.03008499999999996, 0.13658, 0.02371999999999998, 0.023834999999999988, 0.04746666666666666, 0.028984999999999973, 0.028584999999999982, 0.03089999999999999, 0.044465000000000005, 0.04459999999999994, 0.030729999999999993, 0.027569999999999997, 0.127335, 0.05057750000000007, 0.4564754545454525, 0.11944000000000007, 0.08177500000000001, 0.05995999999999999, 0.046014999999999896, 1.244785454545451, 1.0234660000000002, 0.07560499999999998, 0.05491999999999991, 0.10690999999999994, 0.08871000000000002, 0.03216499999999996, 0.04343000000000004, 0.06793500000000001, 0.04266333333333332, 0.03654499999999998, 0.03000499999999999, 0.08899499999999996]
		},
		"D=8192": {
			"K=5": [0.03686499999999997, 0.02637999999999999, 0.031794999999999934, 0.03597499999999997, 0.11621500000000001, 0.036172499999999906, 0.053779999999999994, 0.044384999999999994, 0.03157499999999994, 0.05502999999999998, 0.03247499999999999, 0.031589999999999965, 0.04058499999999996, 0.03758999999999996, 0.02586250000000007, 0.04530999999999999, 0.031349999999999996, 0.18504499999999985, 0.03180499999999998, 0.030294999999999992, 0.03434250000000007, 0.04628499999999998, 0.030259999999999957, 0.0350375, 0.04409499999999999, 0.03915999999999999, 0.05965000000000001, 0.337845, 0.05976499999999997, 0.058355000000000004, 0.024234999999999958, 0.13276500000000002, 0.14161499999999994, 0.20050500000000004, 0.2549233333333332, 0.09934000000000001, 0.05451999999999997, 0.08642999999999999, 0.11035500000000001, 0.14908333333333354, 0.08543, 0.07417500000000002, 0.45784500000000056, 0.04527500000000001, 0.02378499999999998, 0.07979666666666657, 0.07138499999999996, 0.0702700000000001, 0.11395999999999998, 0.04130999999999999, 0.05874000000000002, 0.06166000000000002, 0.03188999999999995, 0.12795999999999996, 0.05689250000000008, 0.24121833333333267, 0.12338499999999998, 0.07653499999999999, 0.05390499999999996, 0.07337499999999997, 0.1614800000000004, 0.1493814285714286, 0.074425, 0.06946499999999999, 0.40159999999999985, 0.336605, 0.05890000000000001, 0.043300000000000026, 0.06589500000000002, 0.059389999999999846, 0.09158000000000001, 0.03224, 0.064889999919039,1]
		},
		"D=4096": {
			"K=5": [0.035169999999999944, 0.02550499999999995, 0.029685000000000086, 0.14280000000000004, 0.08484000000000001, 0.036887500000000156, 0.041519999999999994, 0.04318500000000002, 0.05324249999999999, 0.04397000000000001, 0.05390000000000002, 0.03857749999999999, 0.05058999999999998, 0.058359999999999974, 0.02833750000000008, 0.05307999999999998, 0.04169999999999998, 0.11063499999999989, 0.07373999999999996, 0.06018499999999997, 0.04132499999999999, 0.06893499999999997, 0.042974999999999985, 0.03898, 0.063485, 0.045815, 0.06126999999999999, 0.3031449999999998, 0.042579999999999965, 0.04247999999999999, 0.027334999999999946, 0.11002999999999988, 0.18798, 0.20597, 0.2612199999999999, 0.1155599999999999, 0.06656999999999996, 0.08725000000000004, 0.10815499999999996, 0.15747666666666696, 0.08776999999999999, 0.049960000000000025, 0.27968499999999974, 0.03438499999999995, 0.027089999999999947, 0.07376666666666659, 0.04136000000000001, 0.04890499999999998, 0.08740000000000006, 0.04862000000000002, 0.045959999999999966, 0.04734499999999999, 0.03867499999999998, 0.12996000000000005, 0.05841000000000005, 0.24015166666666715, 0.12161500000000006, 0.08210500000000004, 0.05978499999999998, 0.07816, 0.17401333333333363, 0.16402857142857152, 0.07814500000000012, 0.05839999999999999, 0.23208500000000007, 0.19135500000000005, 0.04893999999999995, 0.050689999999999964, 0.06561499999999999, 0.05687333333333337, 0.06534999999999999, 0.035945, 0.07167499999999999]
		},
		"D=2048": {
			"K=5": [0.031744999999999926, 0.02443999999999995, 0.026557500000000032, 0.04404499999999997, 0.08047499999999998, 0.030472500000000083, 0.03338999999999998, 0.04345000000000001, 0.027427500000000063, 0.05728999999999998, 0.03174499999999997, 0.03619500000000018, 0.028429999999999987, 0.034499999999999975, 0.026110000000000067, 0.031784999999999994, 0.029599999999999977, 0.06998499999999992, 0.030759999999999996, 0.030624999999999968, 0.03871749999999997, 0.028179999999999983, 0.03675499999999996, 0.03648999999999998, 0.03645999999999998, 0.048844999999999965, 0.03946999999999995, 0.28802999999999984, 0.02889999999999997, 0.04799999999999994, 0.02615999999999997, 0.12194, 0.14152999999999993, 0.20526000000000014, 0.2564833333333335, 0.10105499999999994, 0.05053499999999999, 0.07601999999999996, 0.10257499999999997, 0.1450083333333336, 0.05515500000000006, 0.03135499999999995, 0.15148999999999993, 0.022134999999999995, 0.026684999999999976, 0.05895666666666662, 0.03259000000000001, 0.03765500000000003, 0.03970999999999998, 0.04583000000000001, 0.03802999999999995, 0.03663999999999997, 0.036254999999999996, 0.12532000000000007, 0.05011000000000012, 0.24222833333333366, 0.11925, 0.08099, 0.05009999999999998, 0.05224999999999996, 0.15941166666666653, 0.1657657142857144, 0.07706999999999999, 0.043884999999999987, 0.15551999999999994, 0.12275999999999998, 0.040364999999999956, 0.04609499999999997, 0.05522499999999996, 0.04886666666666669, 0.050094999999999945, 0.03356999999999998, 0.055270000000000014]
		},
		"D=512": {
			"K=5": [0.030254999999999966, 0.02379999999999996, 0.029287500000000098, 0.04337499999999996, 0.07664, 0.032817500000000124, 0.03351499999999997, 0.04415500000000003, 0.028465000000000094, 0.02701999999999995, 0.034734999999999974, 0.03056250000000002, 0.028664999999999972, 0.03915999999999998, 0.03408000000000003, 0.02827, 0.04311499999999998, 0.04376499999999996, 0.04495499999999996, 0.027854999999999974, 0.0403875, 0.02998999999999999, 0.029904999999999963, 0.037040000000000003, 0.028459999999999992, 0.04000999999999998, 0.04101499999999999, 0.30084999999999995, 0.02395999999999999, 0.02652999999999996, 0.027799999999999957, 0.11321999999999993, 0.13784000000000002, 0.19415500000000013, 0.24291333333333345, 0.10019500000000002, 0.055625000000000015, 0.07742500000000004, 0.10874, 0.14488666666666683, 0.05529000000000004, 0.026324999999999994, 0.09044666666666666, 0.02225499999999996, 0.039924999999999995, 0.04709666666666664, 0.030199999999999987, 0.030924999999999984, 0.027614999999999976, 0.05026499999999995, 0.03234999999999997, 0.03083999999999999, 0.030274999999999972, 0.1273650000000001, 0.053107500000000085, 0.2624933333333332, 0.11896500000000003, 0.07520000000000002, 0.07892999999999997, 0.07280999999999996, 0.1651450000000001, 0.1506142857142855, 0.07053, 0.04233999999999999, 0.08268500000000004, 0.08031999999999996, 0.033705000000000006, 0.04944499999999997, 0.055169999999999976, 0.048133333333333264, 0.03645999999999999, 0.040669999999999984, 0.04153999999999998]
		},
		"D=256": {
			"K=5": [0.03081499999999993, 0.023319999999999966, 0.027327500000000095, 0.04859999999999997, 0.06917499999999997, 0.030947500000000083, 0.031624999999999986, 0.03460499999999999, 0.027015000000000094, 0.029989999999999982, 0.028700000000000007, 0.04053250000000012, 0.039604999999999974, 0.06284000000000001, 0.05899249999999998, 0.03524499999999997, 0.027964999999999976, 0.03913750000000004, 0.04714, 0.028679999999999976, 0.03914249999999998, 0.042605000000000004, 0.030734999999999988, 0.03778749999999996, 0.05298500000000002, 0.04017, 0.03784499999999994, 0.25880499999999995, 0.02287999999999995, 0.042049999999999955, 0.026629999999999966, 0.11261999999999998, 0.13980999999999993, 0.18179999999999982, 0.2275333333333334, 0.09201499999999996, 0.05152999999999996, 0.07659499999999998, 0.10232000000000001, 0.14550166666666692, 0.05434500000000005, 0.025664999999999983, 0.07203000000000019, 0.02173499999999997, 0.026534999999999965, 0.05114666666666662, 0.02777999999999995, 0.02861999999999998, 0.025954999999999964, 0.05360999999999998, 0.030919999999999958, 0.028764999999999978, 0.02978499999999997, 0.12572000000000005, 0.052557500000000076, 0.2364683333333339, 0.11938500000000009, 0.07392000000000003, 0.05044499999999997, 0.0702, 0.15624333333333337, 0.14396142857142866, 0.07064500000000004, 0.04454333333333334, 0.06906999999999995, 0.07146000000000001, 0.034879999999999994, 0.04685499999999999, 0.055374999999999945, 0.048959999999999976, 0.037655000000000015, 0.04040999999999997, 0.08064499999999997]
		},
		"D=128": {
			"K=5": [0.03231999999999997, 0.026144999999999943, 0.029957500000000123, 0.03817499999999998, 0.06303999999999996, 0.02769000000000001, 0.04906499999999997, 0.049179999999999974, 0.04120750000000022, 0.04340499999999998, 0.03740499999999996, 0.029922500000000074, 0.03175499999999997, 0.03422499999999997, 0.03409500000000001, 0.029399999999999964, 0.045639999999999924, 0.036492500000000025, 0.048249999999999967, 0.03109999999999997, 0.04776999999999999, 0.055024999999999984, 0.030839999999999944, 0.03697249999999998, 0.06734, 0.04696499999999995, 0.039269999999999944, 0.27589500000000006, 0.024969999999999964, 0.030164999999999963, 0.028784999999999967, 0.17606499999999994, 0.13571499999999995, 0.18365999999999988, 0.22566333333333338, 0.09134499999999993, 0.05065999999999996, 0.07723499999999998, 0.10314000000000009, 0.14481666666666684, 0.054545000000000066, 0.026379999999999963, 0.09396666666666648, 0.021849999999999967, 0.027144999999999975, 0.053305000000000054, 0.03187499999999996, 0.03505499999999999, 0.045825000000000005, 0.04841499999999999, 0.03208499999999999, 0.030774999999999983, 0.03721999999999998, 0.1353250000000001, 0.05212500000000011, 0.23603333333333373, 0.11950500000000006, 0.07561000000000008, 0.050660000000000024, 0.04254499999999997, 0.15592, 0.14991142857142872, 0.07167499999999997, 0.04443, 0.060355, 0.05788500000000005, 0.034514999999999976, 0.04964999999999998, 0.05385999999999996, 0.056210000000000024, 0.03614, 0.06122, 0.09744999999999995]
		}
	},
	"B=2000": {
		"D=1024": {
			"K=5": [0.03044499999999993, 0.023364999999999966, 0.028790000000000104, 0.037335, 0.1381449999999999, 0.030105000000000076, 0.035409999999999976, 0.09472499999999993, 0.028137500000000048, 0.03007499999999995, 0.03473000000000001, 0.03637250000000014, 0.02459499999999997, 0.030064999999999974, 0.03014750000000014, 0.023204999999999965, 0.02712999999999999, 0.05217749999999998, 0.025394999999999966, 0.027945000000000008, 0.03346750000000008, 0.025474999999999956, 0.03111499999999997, 0.031280000000000065, 0.03018999999999996, 0.04945499999999999, 0.05094499999999998, 0.4785799999999998, 0.02935499999999999, 0.03147999999999993, 0.02324499999999996, 0.13674999999999998, 0.255795, 0.3347199999999997, 0.3091733333333336, 0.1588050000000001, 0.07680000000000006, 0.12985500000000003, 0.17628499999999991, 0.19161333333333327, 0.08676000000000003, 0.03468500000000001, 0.15426999999999982, 0.023104999999999983, 0.02122499999999998, 0.05305666666666659, 0.03173000000000001, 0.05143500000000006, 0.03904500000000002, 0.06329999999999997, 0.03827499999999997, 0.035734999999999954, 0.02776499999999997, 0.22365, 0.0656025000000001, 0.41857666666666704, 0.21200499999999983, 0.1282600000000001, 0.077385, 0.058325000000000043, 0.2546400000000003, 0.22721142857142834, 0.12170500000000009, 0.04656499999999997, 0.14901, 0.12691499999999997, 0.03777, 0.04580999999999999, 0.04734, 0.043520000000000045, 0.04643500000000001, 0.028144999999999965, 0.04821999999999999]
		} 
	},
	"B=3000": {
		"D=1024": {
			"K=5": [0.03390499999999994, 0.025374999999999946, 0.029057500000000073, 0.08224999999999995, 0.11938999999999993, 0.03861500000000013, 0.08514499999999993, 0.06906999999999995, 0.031785000000000105, 0.04781499999999998, 0.09259000000000006, 0.03984000000000015, 0.03255999999999994, 0.041289999999999945, 0.02911000000000011, 0.08573499999999998, 0.05014999999999998, 0.04959249999999993, 0.029369999999999938, 0.03724999999999998, 0.03296000000000011, 0.02970999999999995, 0.035199999999999974, 0.04056000000000006, 0.04510999999999995, 0.04590999999999996, 0.06494999999999998, 0.65451, 0.036769999999999976, 0.055194999999999925, 0.02781999999999994, 0.16113500000000006, 0.37720500000000023, 0.48433000000000037, 0.4121700000000002, 0.22737500000000005, 0.10106499999999988, 0.18939000000000003, 0.2535200000000001, 0.24920833333333325, 0.1308050000000001, 0.04477999999999996, 0.21963000000000002, 0.026834999999999973, 0.023349999999999965, 0.05302999999999995, 0.038610000000000005, 0.044959999999999986, 0.04858500000000001, 0.07011499999999996, 0.04004499999999997, 0.03695999999999993, 0.032444999999999904, 0.3258449999999998, 0.08219499999999998, 0.6100516666666669, 0.3052299999999997, 0.17746999999999993, 0.10829000000000008, 0.06457499999999987, 0.36725833333333424, 0.321338571428571, 0.16512499999999986, 0.058325000000000016, 0.17072500000000018, 0.1713149999999999, 0.04150499999999993, 0.05110999999999997, 0.05371999999999993, 0.046560000000000046, 0.051609999999999996, 0.030624999999999996, 0.07712500000000004]
		} 
	},
	"B=4000": {
		"D=1024": {
			"K=5": [0.03332499999999998, 0.02488499999999995, 0.030477500000000105, 0.09346499999999996, 0.1927300000000001, 0.032307500000000114, 0.06545500000000003, 0.1208749999999999, 0.03566000000000001, 0.027014999999999963, 0.03068499999999998, 0.04372250000000009, 0.0387, 0.03603499999999998, 0.02951000000000004, 0.028424999999999985, 0.030049999999999986, 0.05117249999999998, 0.05851500000000007, 0.03978999999999998, 0.033327500000000024, 0.02964999999999997, 0.035264999999999984, 0.03023499999999999, 0.04029499999999997, 0.07671, 0.08045500000000004, 0.31259000000000003, 0.041524999999999965, 0.04079, 0.02531999999999996, 0.17154499999999998, 0.5072099999999997, 0.6417449999999997, 0.5071766666666669, 0.29755499999999996, 0.12533000000000008, 0.24831499999999976, 0.33986000000000005, 0.30621, 0.16540999999999997, 0.049560000000000055, 0.2538749999999999, 0.03330499999999996, 0.023384999999999972, 0.0629999999999998, 0.04238000000000005, 0.06701999999999989, 0.05805000000000004, 0.08435000000000002, 0.04331, 0.04127999999999995, 0.03042999999999996, 0.42596500000000026, 0.0950700000000001, 0.8160316666666645, 0.40028999999999987, 0.22684999999999986, 0.13485499999999997, 0.07362999999999999, 0.46773000000000015, 0.40488428571428514, 0.21096, 0.06729000000000009, 0.2150449999999999, 0.21484499999999992, 0.04512999999999996, 0.05744499999999999, 0.059305000000000024, 0.05098999999999992, 0.05841499999999998, 0.031154999999999978, 0.05784500000000005]
		} 
	},
	"B=5000": {
		"D=1024": {
			"K=5": [0.03288499999999996, 0.024284999999999973, 0.031162500000000107, 0.07385000000000005, 0.06924499999999999, 0.02731500000000008, 0.036329999999999966, 0.03313, 0.029390000000000055, 0.06664999999999989, 0.02763999999999995, 0.03077000000000004, 0.027589999999999934, 0.06609, 0.02831500000000007, 0.038234999999999915, 0.03341499999999992, 0.04928749999999997, 0.03195999999999995, 0.03627999999999995, 0.032937499999999995, 0.030624999999999934, 0.042309999999999966, 0.029247500000000013, 0.11096000000000023, 0.041714999999999954, 0.08918000000000001, 0.992835, 0.06020999999999997, 0.04482999999999995, 0.024259999999999962, 0.2085250000000002, 0.64134, 0.7745800000000002, 0.5743166666666669, 0.35743499999999984, 0.14893999999999993, 0.3059899999999999, 0.40444500000000005, 0.34049833333333285, 0.18606999999999985, 0.05466500000000006, 0.2751300000000001, 0.03464499999999997, 0.02433499999999996, 0.07983666666666663, 0.04527499999999995, 0.056004999999999944, 0.06277500000000005, 0.097035, 0.04627999999999997, 0.04534999999999998, 0.024229999999999963, 0.5286900000000001, 0.107585, 0.9983749999999996, 0.4938200000000002, 0.2924749999999999, 0.16119499999999992, 0.08152999999999996, 0.5694433333333344, 0.471902857142856, 0.25762500000000005, 0.07446500000000003, 0.25651000000000024, 0.24557500000000002, 0.04770499999999998, 0.05865, 0.07806999999999993, 0.05091333333333312, 0.0649, 0.033159999999999946, 0.08191000000000001]
		} 
	},
	"B=6000": {
		"D=1024": {
			"K=5": \
			# [0.033144999999999925, 0.022204999999999968, 0.029545000000000095, 0.07049499999999997, 0.07871500000000001, 0.025237500000000003, 0.03333499999999997, 0.14434499999999986, 0.028327500000000057, 0.025024999999999964, 0.15235000000000012, 0.027462500000000088, 0.024179999999999965, 0.02684499999999996, 0.026955000000000097, 0.024214999999999997, 0.09354000000000008, 0.04844749999999994, 0.028434999999999957, 0.028364999999999984, 0.033015000000000086, 0.030749999999999958, 0.08324000000000004, 0.02906500000000007, 0.024809999999999954, 0.03615999999999999, 0.10191999999999998, 0.9348750000000002, 0.049594999999999986, 0.04692999999999998, 0.022334999999999976, 0.17484999999999992, 0.7816400000000001, 0.9090450000000004, 0.6761633333333337, 0.4277650000000002, 0.17302500000000007, 0.37020500000000006, 0.4706950000000002, 0.38561166666666624, 0.2296899999999999, 0.060824999999999935, 0.3438950000000002, 0.04032999999999992, 0.02317499999999996, 0.07529666666666675, 0.04762999999999996, 0.059125000000000025, 0.069005, 0.1086700000000001, 0.04902999999999997, 0.04916499999999996, 0.025269999999999963, 0.6298400000000002, 0.1224699999999999, 1.162788333333332, 0.5885099999999999, 0.3395, 0.18732000000000013, 0.08859999999999982, 0.6544649999999991, 0.5391028571428562, 0.3059849999999996, 0.08076000000000004, 0.29969500000000004, 0.27357000000000037, 0.05196000000000003, 0.06147000000000008, 0.08697500000000007, 0.05140666666666663, 0.07329000000000005, 0.03261999999999999, 0.1142199999999999]
			[0.03292999999999998, 0.02378499999999995, 0.03038000000000009, 0.03867499999999999, 0.070355, 0.027380000000000092, 0.06177999999999999, 0.033445, 0.028415000000000048, 0.02676999999999995, 0.029024999999999978, 0.029880000000000028, 0.20202999999999974, 0.03638499999999995, 0.027407500000000046, 0.023339999999999965, 0.037539999999999976, 0.04975249999999997, 0.02386999999999996, 0.03232999999999999, 0.034282500000000035, 0.02411999999999997, 0.04563499999999997, 0.028467500000000014, 0.026779999999999967, 0.18059999999999993, 0.10085499999999997, 1.1206799999999997, 0.058559999999999945, 0.04718499999999996, 0.022829999999999954, 0.19192999999999993, 0.785115, 0.9435850000000002, 0.6779200000000004, 0.4269800000000003, 0.1875099999999999, 0.36938999999999994, 0.48748500000000017, 0.4043616666666672, 0.22005499999999992, 0.070505, 0.38268500000000005, 0.046024999999999976, 0.026304999999999946, 0.06075666666666665, 0.04890000000000001, 0.05978000000000004, 0.06846499999999997, 0.10786499999999999, 0.05073499999999997, 0.05036999999999997, 0.02611999999999995, 0.6322550000000003, 0.12122499999999993, 1.2080733333333333, 0.5877700000000001, 0.3387299999999998, 0.18681, 0.08845749999999995, 0.6957550000000006, 0.5705814285714272, 0.3026299999999999, 0.08056500000000001, 0.35227499999999956, 0.2904250000000001, 0.052385000000000036, 0.06416999999999996, 0.08298, 0.05388999999999983, 0.07190499999999997, 0.03367499999999995, 0.08399000000000015]
		} 
	},
	"B=7000": {
		"D=1024": {
			"K=5": [0.02964499999999995, 0.03845499999999993, 0.028047500000000104, 0.09759000000000002, 0.062345, 0.031002500000000065, 0.03440499999999998, 0.03542500000000001, 0.029152500000000105, 0.14327500000000012, 0.04407499999999998, 0.03018500000000008, 0.034884999999999965, 0.05873999999999997, 0.02821000000000009, 0.051769999999999955, 0.042919999999999944, 0.050452499999999914, 0.0334849999999999, 0.03404499999999997, 0.03246000000000007, 0.026379999999999963, 0.09559999999999988, 0.029187500000000078, 0.02840999999999994, 0.04759999999999999, 0.11745500000000002, 0.8526400000000003, 0.05784499999999999, 0.051745, 0.022999999999999958, 0.198275, 0.92715, 1.1030800000000005, 0.7150099999999998, 0.49805500000000047, 0.20033500000000007, 0.43709500000000007, 0.5458600000000005, 0.43044833333333304, 0.253845, 0.06948000000000001, 0.3370300000000001, 0.04624500000000001, 0.02246499999999996, 0.07026999999999993, 0.06757500000000011, 0.06515499999999995, 0.07541000000000006, 0.12476500000000003, 0.054139999999999945, 0.05346999999999999, 0.029769999999999942, 0.7398199999999998, 0.13585999999999968, 1.3579899999999985, 0.6832449999999999, 0.3761549999999999, 0.23180499999999996, 0.09723999999999995, 0.7585683333333327, 0.6224299999999987, 0.35013000000000005, 0.0997250000000001, 0.3187400000000003, 0.3025850000000001, 0.054550000000000036, 0.06684499999999999, 0.066505, 0.059833333333333225, 0.08066000000000004, 0.028469999999999985, 0.10494500000000002]
		} 
	},
	"B=8000": {
		"D=1024": {
			"K=5": [0.032149999999999956, 0.03984499999999996, 0.028767500000000102, 0.03907499999999998, 0.19163500000000003, 0.03256000000000014, 0.14283000000000004, 0.17047499999999993, 0.029332500000000063, 0.027079999999999983, 0.025314999999999966, 0.029165000000000028, 0.02549499999999998, 0.04108499999999994, 0.027972500000000088, 0.03577999999999997, 0.032519999999999966, 0.049479999999999975, 0.028669999999999963, 0.128805, 0.033995000000000004, 0.04364999999999994, 0.058045, 0.02911750000000002, 0.028409999999999963, 0.159815, 0.12471999999999996, 1.6107, 0.05927499999999999, 0.056540000000000055, 0.02426499999999996, 0.17661500000000008, 1.0961600000000002, 1.2741799999999999, 0.942396666666667, 0.5790049999999998, 0.22273500000000002, 0.5004750000000001, 0.6450150000000002, 0.5159666666666659, 0.2917149999999998, 0.07426000000000003, 0.44528499999999993, 0.04506, 0.023929999999999955, 0.08954500000000012, 0.07458499999999993, 0.07193500000000012, 0.08472499999999998, 0.13646000000000014, 0.059350000000000035, 0.05830499999999998, 0.03181999999999995, 0.8520600000000002, 0.1504699999999998, 1.613026666666669, 0.7767050000000002, 0.4243650000000001, 0.26677, 0.10773000000000006, 0.9094116666666645, 0.7529071428571413, 0.3986949999999997, 0.11459999999999994, 0.379035, 0.37040000000000023, 0.059690000000000056, 0.097335, 0.07426500000000011, 0.06259333333333314, 0.08885499999999992, 0.029564999999999987, 0.11045499999999986]
		} 
	},
	"B=9000": {
		"D=1024": {
			"K=5": [0.030544999999999933, 0.02454499999999996, 0.030192500000000094, 0.06836499999999991, 0.09908499999999988, 0.026942500000000046, 0.028974999999999994, 0.03494999999999998, 0.028227500000000058, 0.02599999999999996, 0.030844999999999977, 0.028995000000000073, 0.11194000000000004, 0.02827499999999996, 0.027425000000000102, 0.029379999999999976, 0.02721499999999996, 0.049227499999999924, 0.025674999999999983, 0.09192000000000002, 0.03154250000000006, 0.026159999999999982, 0.02741499999999998, 0.029162500000000088, 0.026264999999999986, 0.033204999999999985, 0.13528000000000012, 2.1694199999999997, 0.061985000000000075, 0.062469999999999984, 0.030724999999999943, 0.15650499999999995, 1.2185350000000001, 1.3664350000000005, 0.8532966666666674, 0.6290599999999997, 0.27737999999999985, 0.5665650000000002, 0.6813350000000001, 0.518958333333332, 0.3177899999999994, 0.07590500000000006, 0.41669000000000017, 0.058944999999999984, 0.02478499999999996, 0.07101666666666677, 0.06166499999999999, 0.072655, 0.09156000000000003, 0.15141500000000008, 0.061679999999999964, 0.062430000000000006, 0.024714999999999963, 0.9773700000000002, 0.1646975000000003, 1.7300949999999977, 0.8750049999999996, 0.48841500000000015, 0.27538499999999977, 0.11026499999999999, 0.9673066666666634, 0.7747385714285688, 0.44408500000000006, 0.09873499999999995, 0.4006849999999998, 0.38054499999999974, 0.06118000000000001, 0.07083499999999997, 0.09151999999999998, 0.0581299999999999, 0.09553999999999993, 0.03207499999999999, 0.11670499999999998]
			# [0.012729999999999988, 0.009809999999999975, 0.011382499999999983, 0.014854999999999969, 0.021419999999999984, 0.01228249999999995, 0.012574999999999979, 0.028085000000000006, 0.011767499999999985, 0.01273999999999998, 0.013819999999999966, 0.013862499999999934, 0.017824999999999976, 0.012594999999999974, 0.011864999999999959, 0.01250999999999998, 0.01242499999999999, 0.09983000000000011, 0.012614999999999987, 0.012904999999999977, 0.01299249999999997, 0.013294999999999979, 0.012674999999999976, 0.013512499999999929, 0.015799999999999984, 0.017089999999999973, 0.2502649999999998, 0.43204000000000015, 0.090365, 0.08350000000000002, 0.00995499999999997, 0.10318999999999999, 3.1435300000000024, 2.842825000000001, 0.8940675, 1.5965599999999989, 0.5420550000000002, 1.4652349999999996, 1.4309699999999987, 4.95645250000001, 0.7302499999999995, 0.10431499999999988, 2.8239799999999993, 0.057524999999999944, 0.01015999999999997, 0.07135000000000002, 0.08222000000000007, 0.10762, 0.153905, 0.3063699999999998, 0.08501499999999992, 0.08877500000000003, 0.009949999999999974, 2.987704999999999, 2.1249799999999985, 2.276496666666669, 2.4698749999999983, 1.293665, 0.6652850000000005, 1.0466949999999997, 4.158805000000004, 3.205981666666675, 1.1946649999999996, 0.10241999999999996, 2.5939350000000005, 2.826440000000001, 0.10376499999999997, 0.021116666666666672, 0.06220499999999997, 0.09518999999999994, 0.15630499999999986, 0.012279999999999982, 0.16731500000000016]
		} 
	},
	"B=10000": {
		"D=1024": {
			"K=5": [0.030449999999999935, 0.021794999999999967, 0.02788500000000009, 0.19484499999999982, 0.11773999999999997, 0.02552500000000001, 0.13531000000000004, 0.031159999999999983, 0.026710000000000074, 0.02932999999999995, 0.026069999999999968, 0.02657250000000006, 0.12269000000000013, 0.030669999999999947, 0.030230000000000166, 0.044464999999999956, 0.030659999999999958, 0.04705999999999998, 0.03307999999999996, 0.028439999999999972, 0.030900000000000052, 0.04059999999999997, 0.03964499999999996, 0.026927500000000024, 0.07411499999999992, 0.044084999999999985, 0.14839499999999994, 2.2995500000000004, 0.06391999999999999, 0.06359499999999997, 0.02445999999999996, 0.21041, 1.3956950000000001, 1.529775, 0.9465866666666665, 0.7005250000000005, 0.2720849999999999, 0.6389400000000001, 0.7555200000000003, 0.5825666666666651, 0.3545149999999998, 0.08138999999999998, 0.4293999999999995, 0.046485000000000026, 0.02415499999999994, 0.07047666666666676, 0.06268999999999997, 0.07854500000000007, 0.09906499999999996, 0.16316500000000006, 0.06312000000000002, 0.06511, 0.02300499999999996, 1.1038800000000002, 0.17674500000000015, 1.905678333333334, 0.9718749999999998, 0.5495000000000004, 0.3044799999999998, 0.11804500000000027, 1.0718016666666628, 0.8439942857142845, 0.4892550000000002, 0.10357000000000008, 0.43827499999999986, 0.4107199999999997, 0.06528000000000005, 0.07042500000000002, 0.08311999999999996, 0.058699999999999995, 0.10086999999999995, 0.031360000000000006, 0.08331499999999999]
		} 
	}
}

DEFAULT_BATCH_SIZE_STR="B=1000"
DEFAULT_DENSE_SIZE_STR="D=1024"
DEFAULT_KENREL_SIZE_STR="K=5"
DEFAULT_BATCH_SIZE=int(DEFAULT_BATCH_SIZE_STR.split("=")[1])
DEFAULT_DENSE_SIZE=int(DEFAULT_DENSE_SIZE_STR.split("=")[1])
DEFAULT_KENREL_SIZE=int(DEFAULT_KENREL_SIZE_STR.split("=")[1])
BATCH_LIST_STR = [
			"B=100", "B=200", "B=300", "B=400", "B=500", "B=600", "B=700", "B=800", "B=900", 
			"B=1000", "B=2000", "B=3000", "B=4000", "B=5000", "B=6000", "B=7000", "B=8000", "B=9000",
			"B=10000"]
DENSE_LIST_STR = ["D=128", "D=256", "D=512", "D=1024", "D=2048", "D=4096", "D=8192"]
KENREL_LIST_STR = ["K=1", "K=3", "K=5", "K=7", "K=9", "K=11", "K=13", "K=15", "K=17", "K=19", "K=21", "K=23", "K=25", "K=27"]
BATCH_LIST_VALUE = [int(e.split("=")[1]) for e in BATCH_LIST_STR]
DENSE_LIST_VALUE = [int(e.split("=")[1]) for e in DENSE_LIST_STR]
KENREL_LIST_VALUE = [int(e.split("=")[1]) for e in KENREL_LIST_STR]

def time2batch_size(B, a1, a2):
	return a1 * B + a2

def vary_batch_size(index, fp16=False):
	avg = []
	DATA_ = DATA_16 if fp16 else DATA_32
	for e in BATCH_LIST_STR:
		avg.append(DATA_[e][DEFAULT_DENSE_SIZE_STR][DEFAULT_KENREL_SIZE_STR][index])
	return avg

def vary_dense_size(index, fp16=False):
	avg = []
	DATA_ = DATA_16 if fp16 else DATA_32
	for e in DENSE_LIST_STR:
		avg.append(DATA_[DEFAULT_BATCH_SIZE_STR][e][DEFAULT_KENREL_SIZE_STR][index])
	return avg

def vary_kernel_size(index, fp16=False):
	avg = []
	DATA_ = DATA_16 if fp16 else DATA_32
	for e in KENREL_LIST_STR:
		avg.append(DATA_[DEFAULT_BATCH_SIZE_STR][DEFAULT_DENSE_SIZE_STR][e][index])
	return avg

def numOfMulInDense(B, C_in, C_out):
	return B * C_in * C_out

def numOfMulInConv(B, width, K, C_in, C_out):
	return B * width * width * K * K * C_in * C_out

def numOfAddInDense(B, C_in, C_out):
	return B * (C_in - 1) * C_out

def numOfAddInConv(B, width, K, C_in, C_out):
	return B * width * width * (K * K * C_in - 1) * C_out

def sizeInOfDense(B, C_in, C_out):
	return B * C_in

def sizeInOfConv(B, width, K, C_in, C_out):
	return B * width * width * C_in

def sizeOutOfDense(B, C_in, C_out):
	return B * C_out

def sizeOutOfConv(B, width, K, C_in, C_out):
	return B * width * width * C_out

def sizeWeiOfDense(B, C_in, C_out):
	return C_in * C_out

def sizeWeiOfConv(B, width, K, C_in, C_out):
	return K * K * C_in * C_out

def infoOfConv(B, width, K, C_in, C_out):
	return numOfMulInConv(B, width, K, C_in, C_out), \
		numOfAddInConv(B, width, K, C_in, C_out), \
		sizeInOfConv(B, width, K, C_in, C_out), \
		sizeOutOfConv(B, width, K, C_in, C_out), \
		sizeWeiOfConv(B, width, K, C_in, C_out)

def infoOfDense(B, C_in, C_out):
	return numOfMulInDense(B, C_in, C_out), \
		numOfAddInDense(B, C_in, C_out), \
		sizeInOfDense(B, C_in, C_out), \
		sizeOutOfDense(B, C_in, C_out), \
		sizeWeiOfDense(B, C_in, C_out)

def show_model_complexity():
	computeComplexity = [["conv_layer1", "conv_layer2", "dense", "dense1"], 
			[numOfMulInConv(DEFAULT_BATCH_SIZE, 28, DEFAULT_KENREL_SIZE, 1, 32),
				numOfMulInConv(DEFAULT_BATCH_SIZE, 14, DEFAULT_KENREL_SIZE, 32, 64),
				numOfMulInDense(DEFAULT_BATCH_SIZE, 7*7*64, DEFAULT_DENSE_SIZE),
				numOfMulInDense(DEFAULT_BATCH_SIZE, DEFAULT_DENSE_SIZE, 10)],
			[numOfAddInConv(DEFAULT_BATCH_SIZE, 28, DEFAULT_KENREL_SIZE, 1, 32),
				numOfAddInConv(DEFAULT_BATCH_SIZE, 14, DEFAULT_KENREL_SIZE, 32, 64),
				numOfAddInDense(DEFAULT_BATCH_SIZE, 7*7*64, DEFAULT_DENSE_SIZE),
				numOfAddInDense(DEFAULT_BATCH_SIZE, DEFAULT_DENSE_SIZE, 10)]]
	for i in range(len(computeComplexity[0])):
		print("%-20s mul:%-20d add: %-20d"%(computeComplexity[0][i], computeComplexity[1][i], computeComplexity[2][i]))

# show_model_complexity()

names = ['conv_layer1/conv2d/BiasAdd', 
	'conv_layer1/conv2d/Conv2D', 
	'conv_layer1/conv2d/Relu', 
	'conv_layer2/conv2d/BiasAdd', 
	'conv_layer2/conv2d/Conv2D', 
	'conv_layer2/conv2d/Relu', 
	'dense/BiasAdd', 'dense/MatMul', 'dense/Relu', 'dense_1/BiasAdd', 'dense_1/MatMul']

OP_NAMES = ['conv_layer1/conv2d/Conv2D', 'conv_layer2/conv2d/Conv2D', 'dense/MatMul', 'dense_1/MatMul',
	'conv_layer1/Cast_1', 'conv_layer2/Cast', 'Cast_2', 'Cast_3']
OP_LABELS = ['conv1', 'conv2', 'dense', 'dense_1',
	"conv1_out_cast", "conv2_in_cast", "dense_out_cast", "dense_in_cast"]

model_size = np.array([
		list(zip(*[infoOfConv(b, 28, DEFAULT_KENREL_SIZE, 1, 32) for b in BATCH_LIST_VALUE])),
		list(zip(*[infoOfConv(b, 14, DEFAULT_KENREL_SIZE, 32, 64) for b in BATCH_LIST_VALUE])),
		list(zip(*[infoOfDense(b, 7*7*64, DEFAULT_DENSE_SIZE) for b in BATCH_LIST_VALUE])),
		list(zip(*[infoOfDense(b, DEFAULT_DENSE_SIZE, 10) for b in BATCH_LIST_VALUE]))
	])
intensity = model_size[:, 0, :] / (model_size[:, 2, :] + model_size[:, 3, :] + model_size[:, 4, :])

THRESHOLD = 0.2 # in ms

def plot_varyB_resut(S_mul=False, S_add=False, S_in=False, S_out=False, S_wei=False):
	plt.figure(num=1, figsize=(8, 6))

	x_axis_idx = None
	if S_mul:
		x_axis_idx = 0
	elif S_add:
		x_axis_idx = 1
	elif S_in:
		x_axis_idx = 2
	elif S_out:
		x_axis_idx = 3
	elif S_wei:
		x_axis_idx = 4

	x_axis_names = ["S_mul", "S_add", "S_in", "S_out", "S_weight"]
	x_axis_name = "Batch Size (B)" if x_axis_idx is None else x_axis_names[x_axis_idx]

	ax = plt.subplot(221)
	x_axis = BATCH_LIST_VALUE if x_axis_idx is None else model_size[0][x_axis_idx]
	avgs = vary_batch_size(NAMELIST_32.index('conv_layer1/conv2d/Conv2D'))
	ax.plot(x_axis, avgs, marker='.', label="conv1 (5*5*1*32)")
	avgs_16 = vary_batch_size(NAMELIST_16.index('conv_layer1/conv2d/Conv2D'), fp16=True)
	ax.plot(x_axis, avgs_16, marker='^', label="conv1 (5*5*1*32) + fp16")

	# popt, pcov = wrap_curve_fit(BATCH_LIST_VALUE, avgs)
	# popt_16, pcov = wrap_curve_fit(BATCH_LIST_VALUE, avgs_16)
	# ax.plot(BATCH_LIST_VALUE, np.array(avgs)/np.array(avgs_16), "--", label="conv1 / conv1_fp16")
	plt.legend()
	plt.ylabel('Average Time (ms)')
	plt.xlabel(x_axis_name)

	ax = plt.subplot(222)
	x_axis = BATCH_LIST_VALUE if x_axis_idx is None else model_size[1][x_axis_idx]
	avgs = vary_batch_size(NAMELIST_32.index('conv_layer2/conv2d/Conv2D'))
	ax.plot(x_axis, avgs, marker='.', label="conv2 (5*5*32*64)")
	avgs_16 = vary_batch_size(NAMELIST_16.index('conv_layer2/conv2d/Conv2D'), fp16=True)
	ax.plot(x_axis, avgs_16, marker='^', label="conv2 (5*5*32*64) + fp16")

	# popt, pcov = wrap_curve_fit(BATCH_LIST_VALUE, avgs)
	# ax.plot(BATCH_LIST_VALUE, time2batch_size(np.array(BATCH_LIST_VALUE), *popt), "--", label="conv2 (5*5*32*64) -- fit")
	# popt_16, pcov = wrap_curve_fit(BATCH_LIST_VALUE, avgs_16)
	# ax.plot(BATCH_LIST_VALUE, time2batch_size(np.array(BATCH_LIST_VALUE), *popt_16), "--", label="conv2 (5*5*32*64) + fp16 -- fit")
	# ax.plot(BATCH_LIST_VALUE, np.array(avgs)/np.array(avgs_16), "--", label="conv2 / conv2_fp16")

	plt.legend()
	plt.ylabel('Average Time (ms)')
	plt.xlabel(x_axis_name)


	ax = plt.subplot(223)
	x_axis = BATCH_LIST_VALUE if x_axis_idx is None else model_size[2][x_axis_idx]
	avgs = vary_batch_size(NAMELIST_32.index('dense/MatMul'))
	ax.plot(x_axis, avgs, marker='.', label="dense (3136*1024)")
	avgs_16 = vary_batch_size(NAMELIST_16.index('dense/MatMul'), fp16=True)
	ax.plot(x_axis, avgs_16, marker='^', label="dense (3136*1024) + fp16")

	# popt, pcov = wrap_curve_fit(BATCH_LIST_VALUE, avgs)
	# popt_16, pcov = wrap_curve_fit(BATCH_LIST_VALUE, avgs_16)
	# ax.plot(BATCH_LIST_VALUE, avgs / np.array(avgs_16), "--", label="dense / dense_fp16")

	plt.legend()
	plt.ylabel('Average Time (ms)')
	plt.xlabel(x_axis_name)

	ax = plt.subplot(224)
	x_axis = BATCH_LIST_VALUE if x_axis_idx is None else model_size[3][x_axis_idx]
	avgs = vary_batch_size(NAMELIST_32.index('dense_1/MatMul'))
	ax.plot(x_axis, avgs, marker='.', label="dense1 (1024*10)")
	avgs_16 = vary_batch_size(NAMELIST_16.index('dense_1/MatMul'), fp16=True)
	ax.plot(x_axis, avgs_16, marker='^', label="dense1 (1024*10) + fp16")

	# popt, pcov = wrap_curve_fit(BATCH_LIST_VALUE, avgs)
	# ax.plot(BATCH_LIST_VALUE, time2batch_size(np.array(BATCH_LIST_VALUE), *popt), "--", label="dense_1 (1024*10) -- fit")
	# popt_16, pcov = wrap_curve_fit(BATCH_LIST_VALUE, avgs_16)
	# ax.plot(BATCH_LIST_VALUE, time2batch_size(np.array(BATCH_LIST_VALUE), *popt_16), "--", label="dense_1 (1024*10) + fp16 -- fit")

	plt.legend()
	plt.ylabel('Average Time (ms)')
	plt.xlabel(x_axis_name)

	plt.show()

def plot_varyB_intensity():
	plt.figure(num=1, figsize=(8, 6))

	# x_axis_names = ["S_mul", "S_add", "S_in", "S_out", "S_weight"]
	x_axis_name = "Batch Size (B)"

	def __plot(op_id):
		ax = plt.subplot(241 + 2 * op_id)
		avgs = vary_batch_size(NAMELIST_32.index(OP_NAMES[op_id]))
		avgs_16 = vary_batch_size(NAMELIST_16.index(OP_NAMES[op_id]), fp16=True)

		flops_32 = model_size[op_id, 0, :] / np.array(avgs)
		flops_16 = model_size[op_id, 0, :] / np.array(avgs_16)
		ax.plot(intensity[op_id], flops_32, '.-', label=OP_LABELS[op_id]+"_fp32_flops")
		ax.plot(intensity[op_id], flops_16, '.-', label=OP_LABELS[op_id]+"_fp16_flops")
		plt.legend()
		plt.ylabel('FLOPS')
		plt.xlabel("arithmetic intensity")

		ax = plt.subplot(242 + 2 * op_id)
		ax.plot(BATCH_LIST_VALUE, intensity[op_id], '.-', label=OP_LABELS[op_id]+"_intensity")
		plt.legend()
		plt.ylabel('Intensity')
		plt.xlabel(x_axis_name)
		op_id + 1

	for op_id in range(4):
		__plot(op_id)

	plt.show()

def plot_varyB_intensity_combine():
	plt.figure(num=1, figsize=(8, 6))

	# x_axis_names = ["S_mul", "S_add", "S_in", "S_out", "S_weight"]
	x_axis_name = "Batch Size (B)"

	def __plot(op_id):
		ax = plt.subplot(211 + op_id)

		avgs = vary_batch_size(NAMELIST_32.index(OP_NAMES[op_id]))
		avgs_16 = vary_batch_size(NAMELIST_16.index(OP_NAMES[op_id]), fp16=True)
		flops_32 = model_size[op_id, 0, :] / np.array(avgs)
		flops_16 = model_size[op_id, 0, :] / np.array(avgs_16)
		ax.plot(intensity[op_id], flops_32, '.-', label=OP_LABELS[op_id]+"_fp32_flops")
		ax.plot(intensity[op_id], flops_16, '.-', label=OP_LABELS[op_id]+"_fp16_flops")

		op_id += 1

		avgs = vary_batch_size(NAMELIST_32.index(OP_NAMES[op_id]))
		avgs_16 = vary_batch_size(NAMELIST_16.index(OP_NAMES[op_id]), fp16=True)
		flops_32 = model_size[op_id, 0, :] / np.array(avgs)
		flops_16 = model_size[op_id, 0, :] / np.array(avgs_16)
		ax.plot(intensity[op_id], flops_32, '.-', label=OP_LABELS[op_id]+"_fp32_flops")
		ax.plot(intensity[op_id], flops_16, '.-', label=OP_LABELS[op_id]+"_fp16_flops")

		plt.legend()
		plt.ylabel('FLOPS')
		plt.xlabel("arithmetic intensity")

	for op_id in range(2):
		__plot(op_id)

	plt.show()

def plot_avg_accum_distribution():
	plt.figure(num=1, figsize=(8, 6))
	def __plot(op_id):
		ax = plt.subplot(211 + op_id)

		avgs = vary_batch_size(NAMELIST_32.index(OP_NAMES[op_id]))
		avgs_16 = vary_batch_size(NAMELIST_16.index(OP_NAMES[op_id]), fp16=True)

		op_id += 1

		avgs_ = vary_batch_size(NAMELIST_32.index(OP_NAMES[op_id]))
		avgs_16_ = vary_batch_size(NAMELIST_16.index(OP_NAMES[op_id]), fp16=True)

		avgs = np.concatenate((avgs, avgs_))
		avgs_16 = np.concatenate((avgs_16, avgs_16_))

		def _gen(_array):
			assert len(_array.shape)==1
			_array = np.sort(_array)
			_len = _array.shape[0]
			dist = []
			ret = None
			for i in range(_len):
				dist.append(100 * i / _len)
				if ret is None and _array[i] > THRESHOLD:
					ret = 100 * i / _len
			return _array, np.array(dist), ret

		x1, y1, ret1 = _gen(avgs)
		x2, y2, ret2 = _gen(avgs_16)

		ax.plot(x1, y1, label="fp32" + ", fp32 == %f: %6.4f %%"%(THRESHOLD, ret1))
		ax.plot(x2, y2, label="fp16" + ", fp16 == %f: %6.4f %%"%(THRESHOLD, ret2))

		# ax.text(0.1, ret1, "fp32: {}, {} %".format(0.1, ret1))
		# ax.text(0.1, ret2, "fp16: {}, {} %".format(0.1, ret2))

		plt.legend()
		plt.ylabel('Cumulative Distribution (%)')
		plt.xlabel("Execution time (ms)")

	for op_id in range(2):
		__plot(op_id)

	plt.show()

def init_fig_base(cnt):
	w = math.ceil(math.sqrt(cnt))
	h = math.ceil(cnt / w)
	fig_base = w * 100 + h * 10 + 1
	return fig_base, 0

def plot_varyK_result(S_mul=False, S_add=False, S_in=False, S_out=False, S_wei=False):
	plt.figure(num=1, figsize=(8, 6))

	cnt = 1 + int(S_mul) + int(S_add) + int(S_in) + int(S_out) + int(S_wei)
	fig_base, fig_idx = init_fig_base(cnt)
	
	model_size = [list(zip(*[infoOfConv(DEFAULT_BATCH_SIZE, 28, k, 1, 32) for k in KENREL_LIST_VALUE])),
		list(zip(*[infoOfConv(DEFAULT_BATCH_SIZE, 14, k, 32, 64) for k in KENREL_LIST_VALUE]))]

	def __plot(x_axis, x_axis2, x_name, _fig_idx):
		ax = plt.subplot(fig_base+_fig_idx)
		ax.plot(x_axis, vary_kernel_size(NAMELIST_32.index('conv_layer1/conv2d/Conv2D')), marker='.', label="conv1 (K*K*1*32)")
		ax.plot(x_axis, vary_kernel_size(NAMELIST_16.index('conv_layer1/conv2d/Conv2D'), fp16=True), marker='^', label="conv1 (K*K*1*32) + fp16")
		ax.plot(x_axis2[:6], vary_kernel_size(NAMELIST_32.index('conv_layer2/conv2d/Conv2D'))[:6], marker='.', label="conv2 (K*K*32*64)")
		ax.plot(x_axis2[:6], vary_kernel_size(NAMELIST_16.index('conv_layer2/conv2d/Conv2D'), fp16=True)[:6], marker='^', label="conv2 (K*K*32*64) + fp16")
		plt.legend()
		plt.ylabel('Average Time (ms)')
		plt.xlabel(x_name)
		return _fig_idx + 1

	fig_idx = __plot(KENREL_LIST_VALUE, KENREL_LIST_VALUE, "Kernel Size (K)", fig_idx)

	if S_mul:
		fig_idx = __plot(model_size[0][0], model_size[1][0], "S_mul", fig_idx)

	if S_add:
		fig_idx = __plot(model_size[0][1], model_size[1][1], "S_add", fig_idx)

	if S_in:
		fig_idx = __plot(model_size[0][2], model_size[1][2], "S_in", fig_idx)

	if S_out:
		fig_idx = __plot(model_size[0][3], model_size[1][3], "S_out", fig_idx)

	if S_wei:
		fig_idx = __plot(model_size[0][4], model_size[1][4], "S_wei", fig_idx)

	plt.show()

def plot_varyD_result():
	plt.figure(num=1, figsize=(8, 6))
	ax = plt.subplot(121)
	ax.plot(DENSE_LIST_VALUE, vary_dense_size(NAMELIST_32.index('dense/MatMul')), marker='.', label="dense (3136*D)")
	ax.plot(DENSE_LIST_VALUE, vary_dense_size(NAMELIST_16.index('dense/MatMul'), fp16=True), marker='^', label="dense (3136*D) + fp16")
	plt.legend()
	plt.ylabel('Average Time (ms)')
	plt.xlabel("Dense Size (D)")

	ax = plt.subplot(122)
	ax.plot(DENSE_LIST_VALUE, vary_dense_size(NAMELIST_32.index('dense_1/MatMul')), marker='.', label="dense1 (D*10)")
	ax.plot(DENSE_LIST_VALUE, vary_dense_size(NAMELIST_16.index('dense_1/MatMul'), fp16=True), marker='^', label="dense1 (D*10) + fp16")
	plt.legend()
	plt.ylabel('Average Time (ms)')
	plt.xlabel("Dense Size (D)")
	plt.show()

def plot_varyB_resut_of_cast():
	plt.figure(num=1, figsize=(8, 6))

	ax = plt.subplot(221)
	avgs_16 = vary_batch_size(NAMELIST_16.index('conv_layer1/Cast_1'), fp16=True)
	ax.plot(BATCH_LIST_VALUE, avgs_16, marker='.', label="conv_layer1/Cast_1:fp16->fp32")
	avgs_16 = vary_batch_size(NAMELIST_16.index('conv_layer1/conv2d/Conv2D'), fp16=True)
	ax.plot(BATCH_LIST_VALUE, avgs_16, marker='^', label="conv1 (5*5*1*32) + fp16")
	plt.legend()
	plt.ylabel('Average Time (ms)')
	plt.xlabel("Batch Size (B)")


	ax = plt.subplot(222)
	avgs_16 = vary_batch_size(NAMELIST_16.index('conv_layer2/Cast'), fp16=True)
	ax.plot(BATCH_LIST_VALUE, avgs_16, marker='.', label="conv_layer2/Cast:fp32->fp16")
	avgs_16 = vary_batch_size(NAMELIST_16.index('conv_layer2/conv2d/Conv2D'), fp16=True)
	ax.plot(BATCH_LIST_VALUE, avgs_16, marker='^', label="conv2 (5*5*32*64) + fp16")
	plt.legend()
	plt.ylabel('Average Time (ms)')
	plt.xlabel("Batch Size (B)")

	ax = plt.subplot(223)
	avgs_16 = vary_batch_size(NAMELIST_16.index('Cast_2'), fp16=True)
	ax.plot(BATCH_LIST_VALUE, avgs_16, marker='.', label="Cast_2(dense):fp16->fp32")
	avgs_16 = vary_batch_size(NAMELIST_16.index('dense/MatMul'), fp16=True)
	ax.plot(BATCH_LIST_VALUE, avgs_16, marker='^', label="dense (3136*1024) + fp16")
	plt.legend()
	plt.ylabel('Average Time (ms)')
	plt.xlabel("Batch Size (B)")

	ax = plt.subplot(224)
	avgs_16 = vary_batch_size(NAMELIST_16.index('Cast_3'), fp16=True)
	ax.plot(BATCH_LIST_VALUE, avgs_16, marker='.', label="Cast_3(dense1):fp32->fp16")
	avgs_16 = vary_batch_size(NAMELIST_16.index('dense_1/MatMul'), fp16=True)
	ax.plot(BATCH_LIST_VALUE, avgs_16, marker='^', label="dense1 (1024*10) + fp16")
	plt.legend()
	plt.ylabel('Average Time (ms)')
	plt.xlabel("Batch Size (B)")

	plt.show()

# plot_varyK_result(S_mul=True, S_add=True, S_in=True, S_out=True, S_wei=True)
# plot_varyD_result()
# plot_varyB_resut(S_mul=False, S_add=False, S_in=False, S_out=False, S_wei=False)
# plot_varyB_intensity()
# plot_varyB_intensity_combine()
# plot_varyB_resut_of_cast()
# plot_avg_accum_distribution()
# raise


####################################################################################################
#############################        Start to Fit          #########################################
####################################################################################################

def exct_filter(target, others):
	assert len(target.shape) == 1
	_filter = np.where(target >= THRESHOLD)
	if len(others.shape) == 1:
		return target[_filter], others[_filter]
	else:
		return target[_filter], others[:, _filter].reshape(list(others.shape[:-1]) + [-1])

def predict_error(_list, _list_pred):
	_list_pred = np.array(_list_pred)
	_list = np.array(_list)
	_list, _list_pred = exct_filter(_list, _list_pred)

	if len(_list) == 0:
		return None, "Original time is too small. Ignore!!!"

	diff = np.abs(_list_pred - _list) / _list
	return diff, "%f %%"%(np.average(diff * 100))

def calculationSizeAndGFLOPS2time(xs, a1, a2, a3, a4, a5, a6, a7, a8, a9, b1, b2, b3):
	'''
	gflops:
		We only need a relative value of gflops, 
		i.e., if we know fp32's is twice of fp16's, we can just fp32's = 2 and fp16's = 1,
		the scale is hidden in the a2 
		x[0]: relative gflops
		x[1]: num of multiplication
		x[2]: num of addition
		x[3]: input size
		x[4]: output size
		x[5]: weight size
	'''
	gflops = xs[0]
	S_mul = xs[1]
	S_add = xs[2]
	wei_S_all = a4 * xs[3] + a5 * xs[4] + a6 * xs[5]
	wei_S_all2 = a7 * xs[3] + a8 * xs[4] + a9 * xs[5]
	return (a1 * S_mul + b1) / (a3 * gflops + b2) + wei_S_all / gflops + b3 + gflops * wei_S_all2 
	# return (a1 * xs[1] + b1) / (np.exp(a3 * xs[0] * (a4 * xs[3] + a5 * xs[4] + a6 * xs[5]) * (xs[1]/(xs[3] + xs[4] + a7 * xs[3] + a8 * xs[4] + a9 * xs[5]))) + b2) + b3 

def fit_test(xs, a1, a2, a3, a4, b1):
	gflops = xs[0]
	S_mul = xs[1]
	S_add = xs[2]
	intensity = xs[1] / (xs[3] + xs[4] + xs[5])
	return (a1 * S_mul + b1) * (1 / (a2 * gflops * intensity) + 1 / (a3 * gflops) + a4 * gflops / intensity)
		

def wrap_curve_fit(xs, ys):
	assert isinstance(xs, list) and isinstance(ys, list)
	return curve_fit(time2batch_size, [0] + xs, [0] + ys)

lower_bounds = tuple([0]*9 + [-np.inf]*3)
# lower_bounds = tuple([0]*4 + [-np.inf]*1)
up_bounds = tuple(len(lower_bounds) * [np.inf])
p0=[0]*len(lower_bounds)
FIT_FUNC = calculationSizeAndGFLOPS2time
# FIT_FUNC = fit_test

is_show = [False, False, True, True, False, False, False, False]
GFLOPS_FP32 = 1
GFLOPS_FP16 = 2

def fit_with_S_cal_gflops(is_show):
	avgsList = []
	gflopsList = []
	S_mul_list = []
	S_add_list = []
	S_in_list = []
	S_out_list = []
	S_wei_list = []

	def __record_xdata(S_mul, S_add, S_in, S_out, S_wei, gflops):
		S_mul_list.append(S_mul)
		S_add_list.append(S_add)
		S_in_list.append(S_in)
		S_out_list.append(S_out)
		S_wei_list.append(S_wei)
		gflopsList.append(gflops)
	
	if is_show[0]:
		avgsList += vary_batch_size(NAMELIST_32.index('conv_layer1/conv2d/Conv2D'))
		for b in BATCH_LIST_VALUE:
			S_mul, S_add, S_in, S_out, S_wei = infoOfConv(b, 28, DEFAULT_KENREL_SIZE, 1, 32)
			__record_xdata(S_mul, S_add, S_in, S_out, S_wei, GFLOPS_FP32)

		avgsList += vary_batch_size(NAMELIST_16.index('conv_layer1/conv2d/Conv2D'), fp16=True)
		for b in BATCH_LIST_VALUE:
			S_mul, S_add, S_in, S_out, S_wei = infoOfConv(b, 28, DEFAULT_KENREL_SIZE, 1, 32)
			__record_xdata(S_mul, S_add, S_in, S_out, S_wei, GFLOPS_FP16)

	if is_show[1]:
		avgsList += vary_batch_size(NAMELIST_32.index('conv_layer2/conv2d/Conv2D'))
		for b in BATCH_LIST_VALUE:
			S_mul, S_add, S_in, S_out, S_wei = infoOfConv(b, 14, DEFAULT_KENREL_SIZE, 32, 64)
			__record_xdata(S_mul, S_add, S_in, S_out, S_wei, GFLOPS_FP32)

		avgsList += vary_batch_size(NAMELIST_16.index('conv_layer2/conv2d/Conv2D'), fp16=True)
		for b in BATCH_LIST_VALUE:
			S_mul, S_add, S_in, S_out, S_wei = infoOfConv(b, 14, DEFAULT_KENREL_SIZE, 32, 64)
			__record_xdata(S_mul, S_add, S_in, S_out, S_wei, GFLOPS_FP16)
	
	if is_show[2]:
		avgsList += vary_batch_size(NAMELIST_32.index('dense/MatMul'))
		for b in BATCH_LIST_VALUE:
			S_mul, S_add, S_in, S_out, S_wei = infoOfDense(b, 7*7*64, DEFAULT_DENSE_SIZE)
			__record_xdata(S_mul, S_add, S_in, S_out, S_wei, GFLOPS_FP32)

		avgsList += vary_batch_size(NAMELIST_16.index('dense/MatMul'), fp16=True)
		for b in BATCH_LIST_VALUE:
			S_mul, S_add, S_in, S_out, S_wei = infoOfDense(b, 7*7*64, DEFAULT_DENSE_SIZE)
			__record_xdata(S_mul, S_add, S_in, S_out, S_wei, GFLOPS_FP16)

	if is_show[3]:
		avgsList += vary_batch_size(NAMELIST_32.index('dense_1/MatMul'))
		for b in BATCH_LIST_VALUE:
			S_mul, S_add, S_in, S_out, S_wei = infoOfDense(b, DEFAULT_DENSE_SIZE, 10)
			__record_xdata(S_mul, S_add, S_in, S_out, S_wei, GFLOPS_FP32)

		avgsList += vary_batch_size(NAMELIST_16.index('dense_1/MatMul'), fp16=True)
		for b in BATCH_LIST_VALUE:
			S_mul, S_add, S_in, S_out, S_wei = infoOfDense(b, DEFAULT_DENSE_SIZE, 10)
			__record_xdata(S_mul, S_add, S_in, S_out, S_wei, GFLOPS_FP16)
	
	if is_show[4]:
		avgsList += vary_batch_size(NAMELIST_16.index('conv_layer1/Cast_1'), fp16=True)
		S_mul = S_add = S_wei = 0
		for b in BATCH_LIST_VALUE:
			S_in = S_out = sizeOutOfConv(b, 28, DEFAULT_KENREL_SIZE, 1, 32)
			__record_xdata(S_mul, S_add, S_in, S_out, S_wei, GFLOPS_FP16)

	if is_show[5]:
		avgsList += vary_batch_size(NAMELIST_16.index('conv_layer2/Cast'), fp16=True)
		S_mul = S_add = S_wei = 0
		for b in BATCH_LIST_VALUE:
			S_in = S_out = sizeInOfConv(b, 14, DEFAULT_KENREL_SIZE, 32, 64)
			__record_xdata(S_mul, S_add, S_in, S_out, S_wei, GFLOPS_FP16)

	if is_show[6]:
		avgsList += vary_batch_size(NAMELIST_16.index('Cast_2'), fp16=True)
		S_mul = S_add = S_wei = 0
		for b in BATCH_LIST_VALUE:
			S_in = S_out = sizeInOfDense(b, 7*7*64, DEFAULT_DENSE_SIZE)
			__record_xdata(S_mul, S_add, S_in, S_out, S_wei, GFLOPS_FP16)

	if is_show[7]:
		avgsList += vary_batch_size(NAMELIST_16.index('Cast_3'), fp16=True)
		S_mul = S_add = S_wei = 0
		for b in BATCH_LIST_VALUE:
			S_in = S_out = sizeOutOfDense(b, DEFAULT_DENSE_SIZE, 10)
			__record_xdata(S_mul, S_add, S_in, S_out, S_wei, GFLOPS_FP16)

	xdata = np.array([gflopsList, S_mul_list, S_add_list, S_in_list, S_out_list, S_wei_list])
	ydata = np.array(avgsList)
	_ydata, _xdata = exct_filter(ydata, xdata)
	popt, pcov = curve_fit(FIT_FUNC, _xdata, _ydata, 
		bounds=(lower_bounds, up_bounds), p0=p0, maxfev=10000)
	return popt, pcov, xdata, ydata

popt, pcov, xdata, ydata = fit_with_S_cal_gflops(is_show)
print(popt)
UNIT_LEN = len(BATCH_LIST_VALUE)

def plot_intensity2flops():
	assert not is_show[4]
	intensity = xdata[1] / (xdata[3] + xdata[4] + xdata[5])
	flops = xdata[1] / ydata

	from mpl_toolkits.mplot3d import Axes3D
	plt.figure(num=1, figsize=(8, 6))
	fig = plt.figure()
	ax = fig.add_subplot(121, projection='3d')
	ax.scatter(intensity, xdata[0], flops)
	plt.xlabel("arithmetic intensity")
	plt.ylabel("precision")

	ax = plt.subplot(122)
	index32 = np.where(xdata[0,:]==GFLOPS_FP32)
	index16 = np.where(xdata[0,:]==GFLOPS_FP16)
	intensity32 = intensity[index32]
	flops_32_to_16 = flops[index32] / flops[index16]
	ax.plot(intensity32, flops_32_to_16)
	plt.xlabel("arithmetic intensity")
	plt.ylabel("flops 32 / flops 16")
	plt.show()

def plot_3d_fit_result():
	from mpl_toolkits.mplot3d import Axes3D
	xdata = np.array([gflopsList, S_mul_list, S_in_list, S_out_list, S_wei_list])
	pred = FIT_FUNC(xdata, *popt)
	plt.figure(num=1, figsize=(8, 6))
	fig = plt.figure()
	fig_idx = 0

	ax = fig.add_subplot(221, projection='3d')
	ax.scatter(S_in_list[fig_idx*UNIT_LEN:(fig_idx+1)*UNIT_LEN], 
		S_wei_list[fig_idx*UNIT_LEN:(fig_idx+1)*UNIT_LEN], 
		avgsList[fig_idx*UNIT_LEN:(fig_idx+1)*UNIT_LEN], label="real")
	ax.scatter(S_in_list[fig_idx*UNIT_LEN:(fig_idx+1)*UNIT_LEN], 
		S_wei_list[fig_idx*UNIT_LEN:(fig_idx+1)*UNIT_LEN], 
		pred[fig_idx*UNIT_LEN:(fig_idx+1)*UNIT_LEN], label="predict")
	plt.legend()
	plt.xlabel("Sin Conv1 32")
	plt.ylabel("Swei")
	fig_idx += 1

	ax = fig.add_subplot(222, projection='3d')
	ax.scatter(S_in_list[fig_idx*UNIT_LEN:(fig_idx+1)*UNIT_LEN], 
		S_wei_list[fig_idx*UNIT_LEN:(fig_idx+1)*UNIT_LEN], 
		avgsList[fig_idx*UNIT_LEN:(fig_idx+1)*UNIT_LEN], label="real")
	ax.scatter(S_in_list[fig_idx*UNIT_LEN:(fig_idx+1)*UNIT_LEN], 
		S_wei_list[fig_idx*UNIT_LEN:(fig_idx+1)*UNIT_LEN], 
		pred[fig_idx*UNIT_LEN:(fig_idx+1)*UNIT_LEN], label="predict")
	plt.legend()
	plt.xlabel("Sin Conv1 16")
	plt.ylabel("Swei")
	fig_idx += 1

	ax = fig.add_subplot(223, projection='3d')
	ax.scatter(S_in_list[fig_idx*UNIT_LEN:(fig_idx+1)*UNIT_LEN], 
		S_wei_list[fig_idx*UNIT_LEN:(fig_idx+1)*UNIT_LEN], 
		avgsList[fig_idx*UNIT_LEN:(fig_idx+1)*UNIT_LEN], label="real")
	ax.scatter(S_in_list[fig_idx*UNIT_LEN:(fig_idx+1)*UNIT_LEN], 
		S_wei_list[fig_idx*UNIT_LEN:(fig_idx+1)*UNIT_LEN], 
		pred[fig_idx*UNIT_LEN:(fig_idx+1)*UNIT_LEN], label="predict")
	plt.legend()
	plt.xlabel("Sin Conv2 32")
	plt.ylabel("Swei")
	fig_idx += 1

	ax = fig.add_subplot(224, projection='3d')
	ax.scatter(S_in_list[fig_idx*UNIT_LEN:(fig_idx+1)*UNIT_LEN], 
		S_wei_list[fig_idx*UNIT_LEN:(fig_idx+1)*UNIT_LEN], 
		avgsList[fig_idx*UNIT_LEN:(fig_idx+1)*UNIT_LEN], label="real")
	ax.scatter(S_in_list[fig_idx*UNIT_LEN:(fig_idx+1)*UNIT_LEN], 
		S_wei_list[fig_idx*UNIT_LEN:(fig_idx+1)*UNIT_LEN], 
		pred[fig_idx*UNIT_LEN:(fig_idx+1)*UNIT_LEN], label="predict")
	plt.legend()
	plt.xlabel("Sin Conv2 16")
	plt.ylabel("Swei")
	fig_idx += 1

	plt.show()

def plot_2d_fit_result(is_show):
	plt.figure(num=1, figsize=(8, 6))

	ratio_sum = []
	cnt = sum([int(i) for i in is_show])
	fig_base, fig_idx = init_fig_base(cnt)

	def __plot(op_id, fig_base, fig_idx, only_16=False):
		ax = plt.subplot(fig_base)
		if not only_16:
			avgs = vary_batch_size(NAMELIST_32.index(OP_NAMES[op_id]))
			ax.plot(BATCH_LIST_VALUE, avgs, marker='.', label=OP_LABELS[op_id]+"_fp32")
			avgs_pred = FIT_FUNC(xdata[:, fig_idx*UNIT_LEN:(fig_idx+1)*UNIT_LEN], *popt)
			ax.plot(BATCH_LIST_VALUE, avgs_pred, "--", label=OP_LABELS[op_id]+"_fp32"+"_pred")
			diff, ratio = predict_error(avgs, avgs_pred)
			print(OP_LABELS[op_id]+"_fp32", ratio, diff)
			fig_idx += 1
			if "%" in ratio:
				ratio_sum.append(float(ratio.split("%")[0]))

		avgs_16 = vary_batch_size(NAMELIST_16.index(OP_NAMES[op_id]), fp16=True)
		ax.plot(BATCH_LIST_VALUE, avgs_16, marker='^', label=OP_LABELS[op_id]+"_fp16")
		avgs_pred = FIT_FUNC(xdata[:, fig_idx*UNIT_LEN:(fig_idx+1)*UNIT_LEN], *popt)
		ax.plot(BATCH_LIST_VALUE, avgs_pred, "--", label=OP_LABELS[op_id]+"_fp16"+"_pred")
		diff, ratio = predict_error(avgs_16, avgs_pred)
		print(OP_LABELS[op_id]+"_fp16", ratio, diff)
		fig_idx += 1
		if "%" in ratio:
			ratio_sum.append(float(ratio.split("%")[0]))
		
		plt.legend()
		plt.ylabel('Average Time (ms)')
		plt.xlabel("Batch Size (B)")
		return fig_base+1, fig_idx

	for op_id in range(4):
		if is_show[op_id]:
			fig_base, fig_idx = __plot(op_id, fig_base, fig_idx)

	### plot results for cast ops
	for op_id in range(4):
		if is_show[op_id+4]:
			fig_base, fig_idx = __plot(op_id+4, fig_base, fig_idx, only_16=True)
	
	print("average error: %f %%"%(sum(ratio_sum)/len(ratio_sum)))
	plt.show()

# plot_intensity2flops()
plot_2d_fit_result(is_show)




