【发布时间】:2021-06-15 15:55:44
【问题描述】:
我正在使用 Tensorflow Hub 从图像中提取特征。即,我正在使用模块hub.Module("https://tfhub.dev/google/imagenet/resnet_v2_50/feature_vector/3")。
因为我想从最后一个卷积层中提取特征,所以我有点困惑应该使用Resnet50 中的哪个字典输出。例如:
image = ...
embedding_module = hub.Module("https://tfhub.dev/google/imagenet/resnet_v2_50/feature_vector/3")
output = embedding_module(image, signature="image_feature_vector",
as_dict=True)
现在,如果我们打印出这本字典中的键,则有 3 个不同的键,我不知道它们之间的区别。
resnet_v2_50/block4/unit_3/bottleneck_v2resnet_v2_50/block4/unit_3/bottleneck_v2/conv3resnet_v2_50/block4
令我感到困惑的是,它们都有一个具有相同形状(7, 7, 2048) 的输出,但resnet_v2_50/block4/unit_3/bottleneck_v2 和resnet_v2_50/block4 的值与resnet_v2_50/block4/unit_3/bottleneck_v2/conv3 不同。有人可以指出应该使用哪个键从@987654331@ 的最后一个卷积层提取特征,以及我列出的每个键之间的区别是什么?
谢谢!
【问题讨论】:
标签: python tensorflow deep-learning resnet tensorflow-hub