Coder Social home page Coder Social logo

ossas_chatbot's Issues

OSSAS.exe闪退

错误如下

c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py:489: MatplotlibDeprecationWarning:
The MATPLOTLIBDATA environment variable was deprecated in Matplotlib 3.1 and will be removed in 3.3.
Traceback (most recent call last):
  File "tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
  File "imp.py", line 296, in find_module
ImportError: No module named '_pywrap_tensorflow_internal'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
  File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
  File "tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
  File "tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
ImportError: DLL load failed: 找不到指定的模块。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "main.py", line 5, in <module>
  File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
  File "Seq2Seq.py", line 8, in <module>
  File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
  File "tensorflow\__init__.py", line 40, in <module>
  File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
  File "tensorflow\python\__init__.py", line 49, in <module>
  File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
  File "tensorflow\python\pywrap_tensorflow.py", line 74, in <module>
ImportError: Traceback (most recent call last):
  File "tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
  File "imp.py", line 296, in find_module
ImportError: No module named '_pywrap_tensorflow_internal'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
  File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
  File "tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
  File "tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
ImportError: DLL load failed: 找不到指定的模块。


Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors

for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.
[8432] Failed to execute script main

我之前还试着安装过requirement.txt,但是还是会打开OSSAS.exe之后黑一段时间然后突然报错加闪退,QQRecord2Excel.exe倒可以运行。
顺便请问一下这个程序是只要是win电脑就能打开还是说也得安装相应插件和lib,感谢

闪退,求大佬

c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py:489: MatplotlibDeprecationWarning:
The MATPLOTLIBDATA environment variable was deprecated in Matplotlib 3.1 and will be removed in 3.3.
Traceback (most recent call last):
File "QQRecord2Excel.py", line 95, in
File "json_init_.py", line 296, in load
File "json_init_.py", line 338, in loads
json.decoder.JSONDecodeError: Unexpected UTF-8 BOM (decode using utf-8-sig): line 1 column 1 (char 0)
[7632] Failed to execute script QQRecord2Excel

一些疑惑,希望能得到解答

1.闪退的问题,不知道是怎么回事下载的文件一直缺斤少两
详情:缺少标签文件"words_dictionary.txt"
2.CQHTTP,发送监听HTTP请求时报错,尝试自行修订,未果
详情:[HTTP] http上报地址 127.0.0.1:7777 无法访问

闪退

前几次打开ossas都正常,加入了新的聊天记录后一打开什么都不显示就闪退

尝试的时候遇到的一些问题

split.txt文件修改后,模式1得出的表格里面,第一列数据值全是else后面的内容,完全没有其他成员的名称,我的聊天内容只有两个人的对话,希望作者大大能出一个实际范本split.txt

[功能请求]QQRecord2Excel处理数据时增加出错行数通知

我是自行编辑训练数据的(找沙雕群友当苦力
希望能增加一个提示表格处理出错行数的功能。

使用模式2转换record.xlsx到soft_record.xlsx时报错。
问题似乎是因为表格一些地方不符合要求,截取前数十条数据时可以正常处理。
我这边一共有7w+条数据,因为是打算群里自己玩的所以未做去敏,恕无法提供原始数据供以复现问题。

附错误输出
Traceback (most recent call last): File "QQRecord2Excel.py", line 127, in <module> File "site-packages\pandas\core\ops\__init__.py", line 1229, in wrapper File "site-packages\pandas\core\ops\__init__.py", line 1091, in na_op File "site-packages\pandas\core\ops\__init__.py", line 1069, in _comp_method_OBJECT_ARRAY File "pandas/_libs/ops.pyx", line 96, in pandas._libs.ops.scalar_compare TypeError: '>' not supported between instances of 'str' and 'int' [14636] Failed to execute script QQRecord2Excel

搞笑的不正常

2020-10-06 02:00:58.328401: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found
2020-10-06 02:00:58.335393: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.

---OSSAS ChatBot-----
--人工智障聊天机器人---
---版本:0.0.3_alpha---

作者:Dimsmary
网址:dimsmary.tech

本软件完全免费
代码遵循MIT协议


模式1:搭建模型
模式2:训练模型
模式3:开启Coolq接口
模式4:进行对话

输入工作模式:4
输入数字0 退出
你说:你是谁
Building prefix dict from the default dictionary ...
Loading model from cache C:\Users\fff10\AppData\Local\Temp\jieba.cache
Loading model cost 0.921 seconds.
Prefix dict has been built successfully.
2020-10-06 02:01:24.501241: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'nvcuda.dll'; dlerror: nvcuda.dll not found
2020-10-06 02:01:24.507969: W tensorflow/stream_executor/cuda/cuda_driver.cc:312] failed call to cuInit: UNKNOWN ERROR (303)
2020-10-06 02:01:24.524965: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:169] retrieving CUDA diagnostic information for host: DESKTOP-H607UJ3
2020-10-06 02:01:24.534686: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:176] hostname: DESKTOP-H607UJ3
2020-10-06 02:01:24.541614: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations: AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2020-10-06 02:01:24.596434: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x1dfb58ab6f0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-10-06 02:01:24.604586: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
????说?说?说?说?说?说?说?说
你说:我是谁
????说?说?说?说?说?说?说?说
你说:你
????说?说说?说?说?说?说?说?
你说:怎么说
???说?说?说?说?说?说?说?说?
你说:

Error import TensorFlow 1.5.0 (import tensorflow as tf)

I managed to install TensorFlow 1.5.0 but when importing (import tensorflow as tf) the error ModuleNotFoundError: No module name 'tensorflow' what can be use windows 7 64 am doing this because my video card and processor are old sem suporte avx.

I followed the steps of this youtube tutorial https://www.youtube.com/watch?v=uIm3DMprk7M

I imagine that this would solve the error in the face extraction of DeepfaceLab?
Error do DeepFaceLab : Failed to load the native TensorFlow rutime.

我尝试后有的一些疑问

训练后的问答是完全OK的。主要就是对话数据的导入问题。不确定是不是我的理解有问题。我的qq聊天记录导出后,在人名后面并没有()以及里面的成员标识00000000。想问作者这个是要我完全自己在.txt中逐条添加吗? 另外,对于产生的record.xlsx,我也要完全手动地修改label为1和2吗,或者您有什么好的方法。 (本人不是学python和机器学习的,只是从b站看到了介绍视频,故怀着兴趣下来玩的。如有什么问题提的不好还望包涵)

一个建议和一个兼容问题

请问您可以多做一个不是单exe的版本发出来吗?
这样大家就都可以使用里面的库文件放到.py版本的目录里面测试了。
感觉.exe文件的版本支持不是很好。我Win10x86的电脑不知道为什么刚点开exe就提示不兼容此电脑。

训练模型时报错: Incompatible shapes: [14] vs. [14,50]

环境:
Python 3.10.10
Tensorflow 2.12.0

日志:

Tue May 23 12:23:08 2023 正在处理训练数据...
Tue May 23 12:23:08 2023 循环轮数:5 batch size:20
Epoch 1/5
Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\main.py", line 35, in <module>
    main()
  File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\main.py", line 22, in main
    seq.train_model(size, epoch)
  File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\seq2seq.py", line 79, in train_model
    model.fit([encoder_input_data, decoder_input_data], decoder_target_data,
  File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\keras\utils\traceback_utils.py", line 70, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\tensorflow\python\eager\execute.py", line 52, in quick_execute
    tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
tensorflow.python.framework.errors_impl.InvalidArgumentError: Graph execution error:

Detected at node 'Equal' defined at (most recent call last):
    File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\main.py", line 35, in <module>
      main()
    File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\main.py", line 22, in main
      seq.train_model(size, epoch)
    File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\seq2seq.py", line 79, in train_model
      model.fit([encoder_input_data, decoder_input_data], decoder_target_data,
    File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\keras\utils\traceback_utils.py", line 65, in error_handler
      return fn(*args, **kwargs)
    File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\keras\engine\training.py", line 1685, in fit
      tmp_logs = self.train_function(iterator)
    File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\keras\engine\training.py", line 1284, in train_function
      return step_function(self, iterator)
    File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\keras\engine\training.py", line 1268, in step_function
      outputs = model.distribute_strategy.run(run_step, args=(data,))
    File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\keras\engine\training.py", line 1249, in run_step
      outputs = model.train_step(data)
    File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\keras\engine\training.py", line 1055, in train_step
      return self.compute_metrics(x, y, y_pred, sample_weight)
    File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\keras\engine\training.py", line 1149, in compute_metrics
      self.compiled_metrics.update_state(y, y_pred, sample_weight)
    File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\keras\engine\compile_utils.py", line 605, in update_state
      metric_obj.update_state(y_t, y_p, sample_weight=mask)
    File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\keras\utils\metrics_utils.py", line 77, in decorated
      update_op = update_state_fn(*args, **kwargs)
    File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\keras\metrics\base_metric.py", line 140, in update_state_fn
      return ag_update_state(*args, **kwargs)
    File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\keras\metrics\base_metric.py", line 691, in update_state
      matches = ag_fn(y_true, y_pred, **self._fn_kwargs)
    File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\keras\metrics\accuracy_metrics.py", line 426, in categorical_accuracy
      return metrics_utils.sparse_categorical_matches(
    File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\keras\utils\metrics_utils.py", line 971, in sparse_categorical_matches
      matches = tf.cast(tf.equal(y_true, y_pred), backend.floatx())
Node: 'Equal'
Incompatible shapes: [14] vs. [14,50]
         [[{{node Equal}}]] [Op:__inference_train_function_19230]

(venv) C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot>

关于生僻词词典的一些困惑

问一下这个有什么用,虽然说是辅助程序但想问一下如果不向里面添加词和添加了词的区别以及对相同训练数据所训练出来的有什么影响

KeyError: 'input'

c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py:489: MatplotlibDeprecationWarning:
The MATPLOTLIBDATA environment variable was deprecated in Matplotlib 3.1 and will be removed in 3.3.
2022-05-27 11:52:11.730438: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found
2022-05-27 11:52:11.730708: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.

---OSSAS ChatBot-----
--人工智障聊天机器人---
---版本:0.0.3_alpha---

作者:Dimsmary
网址:dimsmary.tech

本软件完全免费
代码遵循MIT协议


模式1:搭建模型
模式2:训练模型
模式3:开启Coolq接口
模式4:进行对话

输入工作模式:1
Fri May 27 11:52:19 2022 读取训练数据...
Building prefix dict from the default dictionary ...
Loading model from cache C:\Users\qxc\AppData\Local\Temp\jieba.cache
Loading model cost 2.736 seconds.
Prefix dict has been built successfully.
Traceback (most recent call last):
File "site-packages\pandas\core\indexes\base.py", line 2897, in get_loc
File "pandas/_libs/index.pyx", line 107, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 131, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 1607, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 1614, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'input'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 108, in
File "Seq2Seq.py", line 284, in pre_precess
File "Seq2Seq.py", line 47, in load_data
File "site-packages\pandas\core\frame.py", line 2995, in getitem
File "site-packages\pandas\core\indexes\base.py", line 2899, in get_loc
File "pandas/_libs/index.pyx", line 107, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 131, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 1607, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 1614, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'input'
[19888] Failed to execute script main

[已退出进程,代码为 4294967295 (0xffffffff)]

MacOS下搭建模型的问题

Python版本:3.8.2
MacOS下clone项目代码编译运行。

Sat Apr 11 15:32:39 2020 读取训练数据...
Building prefix dict from the default dictionary ...
Loading model from cache /var/folders/rf/smxg24sn2pd7945k1wjwrzf00000gn/T/jieba.cache
Loading model cost 1.216 seconds.
Prefix dict has been built successfully.
Traceback (most recent call last):
  File "/Users/xxx/Documents/GitHub/Ossas_ChatBot/main.py", line 108, in <module>
    rnn.pre_precess()
  File "/Users/xxx/Documents/GitHub/Ossas_ChatBot/Seq2Seq.py", line 288, in pre_precess
    with open(dict_path, 'w') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/xxx/Documents/GitHub/Ossas_ChatBot/workspace/train_data/words_dictionary.txt'

在搭建模型时,报错为无法找到words_dictionary.txt

缓存问题

请问训练所用的数据是放在默认C盘上吗,当我跑完数据之后C盘差不多就满了

黑屏然后闪退

运行ossas.exe后黑屏,一段时间后显示以下文字:

c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py:489: MatplotlibDeprecationWarning:
The MATPLOTLIBDATA environment variable was deprecated in Matplotlib 3.1 and will be removed in 3.3.
Traceback (most recent call last):
File "tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
File "imp.py", line 296, in find_module
ImportError: No module named 'pywrap_tensorflow_internal'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "tensorflow\python\pywrap_tensorflow.py", line 58, in
File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
File "tensorflow\python\pywrap_tensorflow_internal.py", line 28, in
File "tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
ImportError: DLL load failed: 动态链接库(DLL)初始化例程失败。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 5, in
File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
File "Seq2Seq.py", line 8, in
File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
File "tensorflow_init
.py", line 40, in
File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
File "tensorflow\python_init_.py", line 49, in
File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
File "tensorflow\python\pywrap_tensorflow.py", line 74, in
ImportError: Traceback (most recent call last):
File "tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
File "imp.py", line 296, in find_module
ImportError: No module named '_pywrap_tensorflow_internal'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "tensorflow\python\pywrap_tensorflow.py", line 58, in
File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
File "tensorflow\python\pywrap_tensorflow_internal.py", line 28, in
File "tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
ImportError: DLL load failed: 动态链接库(DLL)初始化例程失败。
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
[11552] Failed to execute script main

运行main.py的反馈是:

Traceback (most recent call last):
File "F:\Ossas_ChatBox\Ossas_ChatBot-master\main.py", line 5, in
import Seq2Seq as rnn
File "F:\Ossas_ChatBox\Ossas_ChatBot-master\Seq2Seq.py", line 8, in
from tensorflow.keras.preprocessing.text import Tokenizer
ModuleNotFoundError: No module named 'tensorflow'

requirements.txt里的东西都装了

关于QQ信息记录导入的修改

    # d_tail = label[-10: -1]

    tail_str = label.split(" ")[0]
    # for key_ in key_list:
    #     if d_tail == tail[key_]:
    #         tail_str = key_
    # if tail_str == '':
    #     tail_str = tail['else']
    # 创建名称——文本Series

由于现在复制出来的格式是这样的:
“”“
【好孩子2】昵称 2020/10/3 21:43:23
消息
”“”
所以我将第一个空格前的内容作为tail_str。不知道有没有用。

闪退

E:\迅雷下载\ai>OSSAS.exe c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py:489: MatplotlibDeprecationWarning: The MATPLOTLIBDATA environment variable was deprecated in Matplotlib 3.1 and will be removed in 3.3. 2021-02-19 21:43:53.830720: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found 2021-02-19 21:43:53.832902: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. ------------------------ ---OSSAS ChatBot----- --人工智障聊天机器人--- ---版本:0.0.3_alpha--- ------------------------- 作者:Dimsmary 网址:dimsmary.tech ----------------- 本软件完全免费 代码遵循MIT协议 ----------------- ----------------- 模式1:搭建模型 模式2:训练模型 模式3:开启Coolq接口 模式4:进行对话 ----------------- 输入工作模式:1 Fri Feb 19 21:44:01 2021 读取训练数据... Building prefix dict from the default dictionary ... Loading model from cache C:\Users\HDS\AppData\Local\Temp\jieba.cache Loading model cost 0.514 seconds. Prefix dict has been built successfully. Traceback (most recent call last): File "main.py", line 108, in File "Seq2Seq.py", line 284, in pre_precess File "Seq2Seq.py", line 46, in load_data File "site-packages\pandas\util_decorators.py", line 208, in wrapper File "site-packages\pandas\io\excel_base.py", line 310, in read_excel File "site-packages\pandas\io\excel_base.py", line 819, in init File "site-packages\pandas\io\excel_xlrd.py", line 21, in init File "site-packages\pandas\io\excel_base.py", line 359, in init File "site-packages\pandas\io\excel_xlrd.py", line 36, in load_workbook File "site-packages\xlrd_init_.py", line 111, in open_workbook FileNotFoundError: [Errno 2] No such file or directory: 'E:\迅雷下载\ai\workspace\train.xlsx' [5508] Failed to execute script main

动态链接库(DLL)初始化例程失败

c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py:489: MatplotlibDeprecationWarning:
The MATPLOTLIBDATA environment variable was deprecated in Matplotlib 3.1 and will be removed in 3.3.
Traceback (most recent call last):
File "tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
File "imp.py", line 296, in find_module
ImportError: No module named '_pywrap_tensorflow_internal'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "tensorflow\python\pywrap_tensorflow.py", line 58, in
File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
File "tensorflow\python\pywrap_tensorflow_internal.py", line 28, in
File "tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
ImportError: DLL load failed: 动态链接库(DLL)初始化例程失败。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 5, in
File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
File "Seq2Seq.py", line 8, in
File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
File "tensorflow_init_.py", line 40, in
File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
File "tensorflow\python_init_.py", line 49, in
File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
File "tensorflow\python\pywrap_tensorflow.py", line 74, in
ImportError: Traceback (most recent call last):
File "tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper
File "imp.py", line 296, in find_module
ImportError: No module named '_pywrap_tensorflow_internal'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "tensorflow\python\pywrap_tensorflow.py", line 58, in
File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
File "tensorflow\python\pywrap_tensorflow_internal.py", line 28, in
File "tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
ImportError: DLL load failed: 动态链接库(DLL)初始化例程失败。

Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors

for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
[14076] Failed to execute script main

一些建议和疑惑

首先是聊天记录的分类太繁琐了,希望能够增加:自动为“你”的消息标记标签2
并自动为“你”的消息前一条非“你”的消息标记1
这样想必能相更快地标记信息

其次是我使用cuda来训练模型时,每次都会跳出这样的提示,并且程序自动关闭。希望能解答一下是否出了什么差错
image
image
image

QQRecord2Excel对非群聊(私聊)记录进行处理时发生异常

私聊数据进行1,2步骤时没有遇到问题,但是在进行第3步时候遇到了如下异常。
Empty DataFrame
Columns: []
Index: []
Traceback (most recent call last):
File "QQRecord2Excel.py", line 151, in
File "site-packages\pandas\core\generic.py", line 5192, in setattr
File "pandas/_libs/properties.pyx", line 67, in pandas._libs.properties.AxisProperty.set
File "site-packages\pandas\core\generic.py", line 690, in _set_axis
File "site-packages\pandas\core\internals\managers.py", line 183, in set_axis
ValueError: Length mismatch: Expected axis has 0 elements, new values have 2 elements
[35760] Failed to execute script QQRecord2Excel
注:我不太清楚该如何对split.txt进行编辑,这对于处理聊天记录而言是必要的吗

出现fail to load the native tensorflow runtime

我电脑上同时有32位python3.7和64位python3.6,只有后者安装了能够正常import的TensorFlow。但是ossas.exe貌似默认使用python3.7并抛出错误。如何解决?
’C:\Users\a>C:\Users\a\Desktop\chatbot\OSSAS.exe
c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py:489: Matp
lotlibDeprecationWarning:
The MATPLOTLIBDATA environment variable was deprecated in Matplotlib 3.1 and wil
l be removed in 3.3.
Traceback (most recent call last):
File "tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_impor
t_helper
File "imp.py", line 296, in find_module
ImportError: No module named '_pywrap_tensorflow_internal'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "tensorflow\python\pywrap_tensorflow.py", line 58, in
File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py",
line 489, in exec_module
File "tensorflow\python\pywrap_tensorflow_internal.py", line 28, in
File "tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_impor
t_helper
ImportError: DLL load failed: 找不到指定的模块。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 5, in
File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py",
line 489, in exec_module
File "Seq2Seq.py", line 8, in
File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py",
line 489, in exec_module
File "tensorflow_init_.py", line 40, in
File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py",
line 489, in exec_module
File "tensorflow\python_init_.py", line 49, in
File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py",
line 489, in exec_module
File "tensorflow\python\pywrap_tensorflow.py", line 74, in
ImportError: Traceback (most recent call last):
File "tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_impor
t_helper
File "imp.py", line 296, in find_module
ImportError: No module named '_pywrap_tensorflow_internal'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "tensorflow\python\pywrap_tensorflow.py", line 58, in
File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py",
line 489, in exec_module
File "tensorflow\python\pywrap_tensorflow_internal.py", line 28, in
File "tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_impor
t_helper
ImportError: DLL load failed: 找不到指定的模块。

Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors

for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
[5916] Failed to execute script main

C:\Users\a>‘

使用Coolq接口时报错

由于coolq被封,所以我用的是node-onebot,不知道是不是node-onebot的问题

报错:

输入工作模式:3
Mon Jan 24 19:08:27 2022 开始监听Coolq/HTTP上报
{'self_id': 3495297353, 'time': 1643022537, 'post_type': 'message', 'message_type': 'group', 'sub_type': 'normal', 'message_id': 'OEEuQrCCrTcAAAEeS47XBGHuiMkB', 'group_id': 943795778, 'group_name': 'KucRobot官方群', 'user_id': 2961354039, 'anonymous': None, 'message': [{'type': 'at', 'data': {'qq': 3495297353, 'text': '@小楚妹妹'}}, {'type': 'text', 'data': {'text': ' 在?'}}], 'raw_message': '[CQ:at,qq=3495297353,text=@小楚妹妹] 在?', 'atme': True, 'block': False, 'seqid': 286, 'font': '微软雅黑', 'sender': {'user_id': 2961354039, 'nickname': '裕依', 'card': '', 'sex': 'male', 'age': 14, 'area': '徐州', 'level': 1, 'role': 'owner', 'title': ''}}
Traceback (most recent call last):
File "main.py", line 117, in
File "main.py", line 48, in http_receive
AttributeError: 'list' object has no attribute 'find'
[17708] Failed to execute script main

batchSize > 1时,INVALID_ARGUMENT: required broadcastable shapes

batchsize测试下来只能设置1,不管是什么gpu,一旦设置大于1就会报错如下

-----------------
模式1:搭建模型
模式2:训练模型
模式3:开启Coolq接口
模式4:进行对话
-----------------
输入工作模式:2
输入循环轮数:2000
输入batch size:2
Tue May 10 09:35:46 2022 正在处理训练数据...
Tue May 10 09:35:46 2022 循环轮数:2000 batch size:2
2022-05-10 09:35:46.823820: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:936] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-05-10 09:35:46.833743: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:936] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-05-10 09:35:46.834556: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:936] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-05-10 09:35:46.835683: I tensorflow/core/platform/cpu_feature_guard.cc:151] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-05-10 09:35:46.836013: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:936] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-05-10 09:35:46.836818: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:936] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-05-10 09:35:46.837657: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:936] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-05-10 09:35:47.446699: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:936] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-05-10 09:35:47.447592: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:936] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-05-10 09:35:47.448356: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:936] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2022-05-10 09:35:47.449143: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.
2022-05-10 09:35:47.449235: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1525] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 10794 MB memory:  -> device: 0, name: Tesla K80, pci bus id: 0000:00:04.0, compute capability: 3.7
Epoch 1/2000
2022-05-10 09:36:03.719284: I tensorflow/stream_executor/cuda/cuda_dnn.cc:368] Loaded cuDNN version 8100
2022-05-10 09:36:04.314831: W tensorflow/core/framework/op_kernel.cc:1733] INVALID_ARGUMENT: required broadcastable shapes
Traceback (most recent call last):
  File "/content/drive/MyDrive/Ossas_ChatBot/main.py", line 113, in <module>
    rnn.train_model(bat, epo)
  File "/content/drive/MyDrive/Ossas_ChatBot/Seq2Seq.py", line 79, in train_model
    model.fit([encoder_input_data, decoder_input_data], decoder_target_data,
  File "/usr/local/lib/python3.9/site-packages/keras/utils/traceback_utils.py", line 67, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "/usr/local/lib/python3.9/site-packages/tensorflow/python/eager/execute.py", line 54, in quick_execute
    tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
tensorflow.python.framework.errors_impl.InvalidArgumentError: Graph execution error:

Detected at node 'Equal' defined at (most recent call last):
    File "/content/drive/MyDrive/Ossas_ChatBot/main.py", line 113, in <module>
      rnn.train_model(bat, epo)
    File "/content/drive/MyDrive/Ossas_ChatBot/Seq2Seq.py", line 79, in train_model
      model.fit([encoder_input_data, decoder_input_data], decoder_target_data,
    File "/usr/local/lib/python3.9/site-packages/keras/utils/traceback_utils.py", line 64, in error_handler
      return fn(*args, **kwargs)
    File "/usr/local/lib/python3.9/site-packages/keras/engine/training.py", line 1384, in fit
      tmp_logs = self.train_function(iterator)
    File "/usr/local/lib/python3.9/site-packages/keras/engine/training.py", line 1021, in train_function
      return step_function(self, iterator)
    File "/usr/local/lib/python3.9/site-packages/keras/engine/training.py", line 1010, in step_function
      outputs = model.distribute_strategy.run(run_step, args=(data,))
    File "/usr/local/lib/python3.9/site-packages/keras/engine/training.py", line 1000, in run_step
      outputs = model.train_step(data)
    File "/usr/local/lib/python3.9/site-packages/keras/engine/training.py", line 864, in train_step
      return self.compute_metrics(x, y, y_pred, sample_weight)
    File "/usr/local/lib/python3.9/site-packages/keras/engine/training.py", line 957, in compute_metrics
      self.compiled_metrics.update_state(y, y_pred, sample_weight)
    File "/usr/local/lib/python3.9/site-packages/keras/engine/compile_utils.py", line 459, in update_state
      metric_obj.update_state(y_t, y_p, sample_weight=mask)
    File "/usr/local/lib/python3.9/site-packages/keras/utils/metrics_utils.py", line 70, in decorated
      update_op = update_state_fn(*args, **kwargs)
    File "/usr/local/lib/python3.9/site-packages/keras/metrics.py", line 178, in update_state_fn
      return ag_update_state(*args, **kwargs)
    File "/usr/local/lib/python3.9/site-packages/keras/metrics.py", line 729, in update_state
      matches = ag_fn(y_true, y_pred, **self._fn_kwargs)
    File "/usr/local/lib/python3.9/site-packages/keras/metrics.py", line 4043, in categorical_accuracy
      tf.equal(
Node: 'Equal'
Detected at node 'Equal' defined at (most recent call last):
    File "/content/drive/MyDrive/Ossas_ChatBot/main.py", line 113, in <module>
      rnn.train_model(bat, epo)
    File "/content/drive/MyDrive/Ossas_ChatBot/Seq2Seq.py", line 79, in train_model
      model.fit([encoder_input_data, decoder_input_data], decoder_target_data,
    File "/usr/local/lib/python3.9/site-packages/keras/utils/traceback_utils.py", line 64, in error_handler
      return fn(*args, **kwargs)
    File "/usr/local/lib/python3.9/site-packages/keras/engine/training.py", line 1384, in fit
      tmp_logs = self.train_function(iterator)
    File "/usr/local/lib/python3.9/site-packages/keras/engine/training.py", line 1021, in train_function
      return step_function(self, iterator)
    File "/usr/local/lib/python3.9/site-packages/keras/engine/training.py", line 1010, in step_function
      outputs = model.distribute_strategy.run(run_step, args=(data,))
    File "/usr/local/lib/python3.9/site-packages/keras/engine/training.py", line 1000, in run_step
      outputs = model.train_step(data)
    File "/usr/local/lib/python3.9/site-packages/keras/engine/training.py", line 864, in train_step
      return self.compute_metrics(x, y, y_pred, sample_weight)
    File "/usr/local/lib/python3.9/site-packages/keras/engine/training.py", line 957, in compute_metrics
      self.compiled_metrics.update_state(y, y_pred, sample_weight)
    File "/usr/local/lib/python3.9/site-packages/keras/engine/compile_utils.py", line 459, in update_state
      metric_obj.update_state(y_t, y_p, sample_weight=mask)
    File "/usr/local/lib/python3.9/site-packages/keras/utils/metrics_utils.py", line 70, in decorated
      update_op = update_state_fn(*args, **kwargs)
    File "/usr/local/lib/python3.9/site-packages/keras/metrics.py", line 178, in update_state_fn
      return ag_update_state(*args, **kwargs)
    File "/usr/local/lib/python3.9/site-packages/keras/metrics.py", line 729, in update_state
      matches = ag_fn(y_true, y_pred, **self._fn_kwargs)
    File "/usr/local/lib/python3.9/site-packages/keras/metrics.py", line 4043, in categorical_accuracy
      tf.equal(
Node: 'Equal'
2 root error(s) found.
  (0) INVALID_ARGUMENT:  required broadcastable shapes
	 [[{{node Equal}}]]
	 [[broadcast_weights_1/assert_broadcastable/AssertGuard/pivot_f/_15/_71]]
  (1) INVALID_ARGUMENT:  required broadcastable shapes
	 [[{{node Equal}}]]
0 successful operations.
0 derived errors ignored. [Op:__inference_train_function_21896]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.