{"id":64,"date":"2019-06-12T15:07:36","date_gmt":"2019-06-12T07:07:36","guid":{"rendered":"http:\/\/49.234.15.231\/?p=64"},"modified":"2019-06-12T16:57:35","modified_gmt":"2019-06-12T08:57:35","slug":"pytorch_download","status":"publish","type":"post","link":"https:\/\/www.mustenaka.cn\/index.php\/2019\/06\/12\/pytorch_download\/","title":{"rendered":"PyTorch\u4e0b\u8f7d"},"content":{"rendered":"<h1>PyTorch\u7684\u4e0b\u8f7d\u547d\u4ee4<\/h1>\n<p>\u76ee\u524dPyTorch\u7684\u5b98\u7f51\u7248\u672c\u4e3a1.1\uff0c\u6700\u4f4e\u652f\u6301CUDA\u7684\u7248\u672c\u4e3a9.0\uff08\u8fd9\u5bf9\u4e8e\u5f88\u591a\u9879\u76ee\u800c\u8a00\u592a\u65b0\u4e86\uff09\uff0c\u4ee5\u4e0b\u662f\u5b98\u7f51\u4e2d\u5bf9\u4e8e\u4e0b\u8f7d\u7684\u4ecb\u7ecd\uff1a<\/p>\n<h2 id=\"start-locally\">START LOCALLY<\/h2>\n<div class=\"container-fluid quick-start-module quick-starts\">\n<div class=\"row\">\n<div class=\"col-md-12\">\n<p>Select your preferences and run the install command. Stable represents the most currently tested and supported version of PyTorch 1.1. This should be suitable for many users. Preview is available if you want the latest, not fully tested and supported, 1.1 builds that are generated nightly. Please ensure that you have\u00a0<b>met the prerequisites below (e.g., numpy)<\/b>, depending on your package manager. Anaconda is our recommended package manager since it installs all dependencies. You can also\u00a0<a href=\"https:\/\/pytorch.org\/get-started\/previous-versions\">install previous versions of PyTorch<\/a>. Note that LibTorch is only available for C++.<\/p>\n<h3><em>\u7ffb\u8bd1<\/em>\uff1a<\/h3>\n<p>\u5f00\u59cb\u4e0b\u8f7d\uff1a<\/p>\n<p>\u9009\u62e9\u9996\u9009\u9879\u5e76\u8fd0\u884cinstall\u547d\u4ee4\u3002 Stable\u4ee3\u8868PyTorch 1.1\u6700\u591a\u6d4b\u8bd5\u548c\u652f\u6301\u7684\u7248\u672c\u3002 \u8fd9\u5e94\u8be5\u9002\u5408\u7edd\u5927\u591a\u6570\u7528\u6237\u3002 \u5982\u679c\u60a8\u60f3\u8981\u4f7f\u7528\u6700\u65b0\u7684\u7248\u672c\u2014\u2014\u672a\u7ecf\u8fc7\u5b8c\u5168\u6d4b\u8bd5\u548c\u652f\u6301\u76841.1\u7248\u672c\uff0c\u5219\u53ef\u4ee5\u4f7f\u7528\u9884\u89c8\u7248\u672c\u3002 <strong>\u8bf7\u786e\u4fdd\u60a8\u5df2\u6ee1\u8db3\u4ee5\u4e0b\u5148\u51b3\u6761\u4ef6\uff08\u4f8b\u5982\uff0cnumpy\uff09<\/strong>\uff0c\u5177\u4f53\u53d6\u51b3\u4e8e\u60a8\u7684\u5305\u7ba1\u7406\u5668\u3002 Anaconda\u662f\u6211\u4eec\u63a8\u8350\u7684\u8f6f\u4ef6\u5305\u7ba1\u7406\u5668\uff0c\u56e0\u4e3a\u5b83\u5b89\u88c5\u4e86\u6240\u6709\u4f9d\u8d56\u9879\u3002 \u60a8\u8fd8\u53ef\u4ee5\u5b89\u88c5\u4ee5\u524d\u7248\u672c\u7684PyTorch\u3002 \u8bf7\u6ce8\u610f\uff0cLibTorch\u4ec5\u9002\u7528\u4e8eC ++\u3002<\/p>\n<p>(\u65e9\u671fPyTorch\u8fde\u63a5)\uff1a<\/p>\n<p><a href=\"https:\/\/pytorch.org\/get-started\/previous-versions\/\">https:\/\/pytorch.org\/get-started\/previous-versions\/<\/a><\/p>\n<p>\u63a5\u4e0b\u6765\u662f\u4e0b\u8f7d\u547d\u4ee4\uff1a<\/p>\n<p>conda\u7684\uff1a<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\">conda install pytorch torchvision cudatoolkit=9.0 -c pytorch       #cuda9.0\r\nconda install pytorch torchvision cudatoolkit=10.0 -c pytorch      #cuda10.0\r\nconda install pytorch-cpu torchvision-cpu -c pytorch               #cpu\u7248\u672c<\/code><\/pre>\n<p>pip\u7684\uff1a\uff08pip\u76ee\u524d\u7684\u6807\u51c6\u662f\u4f7f\u7528CUDA9.0\uff0c\u4ee5python3.6\u4e3a\u4f8b\uff09<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\">######################CUDA9.0\r\npip3 install torch torchvision\r\n######################CUDA10.0\r\npip3 install https:\/\/download.pytorch.org\/whl\/cu100\/torch-1.1.0-cp36-cp36m-linux_x86_64.whl\r\npip3 install https:\/\/download.pytorch.org\/whl\/cu100\/torchvision-0.3.0-cp36-cp36m-linux_x86_64.whl\r\n\r\n######################CPU\u7248\u672c\r\npip3 install https:\/\/download.pytorch.org\/whl\/cpu\/torch-1.1.0-cp36-cp36m-linux_x86_64.whl\r\npip3 install https:\/\/download.pytorch.org\/whl\/cpu\/torchvision-0.3.0-cp36-cp36m-linux_x86_64.whl<\/code><\/pre>\n<p>\u6e90\u7801\u76f4\u63a5\u4e0b\u8f7d\uff1a\uff08GitHub\u4e2d\uff09<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\"># Follow instructions at this URL: https:\/\/github.com\/pytorch\/pytorch#from-source\r\n##\u610f\u601d\u662f\u76f4\u63a5\u6253\u5f00\u8fd9\u4e2aURL\u8fde\u63a5\u8fdb\u884c\u76f8\u5173\u7684\u7248\u672c\u9009\u62e9\u4e0b\u8f7d##\r\n##\u5b89\u88c5\u64cd\u4f5c\u8ddf\u7740\u6559\u7a0b\u8d70\u5c31\u53ef\u4ee5##<\/code><\/pre>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>PyTorch\u7684\u4e0b\u8f7d\u547d\u4ee4 \u76ee\u524dPyTorch\u7684\u5b98\u7f51\u7248\u672c\u4e3a1.1\uff0c\u6700\u4f4e\u652f\u6301CUDA\u7684\u7248\u672c\u4e3a9.0\uff08\u8fd9\u5bf9 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,9],"tags":[12,11],"class_list":["post-64","post","type-post","status-publish","format-standard","hentry","category-ai","category-pytorch","tag-ai","tag-pytorch"],"views":3488,"_links":{"self":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts\/64","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/comments?post=64"}],"version-history":[{"count":4,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts\/64\/revisions"}],"predecessor-version":[{"id":68,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts\/64\/revisions\/68"}],"wp:attachment":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/media?parent=64"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/categories?post=64"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/tags?post=64"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}