# What's the input shape for an SVM classifier?

I have a dataset with tensors (there are 12 classes) of shape (700,2000) - height is 700 and width is 2000. I would like to try to use an SVM classifier (just to see how it does). My question is - how do I input the data? Do I flatten it? So the input arrays would be 1 dimensional with length 700*2000?

• Can you clarify if (700, 2000) is the shape of the dataset, or of a single example in the dataset? Also, it might help to know what kind of software you're using. Jul 7, 2022 at 14:07

In general, the software is probably expecting an $$N$$ examples (or records) by $$M$$ (features) array as the input matrix $$X$$, plus a 1D array of length $$N$$ as the expected output labels (with 12 unique values, corresponding to the 12 classes).