Nengo classify using CSV dataset

Thanks for you response. You mentioned "flattening image matrices:, however, I am using a CSV file? Would it still work please?

Hello @CodeHelp1, it doesn’t matter what the data source is. Taking an example for images, I can save the pixel values in a CSV file in a single row (with the label in the last column). In this case however, while trying to run a 2D CNN model, I would be required to read the pixel values from the CSV file and then rearrange them in a 2D image shape.

You of course cannot expect to read the CSV files with pandas and feed it to LMUs. You need to investigate how the data is structured in your CSV file and what are the shape requirements of the data to be fed in LMUs. And then if the current data structure in your CSV file doesn’t match to the expected shape of data to the LMUs, you need to appropriately reshape them. You can find a number of tutorials using numpy to reshape matrices accordingly. In fact the LMU article I have mentioned shows an example on how 2D images are reshape to proper data format for LMUs to work upon. Following statement is from the linked article:

“Sequential” MNIST refers to taking the pixels of the images and flattening 
them into a sequence of single pixels. Each pixel will be presented to the 
network one at a time, and the goal of the network is to classify the 
sequence according to which digit it represents.

So you need to take inspiration from such data re-structuring and accordingly structure your CSV data.