Problems encountered when implementing official tutorial documents for module DeLF #532
Unanswered
VergilWang15
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Hi @VergilWang15 I guess your code uses sample code of this page. delf_module = hub.Module("https://tfhub.dev/google/delf/1") delf_inputs = {
# An image tensor with dtype float32 and shape [height, width, 3], where
# height and width are positive integers:
'image': float_image,
# Scaling factors for building the image pyramid as described in the paper:
'image_scales': [0.25, 0.3536, 0.5, 0.7071, 1.0, 1.4142, 2.0],
# Image features whose attention score exceeds this threshold will be
# returned:
'score_threshold': 100.0,
# The maximum number of features that should be returned:
'max_feature_num': 1000,
}
# Apply the DELF module to the inputs to get the outputs.
delf_outputs = delf_module(delf_inputs, as_dict=True) However, delf = hub.load('https://tfhub.dev/google/delf/1').signatures['default']
I checked codes above to run the Jupyter notebook of TensorFlow Hub on Google Colab (Python 3.7.10 and TensorFlow 2.4.1, 2.5.0). Output should be like this. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
TF hub DeLF
It seems to be no available output from the module.
When I try to print delf_outputs
It seems that every label's shape is None.
Thus, in the part
Use the locations and description vectors to match the images
This code does not work cause
shape[0]
is noneI'm using python 3.6 with tensorflow 2.5.0
The complete code is at the end. I‘m new to the TF-hub. Any help is grateful.
Beta Was this translation helpful? Give feedback.
All reactions