test_batch_flow()运行出错,具体报错信息如下,求大神指导。
来源:8-13 batch_flow_bucket(5)测试

JessicaEarth
2019-04-15
test_batch_flow()运行出错,具体报错信息如下,求大神指导。
C:\Users\ThinkPad\Anaconda3\envs\nlp\python.exe F:/Learning/MukeChatbot/chatbot/data_utils.py
Traceback (most recent call last):
File "F:/Learning/MukeChatbot/chatbot/data_utils.py", line 193, in <module>
test_batch_flow()
File "F:/Learning/MukeChatbot/chatbot/data_utils.py", line 186, in test_batch_flow
x,xl,y,yl=next(flow)
File "F:/Learning/MukeChatbot/chatbot/data_utils.py", line 84, in batch_flow
x,xl=transform_sentence(line,w,max_lens[j],add_end[j])
File "F:/Learning/MukeChatbot/chatbot/data_utils.py", line 22, in transform_sentence
encoded=ws.transform(
AttributeError: 'WordSequence' object has no attribute 'transform'
Process finished with exit code 1
1回答
-
Mr_Ricky
2019-04-29
你看下是不是transform这个函数名写错了
00
相似问题