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

question about model.py #4

Open
Doubaibai opened this issue Apr 4, 2017 · 2 comments
Open

question about model.py #4

Doubaibai opened this issue Apr 4, 2017 · 2 comments
Labels

Comments

@Doubaibai
Copy link

Doubaibai commented Apr 4, 2017

Hi,

I am reading the pointer-network codes. However, I have a question in model.py file. In model.py, line 133-134, you gathered enc_output into dec_inputs. But in the original paper, it seems that the decoder inputs should be from enc_inputs.

133 self.embeded_dec_inputs = tf.stop_gradient(
134 tf.gather_nd(self.enc_outputs, self.idx_pairs))

Could you explain this a little bit?

Best,
Zhe

@carpedm20 carpedm20 added the bug label Apr 5, 2017
@carpedm20
Copy link
Contributor

Thanks! I've never seen that but you're right. I made a mistake on that and the model should be trained with the ground truth input but the current code does not.

@Doubaibai
Copy link
Author

Yes. That is what I think. I use the enc_input to train and it seems that the model converged faster. But it is interesting that using enc_output the model also works well.

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

No branches or pull requests

2 participants