Unable to figure issue in binary classifier

I am trying to build a binary classifier to classify pneumonia in radiology images. here is my model architecture

here is code to train the model

BEST_MODEL_PATH = 'best_model.pth'
best_accuracy = 0.0

optimizer = optim.SGD(model.parameters(), lr=0.001)

for epoch in range(NUM_EPOCHS):
    for images, labels in iter(train_loader):
        labels = labels.type(torch.FloatTensor)
        images = images.to(device)
        labels = labels.to(device)
        outputs = model(images)
        train_error_count += float(torch.sum(torch.abs(labels - outputs.argmax(1))))
        outputs = torch.squeeze(outputs)
        loss = nn.BCELoss()(outputs, labels)
    train_accuracy = 1.0 - float(train_error_count) / float(len(train_dataset))
    test_error_count = 0.0
    for images, labels in iter(test_loader):
        images = images.to(device)
        labels = labels.to(device)
        outputs = model(images)
        test_error_count += float(torch.sum(torch.abs(labels - outputs.argmax(1))))
    test_accuracy = 1.0 - float(test_error_count) / float(len(test_dataset))
    print('Epoch %d: train_acc =%f  test_acc =%f' % (epoch, train_accuracy, test_accuracy))
    if test_accuracy > best_accuracy:
        torch.save(model.state_dict(), BEST_MODEL_PATH)
        best_accuracy = test_accuracy
        print('Best Model Saved!!!')

I am unable to train it successfully because it is showing the following accuracy.

It would be great if anyone can identify a bug. I am a beginner in PyTorch so it would be helpful.
Thank you,

outputs.argmax(1) will return an all zero tensor, since your output has the shape [batch_size, 1].
To get the prediction after a sigmoid layer you could use a threshold such as:

preds = outputs > 0.5

Afterwards, you could calculate the accuracy or error by comparing the target tensor to this prediction tensor.