-
Notifications
You must be signed in to change notification settings - Fork 248
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
Implement compute_output_spec() for tokenizers with vocabulary. #1523
Conversation
Previous version used |
Ran |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Just a few comments
…arted from new point in master branch)
Applied above discussions. The function now looks like this: class TokenizerWithVocabulary:
def compute_output_spec(self, input_spec) -> keras.KerasTensor:
return keras.KerasTensor(
input_spec.shape + (self.sequence_length,), dtype=self.compute_dtype
) |
Thank you! |
…s-team#1523) * Implement compute_output_spec() for tokenizers with vocabulary. (restarted from new point in master branch) * Remove type annotation from compute_output_spec() in tokenizers
Small fix for Issue 1522
Implements the same
compute_output_spec()
method forBytePairTokenizer
,WordPieceTokenizer
, andSentencePieceTokenizer
.