Open bugczw opened 3 years ago
Try setting config.add_cross_attention=True, I think it is a new thing, thus I didn't have it.
Also, I want to know how many is the input seq_length. What's more, how should I set the config of BertCapModel?
Try setting config.add_cross_attention=True, I think it is a new thing, thus I didn't have it.
Should I change BertConfig.max_position_embeddings?
You can try remove the max positional embedding and see if it works.
The BertCapModel uses two BertModel as encoder and decoder. However, in the config about BertModel, it sets max_position_embeddings = 17 in decoder, which leads to tensor size not matching, like this:
In this problem, it means that seq_length must be equal to max_position_embeddings. However, when changing the max_position_embeddings to seq_length, it also has some problems:
At last, in order to check the correctness about my test, I also want to know the input shape about BertCapModel.