Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What's the purpose of "ignoring last label" in this loss function? #66

Open
lishen opened this issue Jan 30, 2018 · 1 comment
Open

Comments

@lishen
Copy link

lishen commented Jan 30, 2018

See code:

y_true = K.one_hot(tf.to_int32(K.flatten(y_true)), K.int_shape(y_pred)[-1]+1)

unpacked = tf.unstack(y_true, axis=-1)

y_true = tf.stack(unpacked[:-1], axis=-1)

At first you appended an additional column of all 0's in one-hot coding and then removed it. It seems to me you only need a single call of K.one_hot to replace L14-16. Or, did I miss something?

@Nandayang
Copy link

Hi, I have the same question as yours. Do you have any answer about this question?3KS!@lishen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants