graykode / graykode/nlp-tutorial

About make_batch of NNLM

未关闭
#67 0 条评论 0 个 reaction 已指派 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])
```

贡献指南

打开贡献指南

调研方向

首先在 NNLM 教程中找到 make_batch 入口点,并阅读当前如何使用 input、target、word、n_step 和 window_size。将其生成的训练对与提议的滑动窗口示例进行比较;当批处理行为支持预期的窗口长度,且不限制 input 和 n_step 时,即视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
machine-learning
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。