我安装了anaconda,创建了一个全新的环境,并通过pip安装了tensorflow。
import tensorflow as tf
tf.keras.applications.ResNet152V2(
include_top=True,
weights="imagenet",
input_tensor=None,
input_shape=None,
pooling=None,
classes=1000,
classifier_activation="softmax",
)
我直接得到:
TypeError: Couldn't build proto file into descriptor pool!
Invalid proto descriptor for file "tensorflow/python/framework/cpp_shape_inference.proto":
tensorflow.CppShapeInferenceResult.HandleShapeAndType.specialized_type: ".tensorflow.SpecializedType" is not defined.
我做错了什么?
1条答案
按热度按时间3bygqnnd1#
这段代码在Google_colab上运行良好
产出
问题与Protobuf安装有关