Open msfasha opened 1 year ago
A slight adjustment, The first example in ch16, (ch16-part1) is discussing 8 words embedding, but the code is referring to 10 words
torch.manual_seed(123) embed = torch.nn.Embedding(10, 16) --> should become: embed = torch.nn.Embedding(8, 16) embedded_sentence = embed(sentence).detach() embedded_sentence.shape
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
A slight adjustment, The first example in ch16, (ch16-part1) is discussing 8 words embedding, but the code is referring to 10 words
torch.manual_seed(123) embed = torch.nn.Embedding(10, 16) --> should become: embed = torch.nn.Embedding(8, 16) embedded_sentence = embed(sentence).detach() embedded_sentence.shape