2

I initialized ds = SupervisedDataSet(12288,1) and add data ds.appendLinked(im3.flatten(),10) where im3 is an openCV picture. and this is my trainer -> trainer = BackpropTrainer(red, ds)

When the running process reach BackpropTrainer, i get an AssertionError on backprop.py line 35 self.setData(dataset).

It's a pybrain error on Windows, I developed it on Linux and it run without problem. I don't know what else to do, I tried to reinstall all but it still gets the same error. Can anyone help me?

  • Can you paste more of your code, which version of pybrain you have installed, and the full stacktrace of the assertion error? – COOLZXxX Oct 10 '14 at 14:59
  • It was the last version until that date. The funny thing is that it worked on Linux Ubuntu and not on Windows 7 32 bit. – Javier Fonseca Oct 10 '14 at 18:33

1 Answers1

0

The assert statement checks if a condition is true. In this case, if the inner dimension (indim) of your network is the same as your dataset, ds. Check if im3.flatten() is igual 12288

assert ds.indim == network.indim # 12288 != im3.flatten(), error!