Information-Extraction-Chinese
Information-Extraction-Chinese copied to clipboard
关于test_GRU.py运行的问题
你好!我在训练后运行test_GRU.py进行测试,但是却报出如下错误:
PS D:\Information-Extraction-Chinese-master\Information-Extraction-Chinese-master\RE_BGRU_2ATT> python .\test_GRU.py
2018-02-12 11:31:16.730063: I C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
2018-02-12T11:48:17.277201
Evaluating all test data and save data for PR curve
saving all test result...
Traceback (most recent call last):
File ".\test_GRU.py", line 339, in
我也遇到这个问题了
请问解决了吗?
通过输出len(test_word),发现len(test_word)与test_settings.big_num并没有整除,所以将test_settings.big_num设置为可以将len(test_word)整除的数
主要是因为allans, allprob的shape不一致,allans在是之前预处理的不会有变化,判断只有allprob在程序中shape的改变,进而发现问题可能出现在for i in range(int(len(test_word) / float(test_settings.big_num)))这个循环中。
特别感谢你的回复!我按着你的方法试改一下~~~
------------------ 原始邮件 ------------------ 发件人: "tangtangqubeifangbupaleng"[email protected]; 发送时间: 2018年6月20日(星期三) 晚上9:23 收件人: "crownpku/Information-Extraction-Chinese"[email protected]; 抄送: "滕蔚"[email protected]; "Comment"[email protected]; 主题: Re: [crownpku/Information-Extraction-Chinese] 关于test_GRU.py运行的问题 (#27)
主要是因为allans, allprob的shape不一致,allans在是之前预处理的不会有变化,判断只有allprob在程序中shape的改变,进而发现问题可能出现在for i in range(int(len(test_word) / float(test_settings.big_num)))这个循环中。
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
恩恩,程序顺利通过记得跟我分享啊。对了,你有做中文关系抽取这方面的语料吗
------------------ 原始邮件 ------------------ 发件人: "jufengada9"[email protected]; 发送时间: 2018年6月20日(星期三) 晚上9:25 收件人: "crownpku/Information-Extraction-Chinese"[email protected]; 抄送: "米修米修"[email protected]; "Comment"[email protected]; 主题: Re: [crownpku/Information-Extraction-Chinese] 关于test_GRU.py运行的问题 (#27)
特别感谢你的回复!我按着你的方法试改一下~~~
------------------ 原始邮件 ------------------
发件人: "tangtangqubeifangbupaleng"[email protected];
发送时间: 2018年6月20日(星期三) 晚上9:23
收件人: "crownpku/Information-Extraction-Chinese"[email protected];
抄送: "滕蔚"[email protected]; "Comment"[email protected];
主题: Re: [crownpku/Information-Extraction-Chinese] 关于test_GRU.py运行的问题 (#27)
主要是因为allans, allprob的shape不一致,allans在是之前预处理的不会有变化,判断只有allprob在程序中shape的改变,进而发现问题可能出现在for i in range(int(len(test_word) / float(test_settings.big_num)))这个循环中。
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
执行test_GRU出现这样的问题,很尴尬,哪位大神帮忙分析下,怎么解决 Testing started at 11:47 ... D:\pyEnvs\h1\Scripts\python.exe "C:\Program Files\JetBrains\PyCharm Community Edition 2018.2.4\helpers\pycharm_jb_pytest_runner.py" --path "D:/Python Indext/PDF data acquisition/Information-Extraction-Chinese-master/RE_BGRU_2ATT/test_GRU.py" Launching pytest with arguments D:/Python Indext/PDF data acquisition/Information-Extraction-Chinese-master/RE_BGRU_2ATT/test_GRU.py in D:\Python Indext\PDF data acquisition\Information-Extraction-Chinese-master\RE_BGRU_2ATT
============================= test session starts ============================= platform win32 -- Python 3.6.5, pytest-3.10.0, py-1.7.0, pluggy-0.8.0 rootdir: D:\Python Indext\PDF data acquisition\Information-Extraction-Chinese-master\RE_BGRU_2ATT, inifile:collected 0 items
============================== warnings summary =============================== D:\pyEnvs\h1\lib\site-packages\tensorflow\python\framework\ops.py:923 D:\pyEnvs\h1\lib\site-packages\tensorflow\python\framework\ops.py:923: DeprecationWarning: builtin type EagerTensor has no module attribute EagerTensor = c_api.TFE_Py_InitEagerTensor(_EagerTensorBase)
D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75 D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() return _inspect.getargspec(target) D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() return _inspect.getargspec(target) D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() return _inspect.getargspec(target) D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() return _inspect.getargspec(target) D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() return _inspect.getargspec(target) D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() return _inspect.getargspec(target) D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() return _inspect.getargspec(target) D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() return _inspect.getargspec(target) D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() return _inspect.getargspec(target) D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() return _inspect.getargspec(target) D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() return _inspect.getargspec(target) D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() return _inspect.getargspec(target) D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() return _inspect.getargspec(target) D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() return _inspect.getargspec(target) D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() return _inspect.getargspec(target) D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() return _inspect.getargspec(target) D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() return _inspect.getargspec(target) D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() return _inspect.getargspec(target) D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() return _inspect.getargspec(target) D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() return _inspect.getargspec(target) D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() return _inspect.getargspec(target) D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() return _inspect.getargspec(target) D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() return _inspect.getargspec(target) D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() return _inspect.getargspec(target) D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() return _inspect.getargspec(target) D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() return _inspect.getargspec(target) D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() return _inspect.getargspec(target) D:\pyEnvs\h1\lib\site-packages\tensorflow\python\util\tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() return _inspect.getargspec(target)
-- Docs: https://docs.pytest.org/en/latest/warnings.html ========================= 29 warnings in 3.02 seconds =========================
Process finished with exit code 0 Empty test suite.
运行test_GRU出现以下提示就没有结果了 Launching pytest with arguments D:/Information-Extraction-Chinese-master/Information-Extraction-Chinese-master/RE_BGRU_2ATT/test_GRU.py in D:\Information-Extraction-Chinese-master\Information-Extraction-Chinese-master\RE_BGRU_2ATT
============================= test session starts ============================= platform win32 -- Python 3.6.2, pytest-4.0.1, py-1.7.0, pluggy-0.8.0 rootdir: D:\Information-Extraction-Chinese-master\Information-Extraction-Chinese-master\RE_BGRU_2ATT, inifile:collected 0 items
======================== no tests ran in 1.47 seconds =========================
@yangbin0405 empty test suit 这个问题好像是pycharm的问题,pycharm会检查以test开头的模块什么的,你在命令行里直接用python test_GRU.py试试