We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7cffe10 commit 17155b4Copy full SHA for 17155b4
official/nlp/tasks/utils.py
@@ -49,8 +49,8 @@ def get_encoder_from_hub(hub_model_path: str) -> tf.keras.Model:
49
# as input and returns a dict.
50
# TODO(chendouble): Remove the support of legacy hub model when the new ones
51
# are released.
52
- hub_model = hub.load(hub_model_path)
53
- hub_output_signature = hub_model.signatures['serving_default'].outputs
+ hub_output_signature = hub_layer.resolved_object.signatures[
+ 'serving_default'].outputs
54
if len(hub_output_signature) == 2:
55
logging.info('Use the legacy hub module with list as input/output.')
56
pooled_output, sequence_output = hub_layer(
0 commit comments