I have a dataset that looks like this:
The labels are basically a list of items (let's say, cars in a parking lot) I am given, where there are 10 of them in total, labeled from 0 to 10. I have 14 classes (let's say, 14 different car brands). Every float point value is just percentage of which class that particular item belongs to. For example, Item 2 is likely class 2 with a probability of 0.995275:
print(set(list(df['label'])))
> {0, 1, 2, 3, 4, 5, 6, 7, 9}
My goal is to train a classifier to output an integer from 0 to 14 to predict what class label x belongs to.
I am trying to build a feedforward NN with 3 hidden layers (+ input and output layers) and takes 15 inputs and outputs a prediction from 0 to 14. This is what I've designed so far:
class NNO(nn.Module):
def __init__(self):
super(NNO, self).__init__()
h= [2,1]
self.hidden = nn.Linear(h[0], h[1])
self.hidden = nn.Linear(2,20)
self.hidden = nn.Linear(20,20)
self.output = nn.Linear(20,15)
self.sigmoid = nn.Sigmoid()
self.softmax = nn.Softmax(dim = 1)
def forward(self, y):
x = self.hidden(x)
x = self.sigmoid(x)
x = self.output(x)
x = self.softmax(x)
My question is this. How do I feed the dataset to my NN to start training the epochs? I couldn't find any resource that pertains to a dataset like this.