From ff49937eef024916ac4560ce0134d94006e9e2e5 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 24 Jul 2015 11:30:27 -0400 Subject: RNN & Bidir RNN refactoring (& fixes, maybe) --- model/bidirectional_tgtcls.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'model/bidirectional_tgtcls.py') diff --git a/model/bidirectional_tgtcls.py b/model/bidirectional_tgtcls.py index 36120f7..4dfbad5 100644 --- a/model/bidirectional_tgtcls.py +++ b/model/bidirectional_tgtcls.py @@ -11,9 +11,12 @@ class Model(BidiRNN): @lazy() def __init__(self, config, **kwargs): super(Model, self).__init__(config, output_dim=config.tgtcls.shape[0], **kwargs) - self.classes = theano.shared(numpy.array(config.tgtcls, dtype=theano.config.floatX), name='classes') + + self.classes = theano.shared(numpy.array(config.tgtcls, dtype=theano.config.floatX), + name='classes') self.softmax = Softmax() self.children.append(self.softmax) def process_outputs(self, outputs): return tensor.dot(self.softmax.apply(outputs), self.classes) + -- cgit v1.2.3