From d8fbe69827e1633901c0c94885b625523154ca78 Mon Sep 17 00:00:00 2001 From: Xiaoyao Xi <24541791+xixiaoyao@users.noreply.github.com> Date: Wed, 29 Apr 2020 02:36:03 +0800 Subject: [PATCH] Update models.py --- examples/emotion_detection/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/emotion_detection/models.py b/examples/emotion_detection/models.py index 4b6e7f0..6372cb7 100644 --- a/examples/emotion_detection/models.py +++ b/examples/emotion_detection/models.py @@ -124,8 +124,8 @@ class BiGRU(Model): dtype='float32', param_attr=fluid.ParamAttr(learning_rate=30), is_sparse=False) - h_0 = np.zeros((self.batch_size, self.hid_dim), dtype="float32") - h_0 = to_variable(h_0) + # h_0 = np.zeros((self.batch_size, self.hid_dim), dtype="float32") + # h_0 = to_variable(h_0) self._fc1 = Linear(input_dim = self.hid_dim, output_dim=self.hid_dim*3) self._fc2 = Linear(input_dim = self.hid_dim*2, output_dim=self.fc_hid_dim, act="tanh") self._fc_prediction = Linear(input_dim=self.fc_hid_dim, @@ -134,7 +134,7 @@ class BiGRU(Model): self._encoder = BiGRUEncoder( grnn_hidden_dim=self.hid_dim, input_dim=self.hid_dim * 3, - h_0=h_0, + # h_0=h_0, init_bound=0.1, is_bidirection=True) -- GitLab