小编Shi*_*ata的帖子

适用于 Keras 2.3 的 Tensorflow 包

我尝试在我的计算机上使用 Keras,但不断收到错误消息“AttributeError:模块‘tensorflow.python.keras.backend’没有属性‘get_graph’”。

堆栈跟踪是:

---------------------------------------------------------------------------
 AttributeError                            Traceback (most recent call last)
<ipython-input-1-dd13cebc6f04> in <module>
----> 1 import acgan

~/Documents/GitHub/Keras-GAN/acgan/acgan.py in <module>
  1 from __future__ import print_function, division
  2 
 ----> 3 from keras.datasets import mnist
  4 from keras.layers import Input, Dense, Reshape, Flatten, Dropout, multiply
  5 from keras.layers import BatchNormalization, Activation, Embedding, ZeroPadding2D

/anaconda3/lib/python3.6/site-packages/keras/__init__.py in <module>
  1 from __future__ import absolute_import
  2 
 ----> 3 from . import utils
  4 from . import activations
  5 from . import applications

/anaconda3/lib/python3.6/site-packages/keras/utils/__init__.py in <module>
  4 …
Run Code Online (Sandbox Code Playgroud)

python-3.x keras tensorflow

3
推荐指数
1
解决办法
9010
查看次数

标签 统计

keras ×1

python-3.x ×1

tensorflow ×1