{"id":219477,"date":"2021-06-13T10:46:15","date_gmt":"2021-06-13T02:46:15","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=219477"},"modified":"2021-05-25T08:47:00","modified_gmt":"2021-05-25T00:47:00","slug":"pytorch-gpu-solution","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/pytorch-gpu-solution.html","title":{"rendered":"\u89e3\u51b3pytorch-gpu \u5b89\u88c5\u5931\u8d25\u65b9\u6848"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | \u8fd9\u7bc7\u6587\u7ae0\u4e3b\u8981\u4ecb\u7ecd\u4e86\u89e3\u51b3pytorch-gpu \u5b89\u88c5\u5931\u8d25\u7684\u8bb0\u5f55\uff0c\u5177\u6709\u5f88\u597d\u7684\u53c2\u8003\u4ef7\u503c\uff0c\u5e0c\u671b\u5bf9\u5927\u5bb6\u6709\u6240\u5e2e\u52a9\u3002\u5982\u6709\u9519\u8bef\u6216\u672a\u8003\u8651\u5b8c\u5168\u7684\u5730\u65b9\uff0c\u671b\u4e0d\u541d\u8d50\u6559<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n ubuntu18 \u7cfb\u7edf\u4e0a\u5df2\u7ecf\u914d\u7f6e\u597dgpu\u52a0\u901f\u73af\u5883<\/p>\n \u5b89\u88c5pytorch-gpu \u540e\u51fa\u73b0\u4ee5\u4e0b\u95ee\u9898\uff1a<\/strong><\/span><\/div>\n \r\nimport torch\r\nx = torch.Tensor(2,3)\r\nx_cuda = x.cuda()\r\n<\/pre>\n |