【问题标题】:AttributeError:'tensorflow.python.framework.fast_tensor_util' has no attribute 'appendfloat32arraytotensorproto'AttributeError:'tensorflow.python.framework.fast_tensor_util'没有属性'appendfloat32arraytotensorproto'
【发布时间】:2020-10-16 11:01:42
【问题描述】:

TensorFlow 2.2.0 + Python 3.7 上的 Keras 2.3.1

如何修复这个 AttributeError?我重新安装了 TensorFlow,但它不起作用。

【问题讨论】:

    标签: tensorflow attributeerror


    【解决方案1】:

    Python 3.5.6 :: Anaconda, Inc. 遇到了完全相同的问题,但我认为这不是 Python 或 TF 版本错误。

    坦率地说,决定像这样创建一个新的 py-env(鉴于我使用 conda 发行版):

    创建了这个env.yml 文件:

    name: tf2
    channels:
      - defaults
      - anaconda
    dependencies:
      - jupyter
      - matplotlib
      - numpy
      - python=3.7
      - scikit-learn
      - tensorflow
    

    然后跑了

    conda env create -f env.yml 
    conda activate tf2
    python -m ipykernel install --user --name=tf2
    jupyter notebook
    

    一切正常:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-12-01
      • 2021-04-19
      • 1970-01-01
      • 2021-11-22
      • 2020-12-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多