I am having a binary classification task.
My network
def set_parameter_requires_grad(model, feature_extracting):
    if feature_extracting:
        for param in model.parameters():
            param.requires_grad = False

model = models.resnet18(pretrained=True)

set_parameter_requires_grad(model, True)

model.fc = nn.Sequential(nn.Linear(in_features=512, out_features=1, bias=True))

loss vs epochs curve(orange is validation loss)

But when I get the predictions, all the outputs are near 0.5 (which is like the model was not trained at all)
Since the loss function used was nn.BCEWithLogitsLoss(), I added an explicit sigmoid while generating the predictions.
The way I generate the predictions
transformed = data_transforms(pil_img)
label = model(transformed.float().to(device).unsqueeze(0))
label = sigmoid(label.cpu().detach().numpy())

Can you please help me.