summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2017-01-17 16:35:28 +0100
committerAlex Auvolat <alex@adnab.me>2017-01-17 16:35:28 +0100
commit2a4f89c41b82e7173d6fb4481af0dcd58c812c19 (patch)
treed99f1cf430c86b54449de1ae1fb66dfd00f9c098 /config
parent9524ab7589f1083608cae5608e16285b0707bc48 (diff)
downloadtext-rnn-2a4f89c41b82e7173d6fb4481af0dcd58c812c19.tar.gz
text-rnn-2a4f89c41b82e7173d6fb4481af0dcd58c812c19.zip
Stuff.
Diffstat (limited to 'config')
-rw-r--r--config/condlstm.py85
-rw-r--r--config/lstm-deep-l1.py52
-rw-r--r--config/lstm-frigo-irc.py1
3 files changed, 138 insertions, 0 deletions
diff --git a/config/condlstm.py b/config/condlstm.py
new file mode 100644
index 0000000..f846972
--- /dev/null
+++ b/config/condlstm.py
@@ -0,0 +1,85 @@
+from blocks.algorithms import AdaDelta
+from blocks.bricks import Tanh
+from blocks.initialization import IsotropicGaussian, Constant
+
+from model.condlstm import Model
+
+dataset = 'data/logcompil.txt'
+io_dim = 256
+
+# An epoch will be composed of 'num_seqs' sequences of len 'seq_len'
+# divided in chunks of lengh 'seq_div_size'
+num_seqs = 50
+seq_len = 5000
+seq_div_size = 200
+
+layers = [
+ # Slowlier
+ {'dim': 128,
+ 'reset_after': ' \t\n,.:;/!?()[]{}<>\\\'"*+-^_|#~&`@$%',
+ },
+ {'dim': 128,
+ 'run_on': ' \t\n,.:;/!?()[]{}<>\\\'"*+-^_|#~&`@$%',
+ 'reset_after': ' \t\n',
+ },
+ {'dim': 128,
+ 'run_on': ' \t\n',
+ 'reset_after': '\t\n',
+ },
+ {'dim': 256,
+ 'run_on': ' \t\n',
+ 'reset_after': '\n',
+ },
+ {'dim': 512,
+ 'run_on': '\t\n',
+ },
+ # Slowest
+ {'dim': 512,
+ 'run_on': '\n',
+ },
+ # Fastlier
+ {'dim': 512,
+ 'run_on': '\t\n',
+ },
+ {'dim': 256,
+ 'run_on': ' \t\n',
+ 'reset_before':'\n',
+ },
+ {'dim': 128,
+ 'run_on': ' \t\n',
+ 'reset_before': '\t\n',
+ },
+ {'dim': 128,
+ 'run_on': ' \t\n,.:;/!?()[]{}<>\\\'"*+-^_|#~&`@$%',
+ 'reset_before': ' \t\n',
+ },
+ {'dim': 128,
+ 'reset_before': ' \t\n,.:;/!?()[]{}<>\\\'"*+-^_|#~&`@$%',
+ },
+]
+activation_function = Tanh()
+
+w_noise_std = 0
+i_dropout = 0
+
+l1_reg = 0
+l1_reg_weight = 0
+
+step_rule = AdaDelta()
+
+weights_init = IsotropicGaussian(0.01)
+biases_init = Constant(0.)
+
+# parameter saving freq (number of batches)
+monitor_freq = 100
+save_freq = 100
+
+# used for sample generation and IRC mode
+#sample_temperature = 0.7 #0.5
+sample_temperature = 0.9 #0.5
+
+# do we want to generate samples at times during training?
+sample_len = 500
+sample_freq = 100
+sample_init = '\nalex\ttu crois?\n'
+
diff --git a/config/lstm-deep-l1.py b/config/lstm-deep-l1.py
new file mode 100644
index 0000000..fd330c7
--- /dev/null
+++ b/config/lstm-deep-l1.py
@@ -0,0 +1,52 @@
+from blocks.algorithms import AdaDelta
+from blocks.bricks import Tanh
+
+from model.lstm import Model
+
+dataset = 'data/logcompil.txt'
+io_dim = 256
+
+# An epoch will be composed of 'num_seqs' sequences of len 'seq_len'
+# divided in chunks of lengh 'seq_div_size'
+num_seqs = 100
+seq_len = 5000
+seq_div_size = 200
+
+layers = [
+ {'dim': 512},
+ {'dim': 512},
+ {'dim': 512},
+ {'dim': 512},
+ {'dim': 512},
+ {'dim': 512},
+ {'dim': 512},
+ {'dim': 512},
+ {'dim': 512},
+ {'dim': 512},
+]
+activation_function = Tanh()
+
+i2h_all = True # input to all hidden layers or only first layer
+h2o_all = True # all hiden layers to output or only last layer
+
+w_noise_std = 0
+i_dropout = 0
+
+l1_reg = 0
+l1_reg_weight = 0.05
+
+step_rule = AdaDelta()
+
+# parameter saving freq (number of batches)
+monitor_freq = 100
+save_freq = 100
+
+# used for sample generation and IRC mode
+#sample_temperature = 0.7 #0.5
+sample_temperature = 0.9 #0.5
+
+# do we want to generate samples at times during training?
+sample_len = 1000
+sample_freq = 100
+sample_init = '\nalex\ttu crois?\n'
+
diff --git a/config/lstm-frigo-irc.py b/config/lstm-frigo-irc.py
index 04468c9..38f0766 100644
--- a/config/lstm-frigo-irc.py
+++ b/config/lstm-frigo-irc.py
@@ -26,6 +26,7 @@ w_noise_std = 0.02
i_dropout = 0.5
l1_reg = 0
+l1_reg_weight = 0
step_rule = AdaDelta()