Discuss / 编程 / 跑在gpu上的话,会出错

跑在gpu上的话,会出错

Topic source

mzzzZ09

#1 Created at ... [Delete] [Delete and Lock User]

需要把inputs和labels 放到cuda上

     for batch, (inputs, labels) in enumerate(dataloader):

+        inputs = inputs.to(device)

+        labels = labels.to(device)

廖雪峰

#2 Created at ... [Delete] [Delete and Lock User]

👍 说明你真跑了


  • 1

Reply