From 9933cafdf3b218a509c2efd6e6e6ba91ae87aa9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Simon?= Date: Mon, 27 Jul 2015 13:07:19 -0400 Subject: Add bidirectional with recurrent ReLu --- model/bidirectional.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'model') diff --git a/model/bidirectional.py b/model/bidirectional.py index 4c4ffb0..5779752 100644 --- a/model/bidirectional.py +++ b/model/bidirectional.py @@ -37,7 +37,8 @@ class BidiRNN(Initializable): self.context_embedder = ContextEmbedder(config) - self.rec = SegregatedBidirectional(LSTM(dim=config.hidden_state_dim, name='recurrent')) + act = config.rec_activation() if hasattr(config, 'rec_activation') else None + self.rec = SegregatedBidirectional(LSTM(dim=config.hidden_state_dim, activation=act, name='recurrent')) self.fwd_fork = Fork([name for name in self.rec.prototype.apply.sequences if name!='mask'], prototype=Linear(), name='fwd_fork') -- cgit v1.2.3