weightwise experiments

This commit is contained in:
Si11ium 2019-03-14 22:31:48 +01:00
parent 252716c420
commit 36d6579e4f
56 changed files with 66 additions and 134 deletions

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
{'divergent': 38, 'fix_zero': 62, 'fix_other': 0, 'fix_sec': 0, 'other': 0}

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
{'divergent': 0, 'fix_zero': 100, 'fix_other': 0, 'fix_sec': 0, 'other': 0}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
{'divergent': 3, 'fix_zero': 97, 'fix_other': 0, 'fix_sec': 0, 'other': 0}

View File

@ -1,36 +0,0 @@
ParticleDecorator activiation='linear' use_bias='False'
{'divergent': 0, 'fix_zero': 0, 'fix_other': 0, 'fix_sec': 0, 'other': 100}
ParticleDecorator activiation='linear' use_bias='False'
{'divergent': 0, 'fix_zero': 0, 'fix_other': 0, 'fix_sec': 0, 'other': 100}
ParticleDecorator activiation='linear' use_bias='False'
{'divergent': 0, 'fix_zero': 0, 'fix_other': 0, 'fix_sec': 0, 'other': 100}
ParticleDecorator activiation='sigmoid' use_bias='False'
{'divergent': 0, 'fix_zero': 0, 'fix_other': 0, 'fix_sec': 0, 'other': 100}
ParticleDecorator activiation='sigmoid' use_bias='False'
{'divergent': 0, 'fix_zero': 0, 'fix_other': 0, 'fix_sec': 0, 'other': 100}
ParticleDecorator activiation='sigmoid' use_bias='False'
{'divergent': 0, 'fix_zero': 0, 'fix_other': 0, 'fix_sec': 0, 'other': 100}
ParticleDecorator activiation='relu' use_bias='False'
{'divergent': 0, 'fix_zero': 0, 'fix_other': 0, 'fix_sec': 0, 'other': 100}
ParticleDecorator activiation='relu' use_bias='False'
{'divergent': 0, 'fix_zero': 0, 'fix_other': 0, 'fix_sec': 0, 'other': 100}
ParticleDecorator activiation='relu' use_bias='False'
{'divergent': 0, 'fix_zero': 0, 'fix_other': 0, 'fix_sec': 0, 'other': 100}

File diff suppressed because one or more lines are too long

View File

@ -1,30 +0,0 @@
variation 10e-0
avg time to vergence 3.72
avg time as fixpoint 0
variation 10e-1
avg time to vergence 5.13
avg time as fixpoint 0
variation 10e-2
avg time to vergence 6.53
avg time as fixpoint 0
variation 10e-3
avg time to vergence 8.09
avg time as fixpoint 0
variation 10e-4
avg time to vergence 9.81
avg time as fixpoint 0.06
variation 10e-5
avg time to vergence 11.43
avg time as fixpoint 1.51
variation 10e-6
avg time to vergence 13.15
avg time as fixpoint 3.34
variation 10e-7
avg time to vergence 14.57
avg time as fixpoint 4.79
variation 10e-8
avg time to vergence 22.41
avg time as fixpoint 12.37
variation 10e-9
avg time to vergence 26.17
avg time as fixpoint 16.11

View File

@ -1,8 +0,0 @@
ParticleDecorator activiation='linear' use_bias=False
{'xs': [0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000], 'ys': [0.45, 0.4, 0.6, 0.8, 0.95, 0.85, 0.95, 0.85, 0.9, 1.0, 0.8]}
ParticleDecorator activiation='linear' use_bias=False
{'xs': [0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000], 'ys': [0.95, 0.9, 0.9, 0.9, 0.95, 0.8, 0.9, 0.9, 0.85, 0.85, 0.9]}

File diff suppressed because one or more lines are too long

View File

@ -35,8 +35,8 @@ if __name__ == '__main__':
exp.epsilon = 1e-4
net_generators = []
for activation in ['linear', 'sigmoid', 'relu']:
net_generators += [lambda activation=activation: WeightwiseNeuralNetwork(width=2, depth=2).with_keras_params(activation=activation, use_bias=False)]
# net_generators += [lambda activation=activation: AggregatingNeuralNetwork(aggregates=4, width=2, depth=2).with_keras_params(activation=activation, use_bias=False)]
# net_generators += [lambda activation=activation: WeightwiseNeuralNetwork(width=2, depth=2).with_keras_params(activation=activation, use_bias=False)]
net_generators += [lambda activation=activation: AggregatingNeuralNetwork(aggregates=4, width=2, depth=2).with_keras_params(activation=activation, use_bias=False)]
# net_generators += [lambda activation=activation: FFTNeuralNetwork(aggregates=4, width=2, depth=2).with_keras_params(activation=activation, use_bias=False)]
# net_generators += [lambda activation=activation: RecurrentNeuralNetwork(width=2, depth=2).with_keras_params(activation=activation, use_bias=False)]
all_counters = []

View File

@ -26,7 +26,8 @@ def generate_fixpoint_weights():
def generate_fixpoint_net():
net = WeightwiseNeuralNetwork(width=2, depth=2).with_keras_params(activation='sigmoid')
# net = WeightwiseNeuralNetwork(width=2, depth=2).with_keras_params(activation='sigmoid')
net = AggregatingNeuralNetwork(width=2, depth=2).with_keras_params(activation='sigmoid')
net.set_weights(generate_fixpoint_weights())
return net

View File

@ -68,8 +68,8 @@ with SoupExperiment('learn-from-soup') as exp:
net_generators = []
for activation in ['sigmoid']: #['linear', 'sigmoid', 'relu']:
for use_bias in [False]:
net_generators += [lambda activation=activation, use_bias=use_bias: WeightwiseNeuralNetwork(width=2, depth=2).with_keras_params(activation=activation, use_bias=use_bias)]
# net_generators += [lambda activation=activation, use_bias=use_bias: AggregatingNeuralNetwork(aggregates=4, width=2, depth=2).with_keras_params(activation=activation, use_bias=use_bias)]
# net_generators += [lambda activation=activation, use_bias=use_bias: WeightwiseNeuralNetwork(width=2, depth=2).with_keras_params(activation=activation, use_bias=use_bias)]
net_generators += [lambda activation=activation, use_bias=use_bias: AggregatingNeuralNetwork(aggregates=4, width=2, depth=2).with_keras_params(activation=activation, use_bias=use_bias)]
# net_generators += [lambda activation=activation, use_bias=use_bias: RecurrentNeuralNetwork(width=2, depth=2).with_keras_params(activation=activation, use_bias=use_bias)]
all_names = []

View File

@ -60,8 +60,8 @@ if __name__ == '__main__':
net_generators = []
for activation in ['linear']: # , 'sigmoid', 'relu']:
for use_bias in [False]:
net_generators += [lambda activation=activation, use_bias=use_bias: WeightwiseNeuralNetwork(width=2, depth=2).with_keras_params(activation=activation, use_bias=use_bias)]
# net_generators += [lambda activation=activation, use_bias=use_bias: AggregatingNeuralNetwork(aggregates=4, width=2, depth=2).with_keras_params(activation=activation, use_bias=use_bias)]
# net_generators += [lambda activation=activation, use_bias=use_bias: WeightwiseNeuralNetwork(width=2, depth=2).with_keras_params(activation=activation, use_bias=use_bias)]
net_generators += [lambda activation=activation, use_bias=use_bias: AggregatingNeuralNetwork(aggregates=4, width=2, depth=2).with_keras_params(activation=activation, use_bias=use_bias)]
# net_generators += [lambda activation=activation, use_bias=use_bias: FFTNeuralNetwork(aggregates=4, width=2, depth=2).with_keras_params(activation=activation, use_bias=use_bias)]
# net_generators += [lambda activation=activation, use_bias=use_bias: RecurrentNeuralNetwork(width=2, depth=2).with_keras_params(activation=activation, use_bias=use_bias)]

View File

@ -62,8 +62,8 @@ with Experiment('mixed-self-fixpoints') as exp:
net_generators = []
for activation in ['linear']: #['linear', 'sigmoid', 'relu']:
for use_bias in [False]:
net_generators += [lambda activation=activation, use_bias=use_bias: WeightwiseNeuralNetwork(width=2, depth=2).with_keras_params(activation=activation, use_bias=use_bias)]
# net_generators += [lambda activation=activation, use_bias=use_bias: AggregatingNeuralNetwork(aggregates=4, width=2, depth=2).with_keras_params(activation=activation, use_bias=use_bias)]
# net_generators += [lambda activation=activation, use_bias=use_bias: WeightwiseNeuralNetwork(width=2, depth=2).with_keras_params(activation=activation, use_bias=use_bias)]
net_generators += [lambda activation=activation, use_bias=use_bias: AggregatingNeuralNetwork(aggregates=4, width=2, depth=2).with_keras_params(activation=activation, use_bias=use_bias)]
# net_generators += [lambda activation=activation, use_bias=use_bias: RecurrentNeuralNetwork(width=2, depth=2).with_keras_params(activation=activation, use_bias=use_bias)]
all_names = []

View File

@ -39,8 +39,8 @@ if __name__ == '__main__':
net_generators = []
for activation in ['linear']: # , 'sigmoid', 'relu']:
for use_bias in [False]:
net_generators += [lambda activation=activation, use_bias=use_bias: WeightwiseNeuralNetwork(width=2, depth=2).with_keras_params(activation=activation, use_bias=use_bias)]
# net_generators += [lambda activation=activation, use_bias=use_bias: AggregatingNeuralNetwork(aggregates=4, width=2, depth=2).with_keras_params(activation=activation, use_bias=use_bias)]
# net_generators += [lambda activation=activation, use_bias=use_bias: WeightwiseNeuralNetwork(width=2, depth=2).with_keras_params(activation=activation, use_bias=use_bias)]
net_generators += [lambda activation=activation, use_bias=use_bias: AggregatingNeuralNetwork(aggregates=4, width=2, depth=2).with_keras_params(activation=activation, use_bias=use_bias)]
# net_generators += [lambda activation=activation, use_bias=use_bias: RecurrentNeuralNetwork(width=2, depth=2).with_keras_params(activation=activation, use_bias=use_bias)]
all_counters = []
all_notable_nets = []

View File

@ -0,0 +1,12 @@
ParticleDecorator activiation='linear' use_bias='False'
{'divergent': 0, 'fix_zero': 0, 'fix_other': 0, 'fix_sec': 0, 'other': 100}
ParticleDecorator activiation='sigmoid' use_bias='False'
{'divergent': 0, 'fix_zero': 0, 'fix_other': 0, 'fix_sec': 0, 'other': 100}
ParticleDecorator activiation='relu' use_bias='False'
{'divergent': 0, 'fix_zero': 0, 'fix_other': 0, 'fix_sec': 0, 'other': 100}

View File

@ -0,0 +1,30 @@
variation 10e-0
avg time to vergence 3.65
avg time as fixpoint 0
variation 10e-1
avg time to vergence 5.07
avg time as fixpoint 0
variation 10e-2
avg time to vergence 6.49
avg time as fixpoint 0
variation 10e-3
avg time to vergence 7.97
avg time as fixpoint 0
variation 10e-4
avg time to vergence 9.81
avg time as fixpoint 0.04
variation 10e-5
avg time to vergence 11.4
avg time as fixpoint 1.51
variation 10e-6
avg time to vergence 13.14
avg time as fixpoint 3.26
variation 10e-7
avg time to vergence 14.63
avg time as fixpoint 4.95
variation 10e-8
avg time to vergence 21.35
avg time as fixpoint 11.47
variation 10e-9
avg time to vergence 26.36
avg time as fixpoint 16.3

View File

@ -0,0 +1,4 @@
TrainingNeuralNetworkDecorator activiation='sigmoid' use_bias=False
{'xs': [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100], 'ys': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 'zs': [0.0, 1.0, 3.4, 7.0, 8.3, 9.3, 9.9, 9.5, 9.7, 9.9, 10.0]}

View File

@ -0,0 +1,4 @@
TrainingNeuralNetworkDecorator activiation='linear' use_bias=False
{'xs': [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100], 'ys': [0.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2, 0.0, 0.0], 'zs': [0.0, 0.0, 0.6, 2.2, 3.5, 4.8, 5.6, 7.1, 8.3, 7.5, 9.0]}

View File

@ -0,0 +1,4 @@
ParticleDecorator activiation='linear' use_bias=False
{'xs': [0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000], 'ys': [0.4, 0.45, 0.7, 0.9, 1.0, 0.9, 0.9, 1.0, 0.9, 0.9, 0.9]}

View File

@ -2,7 +2,3 @@ ParticleDecorator activiation='linear' use_bias=False
{'divergent': 0, 'fix_zero': 0, 'fix_other': 19, 'fix_sec': 0, 'other': 1}
ParticleDecorator activiation='linear' use_bias=False
{'divergent': 0, 'fix_zero': 0, 'fix_other': 0, 'fix_sec': 0, 'other': 20}