tensorflow2.0 Error when checking input: expected encode_input.......
ValueError: Error when checking input: expected encode_input to have shape (20,) but got array with shape (1,)tf2.0与tf2.0以上不同,直接传入python原数据格式,eg:list会出错,改成np.array(data) _, result = self.encoder_emb.predict(sens_ids)改成 _, result = self.
原创
2021-06-06 00:02:45 ·
474 阅读 ·
1 评论