Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, thank you for creating an excellent repository!
I found that
pytorch-pretrained_bert
was replaced withtransformers
.Using
transformer
requires a modification onbert_juman.py
.The modification is adding an argument
output_hidden_states=True
to get hidden states in the forward function of BERT.You can see the detail description about
output_hidden_states=True
in the link as below,https://github.com/huggingface/transformers/blob/master/src/transformers/modeling_bert.py#L688
I tried to describe the modification as this pull request. I hope it will be helpful for you.
I attach my results as below,
Note that the embedding is different because I used an alternate model for transformers from Kurohashi-lab. (See "(更新: 19/11/15) ")
Thanks,