I guess the indexing might be wrong in this loop:
    for i in range(0,len(model_output)):
      if(model_output[:,i]>0.5 and batch_y[:,i]>0):
        count+=1
      elif((model_output[:,i]<0.5) and (batch_y[:,i]==0)):
        count+=1
      else:
        continue

While i will take numbers in range(model_output.size(0)), you are indexing at dim1, which seems wrong.
Usually you don’t need the loop, but can directly compute the accuracy via:
preds = outputs > 0.5
nb_correct = (preds == batch_y).sum()

assuming a sigmoid was applied on outputs.
PS: It’s generally better to use nn.BCEWithLogitsLoss and pass the raw logits into this criterion for numerical stability.