我在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