I am trying to embed one-hot vectors, each with length 10000 and a corresponding label (0 or 1). With mini-batch size 10, the dimension of the input to my feedforward neural network model is 10 x 10000.
I am trying to embed this input with nn.Embedding(10000, 150).
So, after this embedding layer, my data becomes 10 x 10000 x 150. I am doing binary classification, so the output dimension is 10 x 10000 X 2. My label is of dimension 10 x 2. Either (1, 0) or (0, 1).
So, I get ValueError: Target size (torch.Size([10, 2])) must be the same as input size (torch.Size([10, 10000, 2]))
How can I make this model to work? Each vector of 10000 length corresponds to either a 0 or 1 for its label.