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

Question about the shape of X_train #9

Open
FrankWork opened this issue Jul 2, 2018 · 1 comment
Open

Question about the shape of X_train #9

FrankWork opened this issue Jul 2, 2018 · 1 comment

Comments

@FrankWork
Copy link

X_train = tf.placeholder(tf.int32, [n_batch_train, 2, n_ctx, 2])
xmb[:, :, :, 1] = np.arange(n_vocab+n_special, n_vocab+n_special+n_ctx)
why there is a channel of additional tokens?

@FrankWork
Copy link
Author

Problem solved! This part of the xmb is used for the learned positional encoding. huggingface/pytorch-openai-transformer-lm#12 (comment)

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