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

machine_translation_seq2seq 运行报错 #29

Open
ssnvxia opened this issue Oct 15, 2018 · 3 comments
Open

machine_translation_seq2seq 运行报错 #29

ssnvxia opened this issue Oct 15, 2018 · 3 comments

Comments

@ssnvxia
Copy link

ssnvxia commented Oct 15, 2018

您好,运行down下来的代码,没有改动,运行到
with tf.Session(graph=train_graph) as sess:
sess.run(tf.global_variables_initializer())
这一个代码块的时候程序报错:
Dimensions of inputs should match: shape[0] = [128,1] vs. shape[1] = [4 7,24]
目测是因为source和target的维度不一致导致的,我检查了好几编也没有弄清楚哪里出了问题。还请赐教

@ssnvxia
Copy link
Author

ssnvxia commented Oct 16, 2018

上一个问题解决了,我发现了一个新的问题,代码中source_sentence和target_sentence的最大长度分别是20和25,程序可以正常运行,可是这个数值我改成其他的都会报错。。。真的是要愁死小白了

@A6Matrix
Copy link

A6Matrix commented Dec 3, 2018

请教第一个问题是怎么解决的

@ssnvxia
Copy link
Author

ssnvxia commented Dec 5, 2018

维度必须一致。。。改一下就好了

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