792d64bd6f64c4483af5ca1cdb7cbe22c13b5715,demo/load_model/load_and_predict.py,,,#,7
Before Change
if len(sys.argv) != 4:
print("python load_model.py CONFIG_PATH CHECKPOINT_PATH DICT_PATH")
print("CONFIG_PATH: $UNZIPPED_MODEL_PATH/bert_config.json")
print("CHECKPOINT_PATH: $UNZIPPED_MODEL_PATH/bert_model.ckpt")
print("DICT_PATH: $UNZIPPED_MODEL_PATH/vocab.txt")
sys.exit(-1)
print("This demo demonstrates how to load the pre-trained model and check whether the two sentences are continuous")
After Change
print("This demo demonstrates how to load the pre-trained model and check whether the two sentences are continuous")
model_path = sys.argv[1]
config_path = os.path.join(model_path, "bert_config.json")
checkpoint_path = os.path.join(model_path, "bert_model.ckpt")
dict_path = os.path.join(model_path, "vocab.txt")
model = load_trained_model_from_checkpoint(config_path, checkpoint_path, training=True, seq_len=None)
model.summary(line_length=120)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 12
Instances Project Name: CyberZHG/keras-bert
Commit Name: 792d64bd6f64c4483af5ca1cdb7cbe22c13b5715
Time: 2019-07-12
Author: CyberZHG@gmail.com
File Name: demo/load_model/load_and_predict.py
Class Name:
Method Name:
Project Name: CyberZHG/keras-bert
Commit Name: 792d64bd6f64c4483af5ca1cdb7cbe22c13b5715
Time: 2019-07-12
Author: CyberZHG@gmail.com
File Name: demo/load_model/load_and_predict.py
Class Name:
Method Name:
Project Name: CyberZHG/keras-bert
Commit Name: 792d64bd6f64c4483af5ca1cdb7cbe22c13b5715
Time: 2019-07-12
Author: CyberZHG@gmail.com
File Name: demo/load_model/load_and_extract.py
Class Name:
Method Name:
Project Name: CyberZHG/keras-bert
Commit Name: 792d64bd6f64c4483af5ca1cdb7cbe22c13b5715
Time: 2019-07-12
Author: CyberZHG@gmail.com
File Name: demo/load_model/load_and_pool.py
Class Name:
Method Name: