I have looked at the other post you linked.
Having read what you posted there, I think you were already on the right track.
I am not sure that what I am going to say now is “the final answer”, but concerning the shape issue, it would work if you combine your previous classifier



Problem with converting my LSTM multi-class classification model to a binary classification model


self.classifier = nn.Linear(n_hidden, n_classes) # where n_classes = 2


with your current one



 bbasaran:

self.classifier = nn.Sigmoid() 


So it would be something like:
self.classifier = nn.Sequential(nn.Linear(n_hidden, n_classes),
                                nn.Sigmoid())

With one more change!!!
Change the n_classes from 2 to 1. This might sound weird because you have two classes 0 and 1.
But as I explained in Tornikes Problem above, if you have a binary classification with labels being 0 and 1, you normally want your output to be a probability in range 0-1.
If this works you can further optimize it by taking out the nn.Sigmoid() and switch to nn.BCEWithLogitsLoss() as a loss function, as recommended by pytorch.
You can read about it above.