模块 tensorflow.tools.api.generator.api.compat 没有属性 v1



我在Ubuntu上使用Python 3和tensorflow 1.8.0

ipython notebook,我跑了:

%load_ext autoreload
%autoreload 2
%matplotlib inline
import tensorflow as tf
from keras.layers import Input
tf.compat.v1.image.resize_bilinear()

但我得到attributeerror: module tensorflow.tools.api.generator.api.compat has no attribute v1

我该如何解决这个问题?

更新 Tensorflow 可以解决这个问题。

例如,运行pip install --upgrade --ignore-installed tensorflow

最新更新