77a383e645c7b42ea025511738638e1238b971bb,pycorrector/rnn_crf/train.py,,train,#,21
Before Change
build_dict(label_data_path, label_dict_path)
// load dict
word_ids_dict, ids_word_dict = load_dict(word_dict_path), load_reverse_dict(word_dict_path)
label_ids_dict, ids_label_dict = load_dict(label_dict_path), load_reverse_dict(label_dict_path)
// Read data to index
word_ids = data_reader(word_data_path, word_ids_dict)
label_ids = data_reader(label_data_path, label_ids_dict)
After Change
print("y_test.shape", y_test.shape)
logger.info("Data loaded.")
logger.info("Training BILSTM_CRF model...")
model = create_model(word_ids_dict, label_ids_dict,
embedding_dim, rnn_hidden_dim)
// fit
model.fit(X_train, y_train,
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: shibing624/pycorrector
Commit Name: 77a383e645c7b42ea025511738638e1238b971bb
Time: 2018-04-10
Author: 507153809@qq.com
File Name: pycorrector/rnn_crf/train.py
Class Name:
Method Name: train
Project Name: tensorflow/privacy
Commit Name: 10335f61775faabe5e931f30b0ecf91f0719b727
Time: 2020-05-07
Author: schien@google.com
File Name: tutorials/mnist_dpsgd_tutorial.py
Class Name:
Method Name: main
Project Name: GoogleCloudPlatform/healthcare
Commit Name: db2a9d3a62e36db12066c980d180377fffb31fcc
Time: 2018-11-29
Author: noreply@google.com
File Name: deploy/rule_generator/rule_generator.py
Class Name:
Method Name: run