model: TFBertModel.from_pretrained(‘hfl/chinese-bert-wwm-ext’)
question:
I want to extract the output of the feed & forward layer of the Bert model, that is, the place marked by the red box in the figure. In some functions, it can be obtained through Bert. Model. Layers [- 2], but I don’t know how to extract it in transformers. Its shape needs to be (batch)_ size, max_ len, 768)