chatbot icon indicating copy to clipboard operation
chatbot copied to clipboard

execute.py 一直报错

Open alexng88 opened this issue 2 years ago • 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.

有兄弟知道什么原因吗

alexng88 avatar Feb 12 '23 07:02 alexng88

同样的问题

TimVan1596 avatar May 08 '23 12:05 TimVan1596

[inputs]改成inputs即可

wenChingzhou avatar May 18 '23 03:05 wenChingzhou

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

shirubei avatar Oct 30 '23 12:10 shirubei