0

저는 기계 학습에 새로운 사람이고 질문이 있습니다. 나는 following this tutorial입니다. LSTM과 RNN에 대해 읽었습니다. , 내가받지 못하고있는 무슨 지금RNN 출력과 규칙 기반 출력의 차이점은 무엇입니까?

Iter= 20000, Average Loss= 0.531466, Average Accuracy= 84.60% 
['the', 'sly', 'and'] - [treacherous] vs [treacherous] 
Optimization Finished! 
Elapsed time: 12.159853319327036 min 
Run on command line. 
    tensorboard --logdir=/tmp/tensorflow/rnn_words 
Point your web browser to: http://localhost:6006/ 
3 words: ,hello wow and 
Word not in dictionary 
3 words: mouse,mouse,mouse 
3 words: mouse 
3 words: mouse mouse mouse 
mouse mouse mouse very well , but who is to bell the cat approaches the until will at one another and take mouse a receive some signal of her approach , we he easily escape 
3 words: 3 words: had a general 
had a general to proposal to make round the neck will all agree , said he easily at and enemy approaches to consider what common the case . you will all agree , said he 
3 words: mouse mouse mouse 
mouse mouse mouse very well , but who is to bell the cat approaches the until will at one another and take mouse a receive some signal of her approach , we he easily escape 
3 words: what was cat 
what was cat up and said he is all very well , but who is to bell the cat approaches the until will at one another and take mouse a receive some signal of her 
3 words: mouse fear cat 
Word not in dictionary 
3 words: mouse tell cat 
Word not in dictionary 
mo3 words: mouse said cat 
Word not in dictionary 
3 words: mouse fear fear 
Word not in dictionary 
3 words: mouse ring bell 
Word not in dictionary 
m3 words: mouse ring ring 
Word not in dictionary 
3 words: mouse bell bell 
mouse bell bell and general to make round the neck will all agree , said he easily at and enemy approaches to consider what common the case . you will all agree , said he 
3 words: mouse and bell 
mouse and bell this means we should always , but looked is young always , but looked is young always , but looked is young always , but looked is young always , but looked 
3 words: mouse was bell 
mouse was bell and said he is all very well , but who is to bell the cat approaches the until will at one another and take mouse a receive some signal of her approach 
3 words: 

:

Training data is this :

출력은 : 나는 훈련을 완료하고 지금은 시험에 대한 몇 가지 문자열을 준, 튜토리얼에서 제공하는 코드를 사용하고 실행 내가 3 개의 단어를 줄 때 정규 표현식이나 규칙 기반 코드를 통해 쉽게 달성 할 수있는 것과 같은 결과를 파일에 입력 한 단어가 이전 문장이나 다음 문장을 가져 오는 것처럼 if-else를 사용하여 얻을 수 있습니다. 다른가? 설명해주십시오.

가끔은 단어가 dict이 아니므로 교육용 파일에있는 단어 만 제공해야합니다. 교육용 데이터에서 일치하는 inout 단어를 사용하고 파일에서 일부 결과를 가져 오는 것이 좋습니다. 다른 모듈을 사용하지 않고 순수한 프로그래밍을 한 경우와 똑같은 점이 다릅니다. 어떻게 다른가?

답변

0

귀하의 교육 데이터 세트는 ~ 180 단어 밖에 없으며 84.6 % (교육)의 정확도를 달성하고 있으므로 과도하게 오버 라이팅됩니다. 본질적으로, 모델은 단순히 훈련 데이터를 기반으로 가장 가능성이 높은 다음 단어를 예측합니다.

일반적으로 언어 모델은 PTB 또는 1B 단어 벤치 마크와 같이 훨씬 더 큰 데이터 세트에서 학습됩니다. PTB는 10 만 단어로 구성된 작은 데이터 세트이며 1B 단어 벤치 마크에는 10 억 단어가 있습니다.

RNN 모델에는 단어 또는 문자를 인코딩 할 수있는 제한된 어휘가 있습니다. 어휘 크기는 모델에 따라 다릅니다. PTB에서 훈련하는 대부분의 단어 모델은 10,000 개의 어휘 크기를 가지고 있으며 이는 가장 일반적인 단어에 충분합니다.