I have a dataset of 21 input features and 1 class label ranging from 0-3.
I’m quite new to PyTorch and I simply don’t see how I can have multiple fully-connected layers with the OH-Encoded target list at the end. Here is what I have so far, after a day of experimentation -
class NeuralNetwork(nn.Module):
def __init__(self):
super(NeuralNetwork, self).__init__()
self.linear_relu_stack = nn.Sequential(
nn.Linear(21, 42),
nn.ReLU(),
nn.Linear(42, 21),
nn.ReLU(),
nn.Linear(21, 10),
nn.ReLU(),
nn.Linear(10, 1),
nn.ReLU()
)
def forward(self, x):
logits = self.linear_relu_stack(x)
return logits
If nothing else, I was planning on normalizing the target column as well, but of course that is a very crude idea. I would like to know how I can use one-hot encoded labels as my target.
I’m using the Quickstart tutorial as a reference.