Thanks for reply,
Because i want to compute sklearn.metrics.roc_curve(), so i am using my code like this, it is right?

output = torch.sigmoid( model(image) )
y_pred = output.cpu().numpy().flatten() >= 0.5
y_true = mask.flatten()
roc_curve(y_true , y_pred)