Your code is quite long so it’s a bit tedious to debug it.
Also, I’ve formatted it for better readability. You can add code snippets using three backticks ``` 
Could you check the validation outputs and the corresponding targets?
Is your model predicting just a single class?
Also, are you dealing with an imbalanced dataset?