Skip to content

Instantly share code, notes, and snippets.

@mbednarski
Created March 4, 2018 18:43
Show Gist options
  • Save mbednarski/84897aff240a19490b806916aa7bc3fc to your computer and use it in GitHub Desktop.
Save mbednarski/84897aff240a19490b806916aa7bc3fc to your computer and use it in GitHub Desktop.
def get_input_layer(word_idx):
x = torch.zeros(vocabulary_size).float()
x[word_idx] = 1.0
return x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment