Awesome
java-bert-predict
turn bert pretrain checkpoint into saved model for a feature extracting demo in java
usage
-
download google bert pretrain from here and unzip it into a proper path.
-
because java cannot work with tensorflow checkpoint directly, we need to transform checkpoint into saved_model with following command
python script/checkpoint_to_saved_model.py path/to/unzipped/pretrain/checkpoint path/to/save/model
-
run java program with path/to/save/model as params