Created
December 10, 2015 17:51
-
-
Save ozancaglayan/45fb305885fe0a990ac8 to your computer and use it in GitHub Desktop.
advanced indexing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |
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
advanced indexing kullanmadan cozum asagida abi, biraz flatten edip indexlerle oynuyosun o kadar
bi de abi why categorical crossentropy ? problem sequence'lar uzerinde ise cost un negative log probability ler olmayacak mi ? yani biz bunu minimize ediyoruz nmt de (eger baska bi surrogate kullanmiyosan tabi)