graykode / graykode/nlp-tutorial

About make_batch of NNLM

オープン
#67 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Jupyter Notebook
スター
14.9k
フォーク
3.9k
PR マージ指標
30日以内にマージされた PR はありません

説明

```python
input = [word_dict[n] for n in word[:-1]] # create (1~n-1) as input
target = [word_dict[word[-1]]]
```

it constraints the length of input and n_step. I think the following example is even better

```python
for i in range(len(words) - window_size + 1):`
` x_train.append(words[i: i + window_size - 1])`
`y_train.append(words[i + window_size - 1])
```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。