Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save haven-jeon/64d94d69cdd1f8d1d9ab0123c0ea4ef2 to your computer and use it in GitHub Desktop.
Save haven-jeon/64d94d69cdd1f8d1d9ab0123c0ea4ef2 to your computer and use it in GitHub Desktop.
GluonNLP Attention API 활용법
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"from konlpy.tag import Mecab\n",
"from mxnet.gluon import nn, rnn\n",
"from mxnet import gluon, autograd\n",
"import gluonnlp as nlp\n",
"from mxnet import nd \n",
"import mxnet as mx\n",
"import multiprocessing as mp\n",
"import time\n",
"import itertools\n",
"from tqdm import tqdm\n",
"from matplotlib import font_manager, rc\n",
"from matplotlib import pyplot as plt\n",
"%matplotlib inline\n",
"\n",
"rc('font', family='NanumGothic')\n",
"mecab = Mecab()\n"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"rating = pd.read_csv(\"../../../part1/examples/naver_review/ratings.txt\",sep='\\t')"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>id</th>\n",
" <th>document</th>\n",
" <th>label</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>199970</th>\n",
" <td>10258554</td>\n",
" <td>이게 왜 이렇게 높은지 모르겠네요..</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199971</th>\n",
" <td>306234</td>\n",
" <td>필름 낭비하고자 기를 쓰는 영화.</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199972</th>\n",
" <td>5906178</td>\n",
" <td>전개가 일단 원작에 비해 생략도 많고 .. 권투씬도 졸려서 잠오고..</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199973</th>\n",
" <td>10188249</td>\n",
" <td>진짜 재미없네요. 볼까 말까 하다가 본 제가 다 멍청한듯</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199974</th>\n",
" <td>8449365</td>\n",
" <td>전윤수 미인도에서 9살 어린여자아이 옷벗기는 장면 명백한 아동학대범죄이다. 18금영...</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199975</th>\n",
" <td>307000</td>\n",
" <td>삐질삐질;;</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199976</th>\n",
" <td>5502875</td>\n",
" <td>업로드 좀 빨리해라 어제부터 기다리는데...</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199977</th>\n",
" <td>8682884</td>\n",
" <td>가지고 있는 이야기에 비해 정말로 수준떨어지는 연출, 편집...</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199978</th>\n",
" <td>10211978</td>\n",
" <td>그린스크린 수정도 안하고 홍콩에서 시어스 타워가보인단다 ㄷㄷ 마이클 베이 가 영화를...</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199979</th>\n",
" <td>3781237</td>\n",
" <td>2.9점이면 적당하네요</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199980</th>\n",
" <td>5535592</td>\n",
" <td>0점은 없나? 짜증나--</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199981</th>\n",
" <td>4645862</td>\n",
" <td>영상은 좋으나 반전까지 보기엔 산만하고 지루하고 개연성이떨어진다.. 평점에낚였네</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199982</th>\n",
" <td>7432883</td>\n",
" <td>헐 미쳣다 이영화가이평점이라닠ㅋㅋㅋㅋ</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199983</th>\n",
" <td>9986958</td>\n",
" <td>아 진짜 너무 오글거린다... 못봐줄정도네....</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199984</th>\n",
" <td>6624437</td>\n",
" <td>미국인이나,일본인이 아니면,제대로 만든 상업용 애니메이션을 해올수 있는,인력이 없다...</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199985</th>\n",
" <td>8597016</td>\n",
" <td>내평점을 지운듯하다.. 그 당시 봤을때, 너무 밋밋하고 임팩트 없는 내용이 대부분이...</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199986</th>\n",
" <td>9191516</td>\n",
" <td>지브리라는 이름이 아까운...스토리가 빈약하고 뜬금없는 요소도 많고. 어린 아이들이...</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199987</th>\n",
" <td>9177798</td>\n",
" <td>정극에는 도무지 어울리지 않는 조니뎁, 혁신적이나 클래식하진않은 촬영기법, 거울을 ...</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199988</th>\n",
" <td>8312249</td>\n",
" <td>설리에 관한 모든것 인줄 아랐네 ㅡㅡ</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199989</th>\n",
" <td>5711373</td>\n",
" <td>재미없고 억지스럽다</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199990</th>\n",
" <td>5465496</td>\n",
" <td>장르는 무협인데 내가 보기엔 코믹이던데 막장 평점 2점도 아깝다</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199991</th>\n",
" <td>8965828</td>\n",
" <td>나치입장에서 본 영화가 갑자기 연속으로 나오네? 뭔일 있었나...</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199992</th>\n",
" <td>2228930</td>\n",
" <td>태권도???</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199993</th>\n",
" <td>417815</td>\n",
" <td>음 왜 봤을까? 예고편이 다 -</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199994</th>\n",
" <td>4834376</td>\n",
" <td>개연성이 없어요.. 별루다...</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199995</th>\n",
" <td>8963373</td>\n",
" <td>포켓 몬스터 짜가 ㅡㅡ;;</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199996</th>\n",
" <td>3302770</td>\n",
" <td>쓰.레.기</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199997</th>\n",
" <td>5458175</td>\n",
" <td>완전 사이코영화. 마지막은 더욱더 이 영화의질을 떨어트린다.</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199998</th>\n",
" <td>6908648</td>\n",
" <td>왜난 재미없었지 ㅠㅠ 라따뚜이 보고나서 스머프 봐서 그런가 ㅋㅋ</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>199999</th>\n",
" <td>8548411</td>\n",
" <td>포풍저그가나가신다영차영차영차</td>\n",
" <td>0</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" id document label\n",
"199970 10258554 이게 왜 이렇게 높은지 모르겠네요.. 0\n",
"199971 306234 필름 낭비하고자 기를 쓰는 영화. 0\n",
"199972 5906178 전개가 일단 원작에 비해 생략도 많고 .. 권투씬도 졸려서 잠오고.. 0\n",
"199973 10188249 진짜 재미없네요. 볼까 말까 하다가 본 제가 다 멍청한듯 0\n",
"199974 8449365 전윤수 미인도에서 9살 어린여자아이 옷벗기는 장면 명백한 아동학대범죄이다. 18금영... 0\n",
"199975 307000 삐질삐질;; 0\n",
"199976 5502875 업로드 좀 빨리해라 어제부터 기다리는데... 0\n",
"199977 8682884 가지고 있는 이야기에 비해 정말로 수준떨어지는 연출, 편집... 0\n",
"199978 10211978 그린스크린 수정도 안하고 홍콩에서 시어스 타워가보인단다 ㄷㄷ 마이클 베이 가 영화를... 0\n",
"199979 3781237 2.9점이면 적당하네요 0\n",
"199980 5535592 0점은 없나? 짜증나-- 0\n",
"199981 4645862 영상은 좋으나 반전까지 보기엔 산만하고 지루하고 개연성이떨어진다.. 평점에낚였네 0\n",
"199982 7432883 헐 미쳣다 이영화가이평점이라닠ㅋㅋㅋㅋ 0\n",
"199983 9986958 아 진짜 너무 오글거린다... 못봐줄정도네.... 0\n",
"199984 6624437 미국인이나,일본인이 아니면,제대로 만든 상업용 애니메이션을 해올수 있는,인력이 없다... 0\n",
"199985 8597016 내평점을 지운듯하다.. 그 당시 봤을때, 너무 밋밋하고 임팩트 없는 내용이 대부분이... 0\n",
"199986 9191516 지브리라는 이름이 아까운...스토리가 빈약하고 뜬금없는 요소도 많고. 어린 아이들이... 0\n",
"199987 9177798 정극에는 도무지 어울리지 않는 조니뎁, 혁신적이나 클래식하진않은 촬영기법, 거울을 ... 0\n",
"199988 8312249 설리에 관한 모든것 인줄 아랐네 ㅡㅡ 0\n",
"199989 5711373 재미없고 억지스럽다 0\n",
"199990 5465496 장르는 무협인데 내가 보기엔 코믹이던데 막장 평점 2점도 아깝다 0\n",
"199991 8965828 나치입장에서 본 영화가 갑자기 연속으로 나오네? 뭔일 있었나... 0\n",
"199992 2228930 태권도??? 0\n",
"199993 417815 음 왜 봤을까? 예고편이 다 - 0\n",
"199994 4834376 개연성이 없어요.. 별루다... 0\n",
"199995 8963373 포켓 몬스터 짜가 ㅡㅡ;; 0\n",
"199996 3302770 쓰.레.기 0\n",
"199997 5458175 완전 사이코영화. 마지막은 더욱더 이 영화의질을 떨어트린다. 0\n",
"199998 6908648 왜난 재미없었지 ㅠㅠ 라따뚜이 보고나서 스머프 봐서 그런가 ㅋㅋ 0\n",
"199999 8548411 포풍저그가나가신다영차영차영차 0"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"rating.tail(30)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"dataset = [(d, l) for d,l in zip(rating['document'], rating['label'])]"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"seq_len = 30"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"length_clip = nlp.data.PadSequence(seq_len, pad_val=\"<pad>\")\n",
"\n",
"def preprocess(data):\n",
" comment, label = data\n",
" morphs = mecab.morphs(str(comment).strip())\n",
" return(length_clip(morphs), label)\n",
"\n",
"def preprocess_dataset(dataset):\n",
" start = time.time()\n",
" with mp.Pool() as pool:\n",
" dataset = gluon.data.SimpleDataset(pool.map(preprocess, dataset))\n",
" end = time.time()\n",
" print('Done! Tokenizing Time={:.2f}s, #Sentences={}'\n",
" .format(end - start, len(dataset)))\n",
" return dataset"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Done! Tokenizing Time=9.77s, #Sentences=200000\n"
]
}
],
"source": [
"preprocessed = preprocess_dataset(dataset)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(['어릴',\n",
" '때',\n",
" '보',\n",
" '고',\n",
" '지금',\n",
" '다시',\n",
" '봐도',\n",
" '재밌',\n",
" '어요',\n",
" 'ㅋㅋ',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>'],\n",
" 1)"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"preprocessed[0]"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
"counter = nlp.data.count_tokens(itertools.chain.from_iterable([c for c, _ in preprocessed]))\n",
"\n",
"vocab = nlp.Vocab(counter,bos_token=None, eos_token=None, min_freq=15)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"preprocessed_encoded = [(vocab[data], label) for data, label in preprocessed ]"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"train, test = nlp.data.train_valid_split(preprocessed_encoded, valid_ratio=0.1)"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
"batchify_fn = nlp.data.batchify.Tuple(nlp.data.batchify.Stack(),\n",
" nlp.data.batchify.Stack('float32'))"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"train_dataloader = gluon.data.DataLoader(train, batch_size=100, batchify_fn=batchify_fn, shuffle=True, last_batch='discard')\n",
"test_dataloader = gluon.data.DataLoader(test, batch_size=100, batchify_fn=batchify_fn, shuffle=True, last_batch='discard')\n"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(100, 30)\n"
]
}
],
"source": [
"for data, label in train_dataloader:\n",
" print(data.shape)\n",
" break"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
"class SentClassificationModelAtt(gluon.HybridBlock):\n",
" def __init__(self, vocab_size, num_embed, seq_len, hidden_size, **kwargs):\n",
" super(SentClassificationModelAtt, self).__init__(**kwargs)\n",
" self.seq_len = seq_len\n",
" self.hidden_size = hidden_size \n",
" with self.name_scope():\n",
" self.embed = nn.Embedding(input_dim=vocab_size, output_dim=num_embed)\n",
" self.drop = nn.Dropout(0.3)\n",
" self.bigru = rnn.GRU(self.hidden_size,dropout=0.2, bidirectional=True)\n",
" self.attention = nlp.model.MLPAttentionCell(30, dropout=0.2)\n",
" self.dense = nn.Dense(2) \n",
" def hybrid_forward(self, F ,inputs):\n",
" em_out = self.drop(self.embed(inputs))\n",
" bigruout = self.bigru(em_out).transpose((1,0,2))\n",
" ctx_vector, weigth_vector = self.attention(bigruout, bigruout)\n",
" outs = self.dense(ctx_vector) \n",
" return(outs, weigth_vector)"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
"ctx = mx.gpu()\n",
"\n",
"#모형 인스턴스 생성 및 트래이너, loss 정의 \n",
"model = SentClassificationModelAtt(vocab_size = len(vocab.idx_to_token), num_embed=50, seq_len=seq_len, hidden_size=30)\n"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
"model.initialize(mx.init.Xavier(),ctx=ctx)"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
"trainer = gluon.Trainer(model.collect_params(), 'adam')\n",
"loss = gluon.loss.SoftmaxCrossEntropyLoss()"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"SentClassificationModelAtt(\n",
" (dense): Dense(None -> 2, linear)\n",
" (bigru): GRU(None -> 30, TNC, dropout=0.2, bidirectional)\n",
" (drop): Dropout(p = 0.3, axes=())\n",
" (embed): Embedding(8303 -> 50, float32)\n",
" (attention): MLPAttentionCell(\n",
" (_dropout_layer): Dropout(p = 0.2, axes=())\n",
" (_act): Activation(tanh)\n",
" (_key_mid_layer): Dense(None -> 30, linear)\n",
" (_query_mid_layer): Dense(None -> 30, linear)\n",
" (_attention_score): Dense(30 -> 1, linear)\n",
" )\n",
")\n"
]
}
],
"source": [
"print(model)"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"ExecuteTime": {
"end_time": "2017-12-17T08:09:11.112480Z",
"start_time": "2017-12-17T08:09:11.107263Z"
}
},
"outputs": [],
"source": [
"model.hybridize()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### 학습 "
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [],
"source": [
"def evaluate_accuracy(model, data_iter, ctx=ctx):\n",
" acc = mx.metric.Accuracy()\n",
" for i, (data, label) in enumerate(data_iter):\n",
" data = data.as_in_context(ctx)\n",
" label = label.as_in_context(ctx)\n",
" output, _ = model(data.T)\n",
" predictions = nd.argmax(output, axis=1)\n",
" acc.update(preds=predictions, labels=label)\n",
" return(acc.get()[1])"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"ExecuteTime": {
"end_time": "2017-12-17T08:09:18.821490Z",
"start_time": "2017-12-17T08:09:18.813080Z"
}
},
"outputs": [],
"source": [
"def calculate_loss(model, data_iter, loss_obj, ctx=ctx):\n",
" test_loss = []\n",
" for i, (te_data, te_label) in enumerate(data_iter):\n",
" te_data = te_data.as_in_context(ctx)\n",
" te_label = te_label.as_in_context(ctx)\n",
" with autograd.predict_mode():\n",
" te_output, _ = model(te_data.T)\n",
" loss_te = loss_obj(te_output, te_label)\n",
" curr_loss = nd.mean(loss_te).asscalar()\n",
" test_loss.append(curr_loss)\n",
" return(np.mean(test_loss))"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {
"ExecuteTime": {
"end_time": "2017-12-17T08:12:53.863045Z",
"start_time": "2017-12-17T08:09:24.910904Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 1800/1800 [01:06<00:00, 26.96it/s]\n",
" 0%| | 3/1800 [00:00<01:07, 26.76it/s]"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Epoch 0. Train Loss: 0.36828366, Test Loss : 0.3297405, Test Accuracy : 0.85735\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 1800/1800 [01:06<00:00, 27.04it/s]\n",
" 0%| | 3/1800 [00:00<01:06, 26.86it/s]"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Epoch 1. Train Loss: 0.3086045, Test Loss : 0.3247741, Test Accuracy : 0.85945\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 1800/1800 [01:06<00:00, 27.03it/s]\n",
" 0%| | 3/1800 [00:00<01:08, 26.19it/s]"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Epoch 2. Train Loss: 0.2874814, Test Loss : 0.32170543, Test Accuracy : 0.8627\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 1800/1800 [01:06<00:00, 27.06it/s]\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Epoch 3. Train Loss: 0.2719606, Test Loss : 0.31289443, Test Accuracy : 0.86415\n"
]
}
],
"source": [
"epochs = 4\n",
"\n",
"\n",
"tot_test_loss = []\n",
"tot_test_accu = []\n",
"tot_train_loss = []\n",
"for e in range(epochs):\n",
" train_loss = []\n",
" #batch training \n",
" for i, (data, label) in enumerate(tqdm(train_dataloader)):\n",
" data = data.as_in_context(ctx)\n",
" label = label.as_in_context(ctx)\n",
" with autograd.record():\n",
" output, _ = model(data.T)\n",
" loss_ = loss(output, label)\n",
" loss_.backward()\n",
" trainer.step(data.shape[0])\n",
"\n",
" curr_loss = nd.mean(loss_).asscalar()\n",
" train_loss.append(curr_loss)\n",
"\n",
" #caculate test loss\n",
" test_loss = calculate_loss(model, test_dataloader, loss_obj = loss, ctx=ctx) \n",
" test_accu = evaluate_accuracy(model, test_dataloader, ctx=ctx)\n",
"\n",
" print(\"Epoch %s. Train Loss: %s, Test Loss : %s, Test Accuracy : %s\" % (e, np.mean(train_loss), test_loss, test_accu)) \n",
" tot_test_loss.append(test_loss)\n",
" tot_train_loss.append(np.mean(train_loss))\n",
" tot_test_accu.append(test_accu)\n",
" "
]
},
{
"cell_type": "code",
"execution_count": 72,
"metadata": {},
"outputs": [],
"source": [
"sent = '가지고 있는 이야기에 비해 정말로 수준떨어지는 연출, 편집'\n",
"\n",
"morphs = mecab.morphs(str(sent).strip())\n",
"len_raw = len(morphs)\n",
"seqs = length_clip(morphs)\n",
"onehot_seq = vocab(seqs)"
]
},
{
"cell_type": "code",
"execution_count": 73,
"metadata": {},
"outputs": [],
"source": [
"ret, weight = model(nd.array([onehot_seq],ctx=ctx).T)"
]
},
{
"cell_type": "code",
"execution_count": 74,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"\n",
"[[ 2.3831623 -2.5675967]]\n",
"<NDArray 1x2 @gpu(0)>"
]
},
"execution_count": 74,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ret"
]
},
{
"cell_type": "code",
"execution_count": 75,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['가지',\n",
" '고',\n",
" '있',\n",
" '는',\n",
" '이야기',\n",
" '에',\n",
" '비해',\n",
" '정말로',\n",
" '수준',\n",
" '떨어지',\n",
" '는',\n",
" '연출',\n",
" ',',\n",
" '편집',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>',\n",
" '<pad>']"
]
},
"execution_count": 75,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"seqs"
]
},
{
"cell_type": "code",
"execution_count": 76,
"metadata": {},
"outputs": [],
"source": [
"mat = np.corrcoef(weight.asnumpy()[0,][:len_raw,:len_raw])"
]
},
{
"cell_type": "code",
"execution_count": 77,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAUIAAAEOCA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uWK3xnJFBjUlPQH8vcEh04EnC1RRpHzUHXWPlro3sj2jwPmRdH1WTzNP2t6jSF1lqUxD2IykO5uE/e5Y+ag76h4LdY9m8URHCGHMi4YwhDDmjaaGcPYIlo+6o+6xUPeoNWrGCEMIoV2jqUcYQghtiYYwhDDmRUMYQhjzoiEMIYx50RCGEMa8/w9kZYe0spUifQAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 432x288 with 2 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"\n",
"alpha = seqs[:len_raw]\n",
"\n",
"\n",
"fig = plt.figure()\n",
"ax = fig.add_subplot(1,1,1)\n",
"cax = ax.matshow(mat)\n",
"fig.colorbar(cax)\n",
"\n",
"plt.xticks(np.arange(len_raw))\n",
"plt.yticks(np.arange(len_raw))\n",
"ax.set_xticklabels(alpha, rotation='vertical')\n",
"ax.set_yticklabels(alpha)\n",
"\n",
"#plt.show()\n",
"plt.savefig('attention_weight.png', format='png', dpi=300)"
]
},
{
"cell_type": "code",
"execution_count": 65,
"metadata": {
"ExecuteTime": {
"end_time": "2017-12-17T08:17:24.140031Z",
"start_time": "2017-12-17T08:17:24.051574Z"
}
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYkAAAETCAYAAADDIPqYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xl8VPW9//HXJzuBBJIQCCEkrIqCbCK4Ky6tWhVbWxdob9t7f+5b9Xa7S2+xi62211v3lvZeaxHQWhTcWuu+i0UIqIgSthDCEhKWELJOPr8/ZoBJzJAAmUyW9/PxmEfmbHM+OYTznu9ZvsfcHRERkZbExboAERHpvBQSIiISkUJCREQiUkiIiEhECg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fZEK9KdqCUhIiIRqSUhIiIRKSRERCQihYSIiESkkBARkYgUEiIiEtH/B7ZXWd1XGLscAAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.plot(tot_train_loss)\n",
"plt.plot(tot_test_loss)\n",
"plt.title('model loss')\n",
"plt.ylabel('loss')\n",
"plt.xlabel('epoch')\n",
"plt.legend(['train', 'valid'], loc='upper left')\n",
"plt.show()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.2"
},
"toc": {
"nav_menu": {},
"number_sections": true,
"sideBar": true,
"skip_h1_title": false,
"toc_cell": false,
"toc_position": {},
"toc_section_display": "block",
"toc_window_display": false
}
},
"nbformat": 4,
"nbformat_minor": 2
}
@haven-jeon
Copy link
Author

haven-jeon commented Sep 8, 2018

You can download "../../../part1/examples/naver_review/ratings.txt" from "https://github.com/e9t/nsmc".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment