excuse me I got this error
ValueError: Layer weight shape (30522, 768) not compatible with provided weight shape torch.Size([1, 15, 768])
while using bert as embedding layer as
 embed = Embedding(30522, 768, weights=[embedding_matrix], input_length=max_length , trainable=False)(inputs2)
embedding_matrix from
 input_ids =torch.tensor(tokenizer.encode(sentence)).unsqueeze(0)
 outputs = BERT(input_ids)
 embedding_matrix = outputs[0]