{"id":2631,"date":"2021-02-21T23:04:30","date_gmt":"2021-02-21T14:04:30","guid":{"rendered":"https:\/\/obenkyolab.com\/?p=2631"},"modified":"2022-01-29T00:32:59","modified_gmt":"2022-01-28T15:32:59","slug":"windows10%e3%81%abkeras%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab","status":"publish","type":"post","link":"https:\/\/obenkyolab.com\/?p=2631","title":{"rendered":"Windows10\u306bKeras\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b"},"content":{"rendered":"\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_80 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/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:\/\/obenkyolab.com\/?p=2631\/#%E6%A6%82%E8%A6%81\" >\u6982\u8981<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/obenkyolab.com\/?p=2631\/#%E7%92%B0%E5%A2%83\" >\u74b0\u5883<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/obenkyolab.com\/?p=2631\/#Keras%E3%81%AB%E9%96%A2%E3%81%99%E3%82%8B%E7%90%86%E8%A7%A3\" >Keras\u306b\u95a2\u3059\u308b\u7406\u89e3<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/obenkyolab.com\/?p=2631\/#Step1_TensorFlow%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\" >Step1 : TensorFlow\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/obenkyolab.com\/?p=2631\/#pip%E3%81%AE%E3%82%A2%E3%83%83%E3%83%97%E3%82%B0%E3%83%AC%E3%83%BC%E3%83%89\" >pip\u306e\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/obenkyolab.com\/?p=2631\/#TensorFlow%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\" >TensorFlow\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/obenkyolab.com\/?p=2631\/#Step2_Keras%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\" >Step2 : Keras\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/obenkyolab.com\/?p=2631\/#Step3_import%E3%81%97%E3%81%A6%E7%A2%BA%E8%AA%8D\" >Step3 : import\u3057\u3066\u78ba\u8a8d<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"\u6982\u8981\"><span class=\"ez-toc-section\" id=\"%E6%A6%82%E8%A6%81\"><\/span>\u6982\u8981<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u521d\u5fc3\u8005\u3067\u3082\u6271\u3044\u3084\u3059\u3044Python\u306e\u30c7\u30a3\u30fc\u30d7\u30e9\u30fc\u30cb\u30f3\u30b0\u7528\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u3057\u3066keras\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4eca\u56de\u306fWindows10\u4e0a\u306b\u69cb\u7bc9\u3057\u305fpython\u306e\u4eee\u60f3\u74b0\u5883\u306b\u3053\u306eKeras\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u74b0\u5883\"><span class=\"ez-toc-section\" id=\"%E7%92%B0%E5%A2%83\"><\/span>\u74b0\u5883<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Windows10<\/li><li>python3.8(Anaconda\u4e0d\u4f7f\u7528)<\/li><li>venv\u306b\u3088\u308b\u4eee\u60f3\u74b0\u5883<\/li><\/ul>\n\n\n\n<p>\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3067\u4f5c\u6210\u3057\u305f\u74b0\u5883\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-it-learning wp-block-embed-it-learning\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"F2Ib47auOM\"><a href=\"https:\/\/obenkyolab.com\/?p=2582\">\u3010Python\u3011Windows\u3067Python+JupyterLab\u74b0\u5883\u306e\u69cb\u7bc9<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;\u3010Python\u3011Windows\u3067Python+JupyterLab\u74b0\u5883\u306e\u69cb\u7bc9&#8221; &#8212; Obenkyolab\" src=\"https:\/\/obenkyolab.com\/?p=2582&#038;embed=true#?secret=G47NWG4fMU#?secret=F2Ib47auOM\" data-secret=\"F2Ib47auOM\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"keras\u306b\u95a2\u3059\u308b\u7406\u89e3\"><span class=\"ez-toc-section\" id=\"Keras%E3%81%AB%E9%96%A2%E3%81%99%E3%82%8B%E7%90%86%E8%A7%A3\"><\/span>Keras\u306b\u95a2\u3059\u308b\u7406\u89e3<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Keras\u306e\u516c\u5f0f\u30b5\u30a4\u30c8\u3067\u306f\u4ee5\u4e0b\u306e\u8aac\u660e\u304c\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>Keras\u306f\uff0cPython\u3067\u66f8\u304b\u308c\u305f\uff0c<a href=\"https:\/\/github.com\/tensorflow\/tensorflow\">TensorFlow<\/a>\u307e\u305f\u306f<a href=\"https:\/\/github.com\/Microsoft\/cntk\">CNTK<\/a>\uff0c<a href=\"https:\/\/github.com\/Theano\/Theano\">Theano<\/a>\u4e0a\u3067\u5b9f\u884c\u53ef\u80fd\u306a\u9ad8\u6c34\u6e96\u306e\u30cb\u30e5\u30fc\u30e9\u30eb\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\uff0e Keras\u306f\uff0c\u8fc5\u901f\u306a\u5b9f\u9a13\u3092\u53ef\u80fd\u306b\u3059\u308b\u3053\u3068\u306b\u91cd\u70b9\u3092\u7f6e\u3044\u3066\u958b\u767a\u3055\u308c\u307e\u3057\u305f\uff0e&nbsp;<\/p><cite>https:\/\/keras.io\/ja\/#keras<\/cite><\/blockquote>\n\n\n\n<p>\u79c1\u306f\u300c\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3092TensorFlow\u3068\u3057\u3066\u3044\u308b\u30cb\u30e5\u30fc\u30e9\u30eb\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3067\u4f7f\u7528\u3057\u3084\u3059\u3044API\u300d\u3068\u3044\u3046\u5c11\u3005\u5f37\u5f15\u306a\u7406\u89e3\u3092\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u516c\u5f0f\u30b5\u30a4\u30c8\u3067\u306f\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3092TnsorFlow, CNTK, Theano\u306e\u4e2d\u3067\u3082TensorFlow\u3092\u63a8\u5968\u3057\u3066\u3044\u308b\u69d8\u5b50\u3067\u3057\u305f\u306e\u3067TensorFlow\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304b\u3089Keras\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"tensorflow\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\"><span class=\"ez-toc-section\" id=\"Step1_TensorFlow%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\"><\/span>Step1 : TensorFlow\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><a href=\"https:\/\/www.tensorflow.org\/install\/pip\" data-type=\"URL\" data-id=\"https:\/\/www.tensorflow.org\/install\/pip\">\u516c\u5f0f<\/a>\u306b\u3042\u308bTensorFlow\u306epip\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u8aac\u660e\u306b\u5f93\u3063\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u884c\u3044\u307e\u3059\u3002\u500b\u4eba\u7684\u306b\u3001\u307e\u305a\u306f\u516c\u5f0f\u30b5\u30a4\u30c8\u3092\u898b\u3066\u30c8\u30e9\u30a4\u3059\u308b\u3001\u3068\u3044\u3046\u59ff\u52e2\u304c\u5927\u4e8b\u3060\u3068\u601d\u3063\u3066\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"pip\u306e\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\"><span class=\"ez-toc-section\" id=\"pip%E3%81%AE%E3%82%A2%E3%83%83%E3%83%97%E3%82%B0%E3%83%AC%E3%83%BC%E3%83%89\"><\/span>pip\u306e\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>pip\u306e\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3092\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>pip install --upgrade pip<\/code><\/pre><\/div>\n\n\n\n<p>\u79c1\u306e\u74b0\u5883\u3067\u306f20.3.3\u304b\u308921.0.1\u306b\u4e0a\u304c\u308a\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"tensorflow\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\"><span class=\"ez-toc-section\" id=\"TensorFlow%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\"><\/span>TensorFlow\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>pip install --upgrade tensorflow<\/code><\/pre><\/div>\n\n\n\n<p>\u4ee5\u4e0a\u3067TensorFlow\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u5b8c\u4e86\u3067\u3059\u3002\u306a\u304a\u3001\u516c\u5f0f\u3067\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u78ba\u8a8d\u3068\u3057\u3066\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3082\u8f09\u3063\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>python -c &quot;import tensorflow as tf;print(tf.reduce_sum(tf.random.normal([1000, 1000])))&quot;<\/code><\/pre><\/div>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step2-keras\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\"><span class=\"ez-toc-section\" id=\"Step2_Keras%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\"><\/span>Step2 : Keras\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Keras\u3082<a href=\"https:\/\/keras.io\/ja\/#_2\" data-type=\"URL\" data-id=\"https:\/\/keras.io\/ja\/#_2\">\u516c\u5f0f<\/a>\u306b\u5f93\u3044\u5b9f\u65bd\u3057\u307e\u3059\u3002\u3068\u3044\u3063\u3066\u3082TensorFlow\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u5f8c\u306bpip\u3059\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>pip install keras<\/code><\/pre><\/div>\n\n\n\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3059\u308b\u3068\u30e6\u30fc\u30b6\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u914d\u4e0b\u306b.keras\u30d5\u30a9\u30eb\u30c0\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002(\u30d5\u30a9\u30eb\u30c0\u5185\u306b\u306fkeras.json\u304c\u5165\u3063\u3066\u307e\u3059\u3002)<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step3-import\u3057\u3066\u78ba\u8a8d\"><span class=\"ez-toc-section\" id=\"Step3_import%E3%81%97%E3%81%A6%E7%A2%BA%E8%AA%8D\"><\/span>Step3 : import\u3057\u3066\u78ba\u8a8d<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u6700\u5f8c\u306bjupyter\u304b\u3089keras\u3092import\u3057\u3066\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>import keras<\/code><\/pre><\/div>\n\n\n\n<p>\u4ee5\u4e0a\u3067\u7d42\u4e86\u3067\u3059\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u6b21\u56de\u306fkeras\u3092\u5b9f\u969b\u306b\u4f7f\u3063\u3066\u3044\u308d\u3044\u308d\u3068\u8a66\u3057\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981 \u521d\u5fc3\u8005\u3067\u3082\u6271\u3044\u3084\u3059\u3044Python\u306e\u30c7\u30a3\u30fc\u30d7\u30e9\u30fc\u30cb\u30f3\u30b0\u7528\u30e9\u30a4\u30d6\u30e9&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":1218,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"ja","_original_post":"https:\/\/obenkyolab.com\/?p=2631","footnotes":""},"categories":[53],"tags":[99],"class_list":["post-2631","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-53","tag-keras","ja"],"_links":{"self":[{"href":"https:\/\/obenkyolab.com\/index.php?rest_route=\/wp\/v2\/posts\/2631","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/obenkyolab.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/obenkyolab.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/obenkyolab.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/obenkyolab.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2631"}],"version-history":[{"count":15,"href":"https:\/\/obenkyolab.com\/index.php?rest_route=\/wp\/v2\/posts\/2631\/revisions"}],"predecessor-version":[{"id":4734,"href":"https:\/\/obenkyolab.com\/index.php?rest_route=\/wp\/v2\/posts\/2631\/revisions\/4734"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/obenkyolab.com\/index.php?rest_route=\/wp\/v2\/media\/1218"}],"wp:attachment":[{"href":"https:\/\/obenkyolab.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2631"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/obenkyolab.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2631"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/obenkyolab.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2631"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}