Sorry for the late reply.
I upload my code to github and here is the link 39 for BaseTrainer which include training phase and validation phase, and test phase in BaseTester 4.In the begining, it computed metric(like MIoU and Accuracy) in numpy on cpu, after improved(change to gpu), the utilization is higher and stable in training phase, but I am still not sure for my metrics 2 are correct.
I think there are still many problems in my code.
Thank you for your help.