---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
<ipython-input-54-ef2a26faa326> in <module>()
8 batch_size=5)
9
---> 10 get_ipython().magic('timeit -n 1 nn.fit(trainingdata, traininganswervectors)')
11
12 y_valid = nn.predict(testdata)
/usr/local/lib/python3.4/dist-packages/IPython/core/interactiveshell.py in magic(self, arg_s)
2305 magic_name, _, magic_arg_s = arg_s.partition(' ')
2306 magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2307 return self.run_line_magic(magic_name, magic_arg_s)
2308
2309 #-------------------------------------------------------------------------
/usr/local/lib/python3.4/dist-packages/IPython/core/interactiveshell.py in run_line_magic(self, magic_name, line)
2226 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
2227 with self.builtin_trap:
-> 2228 result = fn(*args,**kwargs)
2229 return result
2230
/usr/local/lib/python3.4/dist-packages/IPython/core/magics/execution.py in timeit(self, line, cell)
/usr/local/lib/python3.4/dist-packages/IPython/core/magic.py in <lambda>(f, *a, **k)
191 # but it's overkill for just that one bit of state.
192 def magic_deco(arg):
--> 193 call = lambda f, *a, **k: f(*a, **k)
194
195 if callable(arg):
/usr/local/lib/python3.4/dist-packages/IPython/core/magics/execution.py in timeit(self, line, cell)
1039 break
1040 number *= 10
-> 1041 all_runs = timer.repeat(repeat, number)
1042 best = min(all_runs) / number
1043 if not quiet :
/usr/lib/python3.4/timeit.py in repeat(self, repeat, number)
204 r = []
205 for i in range(repeat):
--> 206 t = self.timeit(number)
207 r.append(t)
208 return r
/usr/local/lib/python3.4/dist-packages/IPython/core/magics/execution.py in timeit(self, number)
130 gc.disable()
131 try:
--> 132 timing = self.inner(it, self.timer)
133 finally:
134 if gcold:
<magic-timeit> in inner(_it, _timer)
/usr/local/lib/python3.4/dist-packages/sknn/mlp.py in fit(self, X, y)
445 Returns this instance.
446 """
--> 447 return super(Regressor, self)._fit(X, y)
448
449 def predict(self, X):
/usr/local/lib/python3.4/dist-packages/sknn/mlp.py in _fit(self, *data, **extra)
364 "Try setting the `learning_rate` 10x lower to resolve this, for example:\n"
365 " learning_rate=%f" % (self.learning_rate * 0.1)))
--> 366 raise e
367
368 def _train(self, X, y, test=None):
/usr/local/lib/python3.4/dist-packages/sknn/mlp.py in _fit(self, *data, **extra)
355 def _fit(self, *data, **extra):
356 try:
--> 357 return self._train(*data, **extra)
358 except RuntimeError as e:
359 log.error("\n{}{}{}\n\n{}\n".format(
/usr/local/lib/python3.4/dist-packages/sknn/mlp.py in _train(self, X, y, test)
373
374 if not self.is_initialized:
--> 375 self._initialize(X, y)
376 X, y = self.train_set
377 else:
/usr/local/lib/python3.4/dist-packages/sknn/mlp.py in _initialize(self, X, y)
294
295 self.trainer = self._create_mlp_trainer(self.vs)
--> 296 self.trainer.setup(self.mlp, self.ds)
297
298 @property
/home/localadmin/src/pylearn2/pylearn2/training_algorithms/sgd.py in setup(self, model, dataset)
314
315 cost_value = self.cost.expr(model, nested_args,
--> 316 ** fixed_var_descr.fixed_vars)
317
318 if cost_value is not None and cost_value.name is None:
/home/localadmin/src/pylearn2/pylearn2/costs/mlp/__init__.py in expr(self, model, data, **kwargs)
44 space, sources = self.get_data_specs(model)
45 space.validate(data)
---> 46 return model.cost_from_X(data)
47
48 @wraps(Cost.is_stochastic)
/home/localadmin/src/pylearn2/pylearn2/models/mlp.py in cost_from_X(self, data)
1068 X, Y = data
1069 Y_hat = self.fprop(X)
-> 1070 return self.cost(Y, Y_hat)
1071
1072 def cost_from_X_data_specs(self):
/home/localadmin/src/pylearn2/pylearn2/models/mlp.py in cost(self, Y, Y_hat)
1041 def cost(self, Y, Y_hat):
1042
-> 1043 return self.layers[-1].cost(Y, Y_hat)
1044
1045 @wraps(Layer.cost_matrix)
/home/localadmin/src/pylearn2/pylearn2/models/mlp.py in cost(self, *args, **kwargs)
2247 def cost(self, *args, **kwargs):
2248
-> 2249 raise NotImplementedError()
2250
2251
NotImplementedError: