kpe / bert-for-tf2

A Keras TensorFlow 2.0 implementation of BERT, ALBERT and adapter-BERT.
https://github.com/kpe/bert-for-tf2
MIT License
802 stars 193 forks source link

How to send padding id to model when vocab id:0 is not <PAD> #68

Open HX-idiot opened 4 years ago

HX-idiot commented 4 years ago

Hello, I found you code calculate the masking using tf.not_equal(input_ids, 0), but in my vocab.txt, 0 refers to a character rather than , how to send manually constructed masking embedding to model?