karpathy / karpathy/recurrentjs

text prediction

Open
#4 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
987
Forks
190
PR merge metrics
No merged PRs in 30d

Description

Hi Karparthy

I have trouble understanding a few points in the character prediction demo:

1) What is the meaning of letter_size?
letter_size = 5; // size of letter embeddings

My understanding is that the inputs to the network are just vectors of length 50 (or however many unique characters in our dataset) that look like [0, 0, 0, 0, 1, 0, 0, 0 ... ], and the output is similar

2) to tick the model forward, you used 'rowPluck'
x = G.rowPluck(model['Wil'], ix);

and I think ix is the integer index that represents the character. I exampled x in inspector and is a value of floats of length letter_size, rather than a large binary vector of length 50

So I have a little bit of a hard time what is going on and currently quite puzzled. Any advice or guidance appreciated!

Thanks

David

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names the character prediction demo, `letter_size`, and `G.rowPluck(model['Wil'], ix)`; start there and trace how the index and embedding dimensions are used. Done means adding clear documentation that resolves the questions about character inputs, embeddings, and `rowPluck`.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation, machine-learning
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.