Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running the model.fit on the wrapped model "Only input tensors may be passed as positional arguments." #951

Open
ashkanee opened this issue Apr 5, 2024 · 0 comments

Comments

@ashkanee
Copy link

ashkanee commented Apr 5, 2024

When executing (it is the wrapped model):

model.fit(training_dataset, epochs=5) where
training_dataset = tf.data.Dataset.from_tensor_slices((training_input, training_output.T))

I get:

RuntimeError: Exception encountered when calling ModelWrapper.call(). Could not automatically infer the output shape / dtype of 'model_wrapper' (of type ModelWrapper). Either the ModelWrapper.call()method is incorrect, or you need to implement theModelWrapper.compute_output_spec() / compute_output_shape() method. Error encountered: Only input tensors may be passed as positional arguments. The following argument value should be passed as a keyword argument: None (of type <class 'NoneType'>) Arguments received by ModelWrapper.call(): • args=('<KerasTensor shape=(None,), dtype=float32, sparse=None, name=keras_tensor_10>',) • kwargs={'mask': 'None'}

Can you please help? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant