I'm running into an issue with tensorflow 2.4
import tensorflow as tf
tf.__version__
>>> 2.4.0
from vectorhub.encoders.text.tfhub import Bert2Vec
model = Bert2Vec()
>>>
ValueError: Could not find matching function to call loaded from the SavedModel. Got:
Positional arguments (3 total):
* {'input_word_ids': <tf.Tensor 'inputs_2:0' shape=(None, 512) dtype=int32>, 'input_mask': <tf.Tensor 'inputs:0' shape=(None, 512) dtype=int32>, 'input_type_ids': <tf.Tensor 'inputs_1:0' shape=(None, 512) dtype=int32>}
* False
* None
Keyword arguments: {}
Expected these arguments to match one of the following 4 option(s):
Option 1:
Positional arguments (3 total):
* [TensorSpec(shape=(None, None), dtype=tf.int32, name='inputs/0'), TensorSpec(shape=(None, None), dtype=tf.int32, name='inputs/1'), TensorSpec(shape=(None, None), dtype=tf.int32, name='inputs/2')]
* False
* None
Keyword arguments: {}
Option 2:
Positional arguments (3 total):
* [TensorSpec(shape=(None, None), dtype=tf.int32, name='inputs/0'), TensorSpec(shape=(None, None), dtype=tf.int32, name='inputs/1'), TensorSpec(shape=(None, None), dtype=tf.int32, name='inputs/2')]
* True
* None
Keyword arguments: {}
Option 3:
Positional arguments (3 total):
* [TensorSpec(shape=(None, None), dtype=tf.int32, name='input_word_ids'), TensorSpec(shape=(None, None), dtype=tf.int32, name='input_mask'), TensorSpec(shape=(None, None), dtype=tf.int32, name='input_type_ids')]
* True
* None
Keyword arguments: {}
Option 4:
Positional arguments (3 total):
* [TensorSpec(shape=(None, None), dtype=tf.int32, name='input_word_ids'), TensorSpec(shape=(None, None), dtype=tf.int32, name='input_mask'), TensorSpec(shape=(None, None), dtype=tf.int32, name='input_type_ids')]
* False
* None
Keyword arguments: {}
Any suggestion on how to fix that?
I'm running into an issue with tensorflow 2.4
Any suggestion on how to fix that?