BERT-pytorch icon indicating copy to clipboard operation
BERT-pytorch copied to clipboard

What should be the shapes and example of values of x and segment_info in BERT.forward?

Open komelianchuk opened this issue 6 years ago • 0 comments

I'm trying to add BERT as trainable part to my model and want to pass some data to it. Could you complete my code example with some x and segment_info?

from bert_pytorch import BERT
N = 30000
bert_model = BERT(N)
x = ...
segment_info = ...
bert_model.forward(x, segment_info)

komelianchuk avatar Dec 05 '18 16:12 komelianchuk