zhaoyingjun/chatbot

execute.py 一直报错

alexng88 opened this issue · 3 comments

求助! 我输入 "你好"
这句一直报错
inputs = tf.keras.preprocessing.sequence.pad_sequences([inputs],maxlen=max_length_inp, padding='post')

ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (12,) + inhomogeneous part.

有兄弟知道什么原因吗

同样的问题

[inputs]改成inputs即可

按照 @wenChingzhou 的提示改了以后,这个错误不再出现了,不过又碰到了另外一个错误
Tensor's shape (12, 512) is not compatible with supplied shape (1, 512), 小白,不知道该怎么弄了。