Model fit on 1 of classes

I have a 2-class categorization problem. Using the convolution network, I have created a model that I want to categorize. But in the training phase, the model predicts only one class.
For example, it predicts output 1 for both class 0 and class 1.

Can anyone guide me?

Can you post your training loop?