[Documentation Request] #19819
Labels
documentation
improvements or additions to documentation; typically submitted using template
stale
issues that have not been addressed in a while; categorized by a bot
@onnx_op(op_type="GPT2Tokenizer",
inputs=[PyCustomOpDef.dt_string],
outputs=[PyCustomOpDef.dt_int64, PyCustomOpDef.dt_int64],
attrs={"padding_length": PyCustomOpDef.dt_int64})
def bpe_tokenizer(s, **kwargs):
padding_length = kwargs["padding_length"]
input_ids, attention_mask = cls.tokenizer.tokenizer_sentence([s[0]], padding_length)
return input_ids, attention_mask
op_type should be same as function name, change to
@onnx_op(op_type="bpe_tokenizer", ...
Document Details
The text was updated successfully, but these errors were encountered: