Based on the code I assume you are using sigmoid as your last non-linearity?
How are you displaying the prediction result?
I’m trying to figure out, if the metric calculation might be wrong (a perfect score is always suspicious) or if the visualization just displays the prediction in a wrong way.