Skip to content

Conversation

@Shaadow-Monarch
Copy link

@Shaadow-Monarch Shaadow-Monarch commented Dec 2, 2025

predict_step() is not handling the list of inputs correctly. BERT models need both token IDs and segment IDs (the two inputs you're preparing).
To unpack it properly i did

y = self.model.predict(x)[0]

model.predict() is the standard Keras method that properly handles multiple inputs. The predict_step() method wrapping inputs incorrectly in your case.

model.predict() is the standard Keras method that properly handles multiple inputs. The predict_step() method wrapping inputs incorrectly in your case.
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

Successfully merging this pull request may close these issues.

1 participant