python - tensorflow: <built-in function AppendInt32ArrayToTensorProto> 返回 NULL 没有设置错误

标签 python tensorflow

在将 tensorflow 安装到我的系统时遇到了各种问题,最终在 v1.4.1 上解决了。试图运行这个:https://github.com/sherjilozair/char-rnn-tensorflow

SystemError: built-in function AppendInt32ArrayToTensorProto returned NULL without setting an error

已搜索但找不到此特定问题或具有相同问题的较新版本中的任何补丁。

最佳答案

您使用的是旧版 Tensorflow,它可能与您当前的 python 版本不兼容

  1. 检查您的计算机配置并在下表的帮助下安装匹配的 Tensorflow 版本:https://www.tensorflow.org/install/pip#package-location
  2. 安装与您的 Tensorflow 版本匹配的 python 版本(也可以在上面提供的链接中找到)
  3. 检查你的python版本:$ python3 --version
  4. 检查您的 Tensorflow 版本:$ pip3 list | grep tensorflow
  5. 如果版本与上表中所述匹配,您可能会消除错误

我在尝试运行 Tensorflow 图像再训练脚本时遇到了类似的问题:https://github.com/tensorflow/hub/raw/master/examples/image_retraining/retrain.py

在我的例子中,问题是由 Tensorflow 1.11.0 与 python 3.7.0 不兼容引起的。

为我解决问题的步骤:

  1. 卸载 python 3.7.0。
  2. 安装 python 3.6.0。
  3. 我再次运行脚本,现在它运行正常

希望它能帮到你 :)

关于python - tensorflow: <built-in function AppendInt32ArrayToTensorProto> 返回 NULL 没有设置错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52029827/

相关文章:

python - celery + RabbitMQ + "A socket error ocurred"

python - Google IAP 不断响应 401 Unauthorized

Python - 从大型 (6GB+) zip 文件中提取文件

python - 如何查找python变量占用的字节数

python - 喀拉斯 LSTM : a time-series multi-step multi-features forecasting - poor results

python - 使用 tensorflow 实现批量归一化

python - 如何从 tensorflow 数据集中提取没有标签的数据

python - 如何在 pyqtgraph 中正确缩放/旋转图像?

tensorflow - 图像序列的分类(固定数量)

ios - 将重新训练的数据转换为 .pb 格式的 ios 相机示例?