reshape is not an inplace operation, so you need to assign the return value to another object:
xb = xb.reshape(-1, 784)

Generally, I would recommend to use this approach:
xb = xb.view(xb.size(0), -1)

to keep the batch dimension and to get a better error message in case the feature dimension is incorrect.
Also, you wouldn’t need to reshape the activations, as the linear layers should already return the expected output.