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

安装启动server后查询意图报错。 #106

Open
flowold opened this issue Jul 29, 2020 · 5 comments
Open

安装启动server后查询意图报错。 #106

flowold opened this issue Jul 29, 2020 · 5 comments

Comments

@flowold
Copy link

flowold commented Jul 29, 2020

按照https://itworld520.com/2020/01/17/%E6%90%AD%E5%BB%BA%E8%87%AA%E7%84%B6%E8%AF%AD%E8%A8%80%E7%90%86%E8%A7%A3%EF%BC%88nlu%EF%BC%89%E5%AE%9E%E9%AA%8C%E7%8E%AF%E5%A2%83%E5%AE%9E%E6%88%98%E6%95%99%E5%AD%A6/
这个步骤安装执行,
在浏览器输入:http://localhost:5000/parse?q=你好 报错:"y should be a 1d array, got an array of shape (1, 5) instead."

@houboowen
Copy link

我也遇到同样的问题,你解决了吗?

@flowold
Copy link
Author

flowold commented Aug 13, 2020

没有解决。

@QuantJia
Copy link

QuantJia commented Sep 3, 2020

修改代码啊,transform_labels_num2str
return self.le.inverse_transform(np.squeeze(y))

@ljhry
Copy link

ljhry commented Oct 15, 2020

没有解决。

你好,这个问题你解决了吗

@ljhry
Copy link

ljhry commented Oct 15, 2020

  1. 找到sklearn_intent_classifier.py
    C:\Users\Administrator\Desktop\Rasa_NLU_Chi\rasa_nlu\classifiers\sklearn_intent_classifier.py
    return self.le.inverse_transform(y) 修改为 return self.le.inverse_transform(np.squeeze(y))

  2. 或者参考 ValueError: bad input shape (1, 5) RasaHQ/rasa#1436 Updating rasa-nlu to 0.14

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

4 participants