From 7a79bdcaa238546733c862aecf81eb31f57b1a30 Mon Sep 17 00:00:00 2001 From: kurnianggoro Date: Mon, 15 Feb 2016 10:19:31 +0900 Subject: [PATCH] randomize the weight values without this line the initial weight will be always same --- lstm.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lstm.py b/lstm.py index 87a2222..dd6d2c1 100644 --- a/lstm.py +++ b/lstm.py @@ -8,6 +8,7 @@ def sigmoid(x): # createst uniform random array w/ values in [a,b) and shape args def rand_arr(a, b, *args): + np.random.seed(0) return np.random.rand(*args) * (b - a) + a class LstmParam: