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

Is logits_bias trainable? #10

Open
audreycs opened this issue Dec 7, 2019 · 0 comments
Open

Is logits_bias trainable? #10

audreycs opened this issue Dec 7, 2019 · 0 comments

Comments

@audreycs
Copy link

audreycs commented Dec 7, 2019

Hello, I am confused about the variable logits_bias. It seems that you make logits_bias not trainable in your code. (At line 170 in memn2n_kv.py)

logits_bias = tf.get_variable('logits_bias', [score_range])

Normally, shouldn't bias be trainable?

Other possible mistakes I found:
1.

sent_size = sent_size_list.pop(score_idx)

Here sent_size_list is the list of all data(train+test), but score_idx is the index of train data.

cross_entropy = tf.nn.softmax_cross_entropy_with_logits_v2(logits=logits, labels=tf.cast(self._labels, tf.float32), name='cross_entropy')

why here logits are used to calculate cross entropy, but not the softmax result of logits.

Thanks!

@audreycs audreycs reopened this Dec 17, 2019
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

1 participant