pytorch 中model=model.to(device)用法,这代表将模型加载到指定设备上。 ... 代表的使用cpu,而device=torch.device("cuda")则代表的使用GPU。
確定! 回上一頁