kamalkraj/BERT-NER

Why do we need [PAD] as a valid sequence?

minstar opened this issue · 2 comments

In converting examples to features function (convert_examples_to_features), we set valid.append(1) at [PAD] position.
Why do we have to use [PAD] position?
Can anyone explain this to me?

@minstar Did you find the reason for this?

@minstar Did you find the reason for this?

I just used HuggingFace code (run_ner.py) to reproduce results.
And as I think, the pad position only needs to be considered to distinguish with the context.
Thus, in this case, it really doesn't matter to append (1) or append (-100)