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

lstm_attention.py 训练问题 #4

Open
sue2415535899 opened this issue Dec 13, 2018 · 1 comment
Open

lstm_attention.py 训练问题 #4

sue2415535899 opened this issue Dec 13, 2018 · 1 comment

Comments

@sue2415535899
Copy link

您好,我在执行您的代码时运行到
out, attn, alpha = tf.split(lstm_net.outputs, [n_hidden, d_local, a_local ** 2], axis=2)
这一步报错:tensorflow.python.framework.errors_impl.InvalidArgumentError: Sum of output sizes must match the size of the original Tensor along the split dimension or the sum of the positive sizes must be less if it contains a -1 for 'split_1' (op: 'SplitV') with input shapes: [?,?,512], [3], [] and with computed input tensors: input[1] = <512 512 49>, input[2] = <2>.
我理解的是lstm_net.outputs 输出的是[?,?,512]维的tensor ,不能拆分为512,512,49维的out ,attn ,alpha。
我不知道是源代码问题,还是tensorflow 版本问题。
想问您原网络lstm_net输出的是[?,?,1073]还是[?,?,512]呢?

@qiongxiao
Copy link

我运行lstm_attention.py也遇到同样的问题,期待作者来解答。

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