wangyy161

Results 3 comments of wangyy161

> hi,when I run the command "python -m spacy download en",I got the problem of requests.exceptions.ConnectionError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /explosion/spacy-models/master/shortcuts-v2.json (Caused by NewConnectionError(': Failed to establish...

> 跑了下这个代码,请问预测时如何设置batch大小,我用训练的数据测试预测,当我要预测的数据不是按照batch大小输入时,会报下面的错误: > RuntimeError(msg.format(expected_hidden_size, tuple(hx.size()))) > RuntimeError: Expected hidden[0] size (2, 12, 100), got (2, 128, 100) > 我用的训练的数据,只不过把batch修改成了12。 您好,请问您这个问题解决了吗

谢谢您了 在 2019-06-21 15:42:42,"Dwyanepeng" 写道: 跑了下这个代码,请问预测时如何设置batch大小,我用训练的数据测试预测,当我要预测的数据不是按照batch大小输入时,会报下面的错误: RuntimeError(msg.format(expected_hidden_size, tuple(hx.size()))) RuntimeError: Expected hidden[0] size (2, 12, 100), got (2, 128, 100) 我用的训练的数据,只不过把batch修改成了12。 您好,请问您这个问题解决了吗 你好,我觉得是在attention内部写死了batch size,目前还没能直接修改attention的代码,我用了个笨方法,就是加载模型后修改batch size为1,att_weight和relation_bias也全都是1个batch size,这样可以预测一条数据。代码如下: 加载模型 model_file = os.path.normcase(r'model\model_final.pkl') model_path...