Thank you for point out. I do not think about that problem. I followed the example from ENet implementation  https://github.com/iArunava/ENet-Real-Time-Semantic-Segmentation 17
https://github.com/iArunava/ENet-Real-Time-Semantic-Segmentation/blob/master/ENet-Real_Time_Semantic_Segmentation.ipynb 21
If you do not mind how I can change the my code to yours?
I mean for example if I use the batch size 4 in the 2 GPU in that cases, I have to connect 2 labels and calculate the class weights?