diff options
Diffstat (limited to 'model/bidirectional_tgtcls.py')
-rw-r--r-- | model/bidirectional_tgtcls.py | 5 |
1 files changed, 4 insertions, 1 deletions
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) + |