Everything works when you use the code given in the tutorial?
I cannot see any main issue why adding a layer would fail. Well you seem to miss
output = self.softmax(output)

in your forward() method.
In practice, an accuracy of 0% can’t be right. The tutorial shows a classification task, so just by chance some predictions should be correct. Without any training, the accuracy of a classification model us usually around 1/#num_classes which more or less represents guessing.