As the warning explains, your output and target do not have the same shape and thus will be broadcasted.
Make sure to pass both tensors as [batch_size, 1] to the criterion by unsqueezing the target via:
target = target.unsqueeze(1)

This might also fix the negative accuracy (although I don’t know, how you are calculating it).
PS: You can post code snippets by wrapping them into three backticks ```, which makes debugging easier.