判断model在cuda上

1
next(model.parameters()).is_cuda # returns a boolean
请作者喝一杯咖啡☕️