Skip to content

Instantly share code, notes, and snippets.

@ozancaglayan
Created December 10, 2015 17:51
Show Gist options
  • Save ozancaglayan/45fb305885fe0a990ac8 to your computer and use it in GitHub Desktop.
Save ozancaglayan/45fb305885fe0a990ac8 to your computer and use it in GitHub Desktop.
advanced indexing
# pp: (batch, sequence_step, target vocabulary probabilities)
# yy: (batch, sequence_step's true label)
# Soru: pp[yy] gibi dogru yerlerden dogru olasiliklari nasi cekebilirim?
In [211]: pp.shape
Out[211]: (256, 33, 20004)
In [212]: yy.shape
Out[212]: (256, 33)
@ozancaglayan
Copy link
Author

y_flat_idx = np.repeat(np.arange(batch_size), seq_size) * num_words + y_flat

Böyle olmayacak mı ya?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment