{"id":1674,"date":"2021-09-08T19:52:37","date_gmt":"2021-09-08T11:52:37","guid":{"rendered":"https:\/\/blog.iyatt.com\/?p=1674"},"modified":"2024-05-05T14:19:36","modified_gmt":"2024-05-05T06:19:36","slug":"%e5%ae%bd%e5%b8%a6%e9%a6%96%e6%ac%a1%e4%bd%bf%e7%94%a8%e6%93%8d%e4%bd%9c","status":"publish","type":"post","link":"https:\/\/blog.iyatt.com\/?p=1674","title":{"rendered":"MXNet \u7f16\u8bd1\u5b89\u88c5"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 ez-toc-wrap-center counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title ez-toc-toggle\" style=\"cursor:pointer\">\u76ee\u5f55<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/blog.iyatt.com\/?p=1674\/#%E4%BE%9D%E8%B5%96\" >\u4f9d\u8d56<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/blog.iyatt.com\/?p=1674\/#%E8%8E%B7%E5%8F%96%E6%BA%90%E7%A0%81\" >\u83b7\u53d6\u6e90\u7801<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/blog.iyatt.com\/?p=1674\/#%E5%8F%AF%E9%80%89%E6%89%A9%E5%B1%95\" >\u53ef\u9009\u6269\u5c55<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/blog.iyatt.com\/?p=1674\/#%E7%BC%96%E8%AF%91\" >\u7f16\u8bd1<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/blog.iyatt.com\/?p=1674\/#%E5%8F%AF%E8%83%BD%E9%81%87%E5%88%B0%E7%9A%84%E9%94%99%E8%AF%AF\" >\u53ef\u80fd\u9047\u5230\u7684\u9519\u8bef<\/a><\/li><\/ul><\/nav><\/div>\n\n<p>\u6d4b\u8bd5\u73af\u5883<\/p>\n\n\n\n<p>Android 11 &#8211; Termux 0.118 &#8211; Ubuntu 20.04 arm64<\/p>\n\n\n\n<p>Ubuntu 20.04 x86_64<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E4%BE%9D%E8%B5%96\"><\/span>\u4f9d\u8d56<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt install -y ccache cmake build-essential git libatlas-base-dev graphviz python3 python3-pip<\/pre>\n\n\n\n<p>OpenCV\uff1a<a rel=\"noreferrer noopener\" href=\"https:\/\/blog.iyatt.com\/?p=1243\" target=\"_blank\">https:\/\/blog.iyatt.com\/?p=1243<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E8%8E%B7%E5%8F%96%E6%BA%90%E7%A0%81\"><\/span>\u83b7\u53d6\u6e90\u7801<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u76ee\u524d\u6700\u65b0\u7a33\u5b9a\u7248 1.9.0 &#8211; 2022.1.21<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git clone --recursive  https:\/\/github.com\/apache\/incubator-mxnet.git --branch=1.9.0<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%8F%AF%E9%80%89%E6%89%A9%E5%B1%95\"><\/span>\u53ef\u9009\u6269\u5c55<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>GPU \uff08NVIDIA\uff09\u52a0\u901f\uff1a<a rel=\"noreferrer noopener\" href=\"https:\/\/blog.iyatt.com\/?p=2224\" target=\"_blank\">https:\/\/blog.iyatt.com\/?p=2224<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E7%BC%96%E8%AF%91\"><\/span>\u7f16\u8bd1<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">cd incubator-mxnet &amp;&amp; mkdir build &amp;&amp; cd build\n\n# \u65e0 GPU \u652f\u6301\n\u8bbe\u7f6e -DUSE_CUDA=OFF -DUSE_CUDNN=OFF\uff0c\u5220\u6389 -DCMAKE_CUDA_COMPILER\n\n# GPU \u652f\u6301\ncmake -DUSE_CUDA=ON -DUSE_CUDNN=ON -DCMAKE_CUDA_COMPILER=\/usr\/local\/cuda\/bin\/nvcc -DUSE_CPP_PACKAGE=ON -DBUILD_CPP_EXAMPLES=OFF -DUSE_BLAS=atlas -DCMAKE_BUILD_TYPE=release ..\n\nmake -j$(nproc)\n\nsudo make install  # C\n\ncd ..\/python\n\npython3 -m pip install .  # Python - Python \u662f\u8c03\u7528 C \u5e93\uff0c\u5b89\u88c5 Python \u7248\u5fc5\u987b\u5148\u5b89\u88c5 C \u7248\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%8F%AF%E8%83%BD%E9%81%87%E5%88%B0%E7%9A%84%E9%94%99%E8%AF%AF\"><\/span>\u53ef\u80fd\u9047\u5230\u7684\u9519\u8bef<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"600\" height=\"1000\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/01\/image-47.png\" alt=\"\" class=\"wp-image-2878 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/01\/image-47.png 600w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/01\/image-47-180x300.png 180w\" data-sizes=\"(max-width: 600px) 100vw, 600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 600px; --smush-placeholder-aspect-ratio: 600\/1000;\" \/><\/figure>\n\n\n\n<p>\u6211\u5728\u7f16\u8bd1\u65f6\u9047\u5230\u4e86\u627e\u4e0d\u5230 python \u7684\u9519\u8bef\uff0cPython3 \u662f\u786e\u5b9a\u5df2\u7ecf\u5b89\u88c5\u7684\uff0c\u5728 Linux \u4e2d\u76ee\u524d\u8c03\u7528 Python3 \u8981\u660e\u6307\u660e 3\uff0c\u800c python \u4ee3\u8868\u7684\u662f Python2\uff08\u672a\u5b89\u88c5\uff09\u3002\u56e0\u6b64\u6211\u7684\u89e3\u51b3\u65b9\u6848\u662f\u4e3a Python3 \u521b\u5efa\u4e00\u4e2a\u540d\u4e3a python \u7684\u8f6f\u94fe\u63a5\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo ln -s `which python3` \/usr\/bin\/python<\/pre>\n\n\n\n<p>\u7136\u540e\u518d\u6b21\u6267\u884c make \u7f16\u8bd1<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6d4b\u8bd5\u73af\u5883 Android 11 &#8211; Termux 0.118 &#8211; Ubuntu 20. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"zakra_page_container_layout":"customizer","zakra_page_sidebar_layout":"customizer","zakra_remove_content_margin":false,"zakra_sidebar":"customizer","zakra_transparent_header":"customizer","zakra_logo":0,"zakra_main_header_style":"default","zakra_menu_item_color":"","zakra_menu_item_hover_color":"","zakra_menu_item_active_color":"","zakra_menu_active_style":"","zakra_page_header":true,"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-1674","post","type-post","status-publish","format-standard","hentry","category-all"],"modified_by":"IYATT-yx","_links":{"self":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/posts\/1674","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1674"}],"version-history":[{"count":0,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/posts\/1674\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1674"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1674"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1674"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}