prediction.eq(target.data)  returns a byte tensor/variable. Summing it up and dividing it by a batchsize would lead to zero.
Try it with
accuracy = (prediction.eq(target.data).float().sum()/batch_size)*100