0

私は機械学習の新人です。私はfollowing this tutorialです。私はLSTMとRNNについて読んでいます。私は、チュートリアルが提供するコードを使用して、それを実行し、それがトレーニングを完了し、今私はテストのために、いくつかの文字列を与えた:RNN出力とルールベース出力の違いは何ですか?

Training data is this :

出力は次のようになります。

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: 

今私は得ていないのです何を、私が3つの単語を与えると、正規表現やルールベースのコードで、if-elseを使って簡単に達成できるような結果が得られます。たとえば、ファイル内の単語を入力して、前の文や次の文を取り出します。違う?説明してください

時々言われているように、言葉ではないので、私は訓練ファイルにあるそれらの単語だけを与えなければならない、訓練データ内の一致するinout単語のように、純粋なプログラミングで他のモジュールを使用していない場合と同じこと、それではどう違うのですか?

答えて

0

あなたのトレーニングデータセットは約180ワードしかなく、84.6%(トレーニング)の精度を達成していますので、かなりオーバーフィットしています。本質的に、このモデルは、トレーニングデータに基づいて次の最も可能性の高い単語を単に予測しています。

通常、言語モデルは、PTBや1B語のベンチマークなど、はるかに大きなデータセットで訓練されています。 PTBは10万語の小さなデータセットで、1B語のベンチマークは10億語です。

RNNモデルでは、単語や文字をエンコードできるように制限されたボキャブラリがあります。語彙のサイズはモデルに依存する。 PTBを訓練するほとんどの単語モデルは、最も一般的な単語で十分な10,000の語彙サイズを持っています。

関連する問題