Please provide more information, otherwise it’s difficult to know where is your bug. How many gpus you have, and how you write the code to copy to cuda, and maybe your batch size is too large?
By the way, it would be better not to use Chinese to post your problem. It’s not beneficial for you to seek a solution. Therefore, please use English, to get it caught by more viewers.