Yes, that’s right. I want to simulate a dataset of real world, since in the real world the classes are unbalanced. However, I need to adjust the network to learn the unbalanced classes.
I have tested your example code above and the accuracy was very low.