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

Error in makemore_part1_bigrams.ipynb #37

Open
mksamelson opened this issue Jun 12, 2023 · 1 comment
Open

Error in makemore_part1_bigrams.ipynb #37

mksamelson opened this issue Jun 12, 2023 · 1 comment

Comments

@mksamelson
Copy link

P.shape


NameError Traceback (most recent call last)
in <cell line: 1>()
----> 1 P.shape

NameError: name 'P' is not defined

@jingairpi
Copy link

jingairpi commented Jan 4, 2024

P is just a normalization version of N for probability.

You can easily fix it by

P = N.float()
P = P / P.sum(1, keepdim=True)

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

2 participants