From 35b4503ddd148b0c937468891dd0a7e9ff1c79f4 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Wed, 6 May 2015 10:12:17 -0400 Subject: Move weights init to config files ; fix s/time/travel_time --- model/dest_simple_mlp.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'model/dest_simple_mlp.py') diff --git a/model/dest_simple_mlp.py b/model/dest_simple_mlp.py index f422f11..a9e97cb 100644 --- a/model/dest_simple_mlp.py +++ b/model/dest_simple_mlp.py @@ -1,8 +1,6 @@ from blocks.bricks import MLP, Rectifier, Linear, Sigmoid, Identity from blocks.bricks.lookup import LookupTable -from blocks.initialization import IsotropicGaussian, Constant - from theano import tensor import data @@ -58,9 +56,9 @@ class Model(object): # Initialization for tbl in embed_tables: - tbl.weights_init = IsotropicGaussian(0.001) - mlp.weights_init = IsotropicGaussian(0.01) - mlp.biases_init = Constant(0.001) + tbl.weights_init = config.embed_weights_init + mlp.weights_init = config.mlp_weights_init + mlp.biases_init = config.mlp_biases_init for tbl in embed_tables: tbl.initialize() -- cgit v1.2.3