python+tensorflow练习中遇到问题/Check failed: PyBfloat16_Type.tp_base != nullptr

TypeError: 'range' object does not support item assignment

说明在python3中range生成的是range object而不是队列,须要改为list(range(10))python

2.当tensofrlow遇到这个问题时:code

Check failed: PyBfloat16_Type.tp_base != nullptr

这个问题是tensorflow环境的numpy版本太低,须要升级numpy的版本。队列

  1. 首先进入tensorflow环境,并卸载numpy
activate tensorflow
pip uninstall numpy
  1. 最后更新目前惟一存在的numpy:
python -m pip install --upgrade numpy

其后运行程序成功执行。具体问题具体分析ip

相关文章
相关标签/搜索