小编Pe *_*Dro的帖子

AttributeError: 'google.protobuf.pyext._message.RepeatedCompositeCo' 对象没有属性 'append'

我正在 Google Collab 上的 MobileNetv2 预训练模型上构建迁移学习模型。直到昨天,一切都很好。但是,今天,在执行

#Create the base model(feature_extractor) from the pre-trained model MobileNet V2
_URL = "https://tfhub.dev/google/tf2-preview/mobilenet_v2/feature_vector/2"
feature_extractor = hub.KerasLayer(_URL, input_shape=(_TARGET_SIZE, _TARGET_SIZE,3))
Run Code Online (Sandbox Code Playgroud)

我收到错误:


---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-29-663d4cbb70df> in <module>()
      2 _TARGET_SIZE = 224
      3 _URL = "https://tfhub.dev/google/tf2-preview/mobilenet_v2/feature_vector/2"
----> 4 feature_extractor = hub.KerasLayer(_URL, input_shape=(_TARGET_SIZE, _TARGET_SIZE,3))
      5 #print(feature_extractor._layers)


/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/ops/resource_variable_ops.py in _variable_handle_from_shape_and_dtype(shape, dtype, shared_name, name, graph_mode, initial_value)
    165     handle_data = cpp_shape_inference_pb2.CppShapeInferenceResult.HandleData()
    166     handle_data.is_set = True
--> 167     handle_data.shape_and_type.append(
    168         cpp_shape_inference_pb2.CppShapeInferenceResult.HandleShapeAndType(
    169             shape=shape.as_proto(), dtype=dtype.as_datatype_enum))

AttributeError: 'google.protobuf.pyext._message.RepeatedCompositeCo' object has …
Run Code Online (Sandbox Code Playgroud)

python protocol-buffers tensorflow google-colaboratory

13
推荐指数
2
解决办法
2万
查看次数

如何找到 NVIDIA Jetson 设备的 JetPack 版本?

有没有办法找到我的 NVIDIA Jetson Xavier AGX 套件上当前安装的 JetPack 版本?

nvidia-jetson jetson-xavier nvidia-jetpack-sdk

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