aboutsummaryrefslogtreecommitdiff
path: root/model
diff options
context:
space:
mode:
Diffstat (limited to 'model')
-rw-r--r--model/dest_simple_mlp_tgtcls.py2
-rw-r--r--model/mlp.py7
2 files changed, 6 insertions, 3 deletions
diff --git a/model/dest_simple_mlp_tgtcls.py b/model/dest_simple_mlp_tgtcls.py
index 2d65097..46fca2b 100644
--- a/model/dest_simple_mlp_tgtcls.py
+++ b/model/dest_simple_mlp_tgtcls.py
@@ -9,7 +9,7 @@ from model.mlp import FFMLP, Stream
class Model(FFMLP):
def __init__(self, config, **kwargs):
- super(Model, self, output_layer=Softmax).__init__(config, **kwargs)
+ super(Model, self).__init__(config, output_layer=Softmax, **kwargs)
self.classes = theano.shared(numpy.array(config.tgtcls, dtype=theano.config.floatX), name='classes')
@application(outputs=['destination'])
diff --git a/model/mlp.py b/model/mlp.py
index 576b45b..05898a5 100644
--- a/model/mlp.py
+++ b/model/mlp.py
@@ -1,6 +1,6 @@
from theano import tensor
-from fuel.transformers import Batch
+from fuel.transformers import Batch, MultiProcessing
from fuel.streams import DataStream
from fuel.schemes import ConstantScheme, ShuffledExampleScheme
from blocks.bricks import application, MLP, Rectifier, Initializable
@@ -63,7 +63,10 @@ class Stream(object):
stream = transformers.TaxiAddDateTime(stream)
stream = transformers.TaxiAddFirstLastLen(self.config.n_begin_end_pts, stream)
stream = transformers.Select(stream, tuple(req_vars))
- return Batch(stream, iteration_scheme=ConstantScheme(self.config.batch_size))
+
+ stream = Batch(stream, iteration_scheme=ConstantScheme(self.config.batch_size))
+
+ return stream
def valid(self, req_vars):
stream = TaxiStream(self.config.valid_set, 'valid.hdf5')