{"id":360,"date":"2019-07-08T17:19:57","date_gmt":"2019-07-08T08:19:57","guid":{"rendered":"https:\/\/aiandstory.net\/?p=360"},"modified":"2019-07-08T17:19:58","modified_gmt":"2019-07-08T08:19:58","slug":"post-360","status":"publish","type":"post","link":"https:\/\/aiandstory.net\/?p=360","title":{"rendered":"B-1.Python\u3068Keras\u306b\u3088\u308b\u30c7\u30a3\u30fc\u30d7\u30e9\u30fc\u30cb\u30f3\u30b0"},"content":{"rendered":"\n<a target=\"_blank\"  href=\"https:\/\/www.amazon.co.jp\/gp\/product\/4839964262\/ref=as_li_tl?ie=UTF8&#038;camp=247&#038;creative=1211&#038;creativeASIN=4839964262&#038;linkCode=as2&#038;tag=aiandstory-22&#038;linkId=92d39079571f35c02ef461f3e72dacd4\" rel=\"noopener\"><img decoding=\"async\" border=\"0\" src=\"\/\/ws-fe.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&#038;MarketPlace=JP&#038;ASIN=4839964262&#038;ServiceVersion=20070822&#038;ID=AsinImage&#038;WS=1&#038;Format=_SL250_&#038;tag=aiandstory-22\" ><\/a><img decoding=\"async\" loading=\"lazy\" src=\"\/\/ir-jp.amazon-adsystem.com\/e\/ir?t=aiandstory-22&#038;l=am2&#038;o=9&#038;a=4839964262\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" style=\"border:none !important; margin:0px !important;\" \/>\n\n\n\n<p>\u30ab\u30d0\u30fc\u30a4\u30e9\u30b9\u30c8\u306e\u30da\u30eb\u30b7\u30e3\u4eba\u5973\u6027\u304c\u8a98\u3046\u3001Keras\u89e3\u8aac\u672c\u306e\u539f\u70b9\u306b\u3057\u3066\u6700\u9ad8\u5091\u4f5c\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u30ab\u30d0\u30fc\u30a4\u30e9\u30b9\u30c8\u306b\u306f\u300c\uff11\uff15\uff18\uff16\u5e74\u306e\u30da\u30eb\u30b7\u30e3\u4eba\u5973\u6027\u306e\u670d\u88c5\u300d\u3068\u3044\u3046\u984c\u540d\u304c\u3064\u3051\u3089\u308c\u3066\u3044\u308b\u305d\u3046\u3060\u304c\u3001\u6ca2\u5c71\u3042\u308b\u6280\u8853\u66f8\u306e\u4e2d\u3067\u3001\u5b58\u5728\u611f\u306e\u3042\u308b\u7570\u8272\u306e\u8868\u7d19\u3060\u3002<br>\u8457\u8005\u306fKeras\u958b\u767a\u8005\u306e\u30d5\u30e9\u30f3\u30bd\u30ef\u30fb\u30b7\u30e7\u30ec\u3002<br>Keras\u306e\u30b7\u30f3\u30d7\u30eb\u3055\u3068\u7406\u89e3\u3057\u3084\u3059\u3055\u306f\u3001\u4ed6\u306e\u6a5f\u68b0\u5b66\u7fd2\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306e\u8ffd\u968f\u3092\u8a31\u3055\u306a\u3044\u304c\u3001\u305d\u308c\u306f\u8457\u8005\u306e\u5353\u8d8a\u3057\u305f\u601d\u8003\u529b\u3068\u62bd\u8c61\u5316\u80fd\u529b\u306e\u8a3c\u3060\u308d\u3046\u3002<\/p>\n\n\n\n<p>\u672c\u66f8\u306f\u4e8c\u3064\u306e\u30d1\u30fc\u30c8\u306b\u5206\u304b\u308c\u3066\u3044\u308b\u3002<\/p>\n\n\n\n<p>\u524d\u534a\u306e\u30d1\u30fc\u30c8\u306f\u30c7\u30a3\u30fc\u30d7\u30e9\u30fc\u30cb\u30f3\u30b0\u306e\u89e3\u8aac\u3060\u304c\u3001\u6570\u5f0f\u306e\u4ee3\u308f\u308a\u306bPython\u3068Keras\u304c\u591a\u7528\u3055\u308c\u3066\u3044\u308b\u3002\u4f8b\u3048\u3070\u30c6\u30f3\u30bd\u30eb\u306e\u8aac\u660e\u3067\u306f\u3001\u6570\u5b66\u7684\u306a\u5b9a\u7fa9\u306e\u4ee3\u308f\u308a\u306b\u3001Python\u306eNumPy(\u6ce8\uff11)\u306b\u304a\u3051\u308b\u3001\uff10\u304b\u3089\uff13\u6b21\u5143\u306e\u30c6\u30f3\u30bd\u30eb\u306e\u5b9a\u7fa9\u304c\u793a\u3055\u308c\u3066\u3044\u308b\u3002<br>\uff12\u6b21\u5143\u30c6\u30f3\u30bd\u30eb\u3092\u8a18\u53f7\u3067\u5b9a\u7fa9\u3059\u308b\u3088\u308a\u3082\u3001\u4ee5\u4e0b(\u6ce8\uff12)\u306e\u3088\u3046\u306b\u8a18\u8f09\u3057\u305f\u65b9\u304c\u30a4\u30e1\u30fc\u30b8\u3057\u3084\u3059\u3044\u3068\u3044\u3046\u914d\u616e\u3060\u308d\u3046\u3002<\/p>\n\n\n\n<p>ar =  np.array([[1, 5, 4, 3], [3, 8, 4, 2], [11, 2, 5, 9]])<\/p>\n\n\n\n<p>\u3053\u3046\u3044\u3063\u305f\u914d\u616e\u306f\u6700\u9069\u5316\u6cd5\u3084\u8aa4\u5dee\u9006\u4f1d\u642c\u6cd5\u306e\u89e3\u8aac\u3067\u3082\u5171\u901a\u3057\u3066\u3044\u308b\u3002<br>\u307e\u305f\u3001\u30c7\u30a3\u30fc\u30d7\u30e9\u30fc\u30cb\u30f3\u30b0\u306e\u5e7e\u4f55\u5b66\u7684\u89e3\u91c8\u306a\u3069\u3001\u77ed\u3044\u304c\u6a5f\u68b0\u5b66\u7fd2\u306e\u672c\u8cea\u306b\u8feb\u308b\u30bb\u30af\u30b7\u30e7\u30f3\u3082\u6563\u308a\u3070\u3081\u3089\u308c\u3066\u3044\u308b\u3002<\/p>\n\n\n\n<p>\u5f8c\u534a\u306e\u30d1\u30fc\u30c8\u306fKeras\u3092\u4f7f\u3063\u305f\u4f8b\u984c\u306e\u89e3\u8aac\u304c\u96c6\u3081\u3089\u308c\u3066\u3044\u308b\u3002<\/p>\n\n\n\n<p>\u5185\u5bb9\u306f\u753b\u50cf\u51e6\u7406\u3001\u30c6\u30ad\u30b9\u30c8\u306a\u3069\u306e\u30b7\u30fc\u30b1\u30f3\u30b9\u51e6\u7406\u3001\u53ca\u3073LSTM\u3092\u4f7f\u3063\u305f\u30c6\u30ad\u30b9\u30c8\u751f\u6210\u306a\u3069\u30aa\u30fc\u30bd\u30c9\u30c3\u30af\u30b9\u306a\u5185\u5bb9\u304b\u3089\u59cb\u307e\u308a\u3001DeepDream\u3084\u3001\u5909\u5206\u30aa\u30fc\u30c8\u30a8\u30f3\u30b3\u2015\u30c0\u3068\u6575\u5bfe\u7684\u751f\u6210\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u3088\u3046\u306a\u5fdc\u7528\u3078\u3068\u9032\u3080\u3002\u3059\u3079\u3066\u306e\u5b9f\u88c5\u4f8b\u306fKeras\u3067\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u77ed\u304f\u7c21\u6f54\u3067\u3001\u5404\u6280\u8853\u3092\u7406\u89e3\u3059\u308b\u52a9\u3051\u3068\u306a\u308b\u3060\u308d\u3046\u3002<\/p>\n\n\n\n<p>Keras\u3092\u4f7f\u3063\u305f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u8aad\u307f\u3084\u3059\u3055\u306f\u3001\u3053\u306e\u672c\u306e\u4fa1\u5024\u3092\u9ad8\u3081\u3066\u3044\u308b\u3068\u8a00\u3048\u308b\u3002\u3053\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u30fc\u306f\u62bd\u8c61\u5316\u30ec\u30d9\u30eb\u306f\u9ad8\u3044\u6bb5\u968e\u306b\u3042\u308a\u3001\u307e\u308b\u3067\u81ea\u7136\u8a00\u8a9e\u306e\u3088\u3046\u306b\u8aad\u307f\u9032\u3080\u4e8b\u304c\u3067\u304d\u308b\u3002<br>\u4f8b\u3048\u3070\u6b21\u306e\u4f8b(\u6ce8\uff12)\u306f\u3001512\u6b21\u5143\u306e\u30c7\u30fc\u30bf\u3092\u53d7\u3051\u53d6\u308a\u300164\u500b\u306e\u51fa\u529b\u30e6\u30cb\u30c3\u30c8\u3092\u6301\u3064\u5168\u7d50\u5408\u5c64(Dense)\u3092\uff12\u3064\u7e4b\u3044\u3060\u6642\u306e\u5b9f\u88c5\u4f8b\u3002<\/p>\n\n\n\n<p>#512\u6b21\u5143\u306e\u30c7\u30fc\u30bf\u30fc\uff1e64\u500b\u306e\u51fa\u529b\u30e6\u30cb\u30c3\u30c8\u3092\u6301\u3064\u5168\u7d50\u5408\u5c64(Dense)\u00d7\uff12 <br>model = Sequential()<br>model.add(Dense(64, input_shape(512, )))<br>model.add(Dense(64))<\/p>\n\n\n\n<p>Sequential()\u306e\u547c\u3073\u51fa\u3057\u306fKeras\u7279\u6709\u306e\u6c7a\u307e\u308a\u4e8b\u3060\u304c\u3001Dense\u306e\uff12\u884c\u306f\u975e\u5e38\u306b\u30b7\u30f3\u30d7\u30eb\u3067\u5206\u304b\u308a\u3084\u3059\u3044\u3002\u3053\u306e\u4f8b\u306e\u3088\u3046\u306b\u3001\u8aad\u8005\u304cPython\u3068Keras\u306b\u6163\u308c\u3066\u3044\u306a\u304f\u3066\u3082\u3001\u3042\u307e\u308a\u8e93\u304b\u305a\u306b\u8aad\u307f\u9032\u3080\u4e8b\u304c\u3067\u304d\u308b\u3060\u308d\u3046\u3002<\/p>\n\n\n\n<p>\u30c7\u30a3\u30fc\u30d7\u30e9\u30fc\u30cb\u30f3\u30b0\u306e\u5165\u9580\u66f8\u3001\u5b66\u7fd2\u66f8\u3001\u8a73\u7d30\u306a\u53c2\u8003\u66f8\u306a\u3069\u306f\u7121\u6570\u306b\u3042\u308b\u304c\u3001\u826f\u66f8\u3092\u898b\u3064\u3051\u308b\u306e\u306f\u96e3\u3057\u3044\u3002\u3082\u3057\u3042\u306a\u305f\u304c\u5148\u306b\u9032\u3081\u306a\u3044\u3067\u3044\u308b\u306e\u306a\u3089\u3001\u305c\u3072\u3053\u306e\u672c\u3092\u624b\u306b\u53d6\u3063\u3066\u6b32\u3057\u3044\u3002<br>Keras\u306b\u5c0e\u304b\u308c\u3066\u3001\u304d\u3063\u3068\u6b21\u306e\u6bb5\u968e\u306b\u9032\u3080\u3053\u3068\u304c\u3067\u304d\u308b\u3060\u308d\u3046\u3002<\/p>\n\n\n\n<p>\uff08\u6ce8\uff11\uff09NumPy\uff1a\u9ad8\u6c34\u6e96\u306e\u6570\u5b66\u95a2\u6570\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u5229\u7528\u3067\u304d\u308b\u3002<br>\uff08\u6ce8\uff12\uff09\u8457\u66f8\u306e\u5f15\u7528\u3067\u306f\u306a\u3044\u305f\u3081\u3001\u540c\u69d8\u306e\u8a18\u8ff0\u306f\u3053\u306e\u672c\u306b\u306f\u542b\u307e\u308c\u306a\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30ab\u30d0\u30fc\u30a4\u30e9\u30b9\u30c8\u306e\u30da\u30eb\u30b7\u30e3\u4eba\u5973\u6027\u304c\u8a98\u3046\u3001Keras\u89e3\u8aac\u672c\u306e\u539f\u70b9\u306b\u3057\u3066\u6700\u9ad8\u5091\u4f5c\u3002 \u3053\u306e\u30ab\u30d0\u30fc\u30a4\u30e9\u30b9\u30c8\u306b\u306f\u300c\uff11\uff15\uff18\uff16\u5e74\u306e\u30da\u30eb\u30b7\u30e3\u4eba\u5973\u6027\u306e\u670d\u88c5\u300d\u3068\u3044\u3046\u984c\u540d\u304c\u3064\u3051\u3089\u308c\u3066\u3044\u308b\u305d\u3046\u3060\u304c\u3001\u6ca2\u5c71\u3042\u308b\u6280\u8853\u66f8\u306e\u4e2d\u3067\u3001\u5b58\u5728\u611f\u306e\u3042\u308b\u7570\u8272\u306e\u8868\u7d19\u3060\u3002 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[22],"tags":[17,11,13,23],"_links":{"self":[{"href":"https:\/\/aiandstory.net\/index.php?rest_route=\/wp\/v2\/posts\/360"}],"collection":[{"href":"https:\/\/aiandstory.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aiandstory.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aiandstory.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aiandstory.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=360"}],"version-history":[{"count":10,"href":"https:\/\/aiandstory.net\/index.php?rest_route=\/wp\/v2\/posts\/360\/revisions"}],"predecessor-version":[{"id":370,"href":"https:\/\/aiandstory.net\/index.php?rest_route=\/wp\/v2\/posts\/360\/revisions\/370"}],"wp:attachment":[{"href":"https:\/\/aiandstory.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=360"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aiandstory.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=360"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aiandstory.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=360"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}