Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About make_batch of NNLM #67

Open
KODGV opened this issue Apr 30, 2021 · 0 comments
Open

About make_batch of NNLM #67

KODGV opened this issue Apr 30, 2021 · 0 comments

Comments

@KODGV
Copy link

KODGV commented Apr 30, 2021

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

    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])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant