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

GRU Sentence Encoding API for tf 1.10+ #17

Open
BorisPolonsky opened this issue Mar 29, 2019 · 1 comment
Open

GRU Sentence Encoding API for tf 1.10+ #17

BorisPolonsky opened this issue Mar 29, 2019 · 1 comment

Comments

@BorisPolonsky
Copy link

BorisPolonsky commented Mar 29, 2019

The code ran into error when I tried running the simple_gru approach`. It seems like some of the code are not updated to tf 1.10 API. (I ran in tf 1.12.0 API which should be compatible with tf 1.10 API indicated your commit log as far as I know). I made the following modification and the model is now runable (although it does not outperform the original BOW approach):

  • x = tf.split(0, self._story_size, x) -> x = tf.split(x, self._story_size, axis=0)

  • q = tf.split(0, self._query_size, q) - > q = tf.split(q, self._query_size, axis=0)

  • doc_output, _ = tf.nn.rnn(k_rnn, x, dtype=tf.float32) -> doc_output, _ = tf.nn.static_rnn(doc_output, _ = tf.nn.static_rnn(k_rnn, x, dtype=tf.float32)

  • q_output, _ = tf.nn.rnn(q_rnn, q, dtype=tf.float32) -> q_output, _ = tf.nn.static_rnn(q_rnn, q, dtype=tf.float32)

Please let me now if this implementation is different from your original intent as I've never used 0.9 version of tf and couldn't find the doc

Thanks for your exemplary work.

@BorisPolonsky BorisPolonsky changed the title GRU Sentence Encoding GRU Sentence Encoding Support for tf 1.10+ Mar 29, 2019
@BorisPolonsky BorisPolonsky changed the title GRU Sentence Encoding Support for tf 1.10+ GRU Sentence Encoding API for tf 1.10+ Mar 29, 2019
@siyuanzhao
Copy link
Owner

I believe I forgot to update GRU code when tf updated to 1.10 since GRU didn't outperform BOW.

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