{"id":8753,"date":"2019-12-29T12:33:15","date_gmt":"2019-12-29T03:33:15","guid":{"rendered":"http:\/\/www.gisdeveloper.co.kr\/?p=8753"},"modified":"2020-05-28T09:49:53","modified_gmt":"2020-05-28T00:49:53","slug":"imdb%eb%a5%bc-%ed%86%b5%ed%95%b4-%eb%b6%84%ec%84%9d%ed%95%9c-%ec%9e%90%ec%97%b0%ec%96%b4-%ec%b2%98%eb%a6%ac%eb%a5%bc-%ec%9c%84%ed%95%9c-%ed%95%99%ec%8a%b5-db","status":"publish","type":"post","link":"http:\/\/www.gisdeveloper.co.kr\/?p=8753","title":{"rendered":"IMDB\ub97c \ud1b5\ud55c \uc790\uc5f0\uc5b4 \ucc98\ub9ac \ud559\uc2b5 DB \ubd84\uc11d"},"content":{"rendered":"<p>\uc2dc\uacc4\uc5f4 \ub370\uc774\ud130\ub294 \uacf5\uac04 \ub370\uc774\ud130\uc640 \ub9c8\ucc2c\uac00\uc9c0\ub85c \uadf8 \uc758\ubbf8\uac00 \ub9e4\uc6b0 \ud07d\ub2c8\ub2e4. \uc774\ubbf8 \uc874\uc7ac\ud558\ub294 \ub9ce\uc740 \ub370\uc774\ud130\ub294 \uc2dc\uac04\uc5d0 \ub530\ub77c \ucd95\ucc99\ub41c\ub2e4\ub294 \uc810\uc5d0\uc11c \ubcfc\ub54c \uac70\uc758 \ub300\ubd80\ubd84\uc758 \ub370\uc774\ud130\ub294 \uc2dc\uacc4\uc5f4\uc131\uc744 \uac16\uc2b5\ub2c8\ub2e4. \ub354\uc6b1\uc774 \uacf5\uac04 \ub370\uc774\ud130\uc640 \uc2dc\uacc4\uc5f4 \ub370\uc774\ud130\uac00 \uc735\ud569\ub418\uc5c8\uc744\ub54c \uadf8 \uc758\ubbf8\ub294 \ub354\uc6b1 \uac15\ud654\ub429\ub2c8\ub2e4. \uc2dc\uacc4\uc5f4 \ub370\uc774\ud130\ub85c\ub294 \ub2e8\uc5b4\ub4e4\uc758 \uc21c\uc11c\uc5d0 \ub530\ub77c \uadf8 \uc758\ubbf8\uac00 \ub2ec\ub77c\uc9c0\ub294 \ubb38\uc7a5\uacfc \uac19\uc740 \uc790\uc5f0\uc5b4 \ub4f1\uc774 \uc788\uc2b5\ub2c8\ub2e4. \ub525\ub7ec\ub2dd\uc5d0\uc11c \uc2e0\uacbd\ub9dd \ubaa8\ub378\ub3c4 \uc911\uc694\ud558\uc9c0\ub9cc, \uc2e0\uacbd\ub9dd\uc774 \uc720\ud6a8\ud55c \uae30\ub2a5 \uc791\uc6a9\uc744 \ud560 \uc218 \uc788\uac8c \ub9cc\ub4dc\ub294 \ud6c8\ub828\uc5d0\uc11c \ud65c\uc6a9\ub418\ub294 \ub370\uc774\ud130\uc14b \uc911 \uc2dc\uacc4\uc5f4 \ub370\uc774\ud130\ub97c \uc2e4\uc81c \uc2e0\uacbd\ub9dd\uc5d0 \uc8fc\uc785\uc2dc\ud0a4\uae30 \uc704\ud55c \ub0b4\ubd80\uc801\uc778 \uad6c\uc870\ub97c \uc815\ub9ac\ud574 \ubd05\ub2c8\ub2e4.<\/p>\n<p>RNN \uc2e0\uacbd\ub9dd\uc5d0\uc11c \uc0ac\uc6a9\ub418\ub294 \uc2dc\uacc4\uc5f4 \ub370\uc774\ud130\ub97c \uc190\uc27d\uac8c \uc77d\uc5b4\uc624\uae30 \uc704\ud574\uc11c PyTorch\uc5d0\uc11c\ub294 torchtext \ud328\ud0a4\uc9c0\ub97c \ud65c\uc6a9\ud569\ub2c8\ub2e4. \uc790\uc5f0\uc5b4\uc5d0 \ub300\ud55c \ub370\uc774\ud130\ub85c\uc368 IMDB\uac00 \uc788\ub294\ub370, \uc774 \ub370\uc774\ud130\uc14b\uc740 \uc601\ud654 \ub9ac\ubdf0\uc5d0 \ub300\ud55c \ud14d\uc2a4\ud2b8 \ubb38\uc7a5 \ub370\uc774\ud130\uc640 \uc774 \ub9ac\ubdf0\uac00 \uae0d\uc815\uc801\uc778\uc9c0 \ubd80\uc815\uc801\uc778\uc9c0\ub97c \ub098\ud0c0\ub0b4\ub294 \ub808\uc774\ube14 \ub370\uc774\ud130\ub85c \uad6c\uc131\ub429\ub2c8\ub2e4. \ud14d\uc2a4\ud2b8 \ubb38\uc7a5 \ub370\uc774\ud130\ub294 \uac01 \uc601\ud654 \ub9ac\ubdf0\uc5d0 \ub300\ud574 \ud558\ub098\uc758 \ud30c\uc77c\ub85c, \ub808\uc774\ube14 \ub370\uc774\ud130\ub294 \ud3f4\ub354\uba85\uc73c\ub85c \uc815\ud574\uc9d1\ub2c8\ub2e4.<\/p>\n<p>\uba3c\uc800 \uc544\ub798\uc758 \ucf54\ub4dc\ub294 IMDB\ub97c \ub2e4\uc6b4\ub85c\ub4dc \ubc1b\uace0, 2\uac1c\uc758 \ub370\uc774\ud130\uc14b\uc778 \ud6c8\ub828 \ub370\uc774\ud130\uc14b\uacfc \uc2dc\ud5d8 \ub370\uc774\ud130\uc14b\uc73c\ub85c \uad6c\uc131\ud558\ub77c\ub294 \ucf54\ub4dc\uc785\ub2c8\ub2e4.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">\r\nimport torch\r\nfrom torchtext import data, datasets\r\n\r\nTEXT = data.Field(sequential=True, batch_first=True, lower=True)\r\nLABEL = data.Field(sequential=False, batch_first=True)\r\n\r\ntrainset, testset = datasets.IMDB.splits(TEXT, LABEL)\r\n<\/pre>\n<p>\uc704\uc758 \ucf54\ub4dc\uac00 \uc2e4\ud589\ub418\uba74, trainset\uacfc testset\uc774\ub77c\ub294 dataset \uac1d\uccb4\uac00 \uc0dd\uc131\ub418\ub294\ub370\uc694. \uc774 dataset\uc758 \uad6c\uc131\uc740 \ub2e4\uc74c\uacfc \uac19\uc774 \uad6c\uc131\ub429\ub2c8\ub2e4.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.gisdeveloper.co.kr\/wp-content\/uploads\/2019\/12\/IMDB1.png\" alt=\"\" width=\"2097\" height=\"567\" class=\"aligncenter size-full wp-image-8754\" \/><\/p>\n<p>\uc774\uc81c \uc774 \ub370\uc774\ud130\uc14b\uc5d0 \ub2e8\uc5b4 \uc0ac\uc804\uc744 \uad6c\uc131\ud574\uc57c \ud558\ub294\ub370, \uc774\ub97c \uc704\ud55c \ucf54\ub4dc\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">\r\nTEXT.build_vocab(trainset, min_freq=10)\r\nLABEL.build_vocab(trainset)\r\n<\/pre>\n<p>TEXT \ud544\ub4dc\uc758 \uacbd\uc6b0 \ubb38\uc7a5\uc911 \ucd5c\uc18c 10\ubc88 \uc774\uc0c1 \ucd9c\ud604\ud55c \ub2e8\uc5b4\uc5d0 \ub300\ud574\uc11c\ub9cc \uc0ac\uc804\uc5d0 \ucd94\uac00\ud558\ub77c\ub294 \uc758\ubbf8\uc5d0\uc11c min_freq \uc778\uc790\uc5d0 10\uc744 \uc9c0\uc815\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4. \uacb0\uad6d \ub370\uc774\ud130\uc14b\uc5d0 \ub2e4\uc74c\uacfc \uac19\uc774 \uad6c\uc131\ub429\ub2c8\ub2e4.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.gisdeveloper.co.kr\/wp-content\/uploads\/2019\/12\/IMDB2.png\" alt=\"\" width=\"1951\" height=\"1433\" class=\"aligncenter size-full wp-image-8756\" \/><\/p>\n<p>\uc774\uc81c \uc774 \ub370\uc774\ud130\uc14b\uc744 \uc774\uc6a9\ud574 RNN \uc2e0\uacbd\ub9dd\uc758 \uc18c\uc911\ud55c \uc785\ub825 \ub370\uc774\ud130\ub97c \uc785\ub825\ud560 \uc218 \uc788\uac8c \ub429\ub2c8\ub2e4. \uc774\ub97c \uc704\ud574 \uac80\uc99d \ub370\uc774\ud130\uc14b\uae4c\uc9c0 \uad6c\uc131\ud558\uace0, \ubc30\uce58\ub2e8\uc704\ub85c \uc785\ub825 \ub370\uc774\ud130\ub97c \uad6c\uc131\ud560 \uc218 \uc788\ub3c4\ub85d \ub2e4\uc74c \ucf54\ub4dc\uac00 \ud544\uc694\ud560 \uac83\uc785\ub2c8\ub2e4.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">\r\ntrainset, valset = trainset.split(split_ratio=0.8)\r\ntrain_iter, val_iter, test_iter = data.BucketIterator.splits((trainset, valset, testset), batch_size=24, shuffle=True, repeat=False)\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\uc2dc\uacc4\uc5f4 \ub370\uc774\ud130\ub294 \uacf5\uac04 \ub370\uc774\ud130\uc640 \ub9c8\ucc2c\uac00\uc9c0\ub85c \uadf8 \uc758\ubbf8\uac00 \ub9e4\uc6b0 \ud07d\ub2c8\ub2e4. \uc774\ubbf8 \uc874\uc7ac\ud558\ub294 \ub9ce\uc740 \ub370\uc774\ud130\ub294 \uc2dc\uac04\uc5d0 \ub530\ub77c \ucd95\ucc99\ub41c\ub2e4\ub294 \uc810\uc5d0\uc11c \ubcfc\ub54c \uac70\uc758 \ub300\ubd80\ubd84\uc758 \ub370\uc774\ud130\ub294 \uc2dc\uacc4\uc5f4\uc131\uc744 \uac16\uc2b5\ub2c8\ub2e4. \ub354\uc6b1\uc774 \uacf5\uac04 \ub370\uc774\ud130\uc640 \uc2dc\uacc4\uc5f4 \ub370\uc774\ud130\uac00 \uc735\ud569\ub418\uc5c8\uc744\ub54c \uadf8 \uc758\ubbf8\ub294 \ub354\uc6b1 \uac15\ud654\ub429\ub2c8\ub2e4. \uc2dc\uacc4\uc5f4 \ub370\uc774\ud130\ub85c\ub294 \ub2e8\uc5b4\ub4e4\uc758 \uc21c\uc11c\uc5d0 \ub530\ub77c \uadf8 \uc758\ubbf8\uac00 \ub2ec\ub77c\uc9c0\ub294 \ubb38\uc7a5\uacfc \uac19\uc740 \uc790\uc5f0\uc5b4 \ub4f1\uc774 \uc788\uc2b5\ub2c8\ub2e4. \ub525\ub7ec\ub2dd\uc5d0\uc11c \uc2e0\uacbd\ub9dd \ubaa8\ub378\ub3c4 \uc911\uc694\ud558\uc9c0\ub9cc, \uc2e0\uacbd\ub9dd\uc774 \uc720\ud6a8\ud55c \uae30\ub2a5 \uc791\uc6a9\uc744 \ud560 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.gisdeveloper.co.kr\/?p=8753\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;IMDB\ub97c \ud1b5\ud55c \uc790\uc5f0\uc5b4 \ucc98\ub9ac \ud559\uc2b5 DB \ubd84\uc11d&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[132],"tags":[],"class_list":["post-8753","post","type-post","status-publish","format-standard","hentry","category-deep-machine-learning"],"_links":{"self":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/8753","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8753"}],"version-history":[{"count":9,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/8753\/revisions"}],"predecessor-version":[{"id":9343,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/8753\/revisions\/9343"}],"wp:attachment":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8753"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8753"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8753"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}