Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ProHiryu/bert-chinese-ner
/ functions
Functions
31 in github.com/ProHiryu/bert-chinese-ner
⨍
Functions
31
◇
Types & classes
4
↓ 6 callers
Function
metrics_from_confusion_matrix
Precision, Recall and F1 from the confusion matrix Parameters ---------- cm : tf.Tensor of type tf.int32, of shape (num_classes, num_cl
tf_metrics.py:168
↓ 6 callers
Function
safe_div
Safe division, return 0 if denominator is 0
tf_metrics.py:137
↓ 4 callers
Function
create_int_feature
(values)
BERT_NER.py:305
↓ 3 callers
Method
_create_example
(self, lines, set_type)
BERT_NER.py:194
↓ 3 callers
Method
_read_data
Reads a BIO data.
BERT_NER.py:147
↓ 3 callers
Function
file_based_input_fn_builder
(input_file, seq_length, is_training, drop_remainder)
BERT_NER.py:319
↓ 3 callers
Function
filed_based_convert_examples_to_features
( examples, label_list, max_seq_length, tokenizer, output_file,mode=None )
BERT_NER.py:290
↓ 2 callers
Function
pr_re_fbeta
Uses a confusion matrix to compute precision, recall and fbeta
tf_metrics.py:145
↓ 1 callers
Function
_decode_record
(record, name_to_features)
BERT_NER.py:329
↓ 1 callers
Function
convert_single_example
(ex_index, example, label_map, max_seq_length, tokenizer,mode)
BERT_NER.py:213
↓ 1 callers
Function
create_model
(bert_config, is_training, input_ids, input_mask, segment_ids, labels, num_labels, use_one_h
BERT_NER.py:353
↓ 1 callers
Function
fbeta
Multi-class fbeta metric for Tensorflow Parameters ---------- labels : Tensor of tf.int32 or tf.int64 The true labels pre
tf_metrics.py:97
↓ 1 callers
Method
get_dev_examples
(self, data_dir)
BERT_NER.py:179
↓ 1 callers
Method
get_labels
(self)
BERT_NER.py:189
↓ 1 callers
Method
get_test_examples
(self,data_dir)
BERT_NER.py:184
↓ 1 callers
Method
get_train_examples
(self, data_dir)
BERT_NER.py:174
↓ 1 callers
Function
model_fn_builder
(bert_config, num_labels, init_checkpoint, learning_rate, num_train_steps, num_warmup_st
BERT_NER.py:395
↓ 1 callers
Function
write_tokens
(tokens,mode)
BERT_NER.py:204
Method
__init__
Constructs a InputExample. Args: guid: Unique id for the example. text_a: string. The untokenized text of the first s
BERT_NER.py:105
Method
__init__
(self, input_ids, input_mask, segment_ids, label_ids,)
BERT_NER.py:123
Function
f1
(labels, predictions, num_classes, pos_indices=None, weights=None, average='micro')
tf_metrics.py:91
Method
get_dev_examples
Gets a collection of `InputExample`s for the dev set.
BERT_NER.py:138
Method
get_labels
Gets the list of labels for this data set.
BERT_NER.py:142
Method
get_train_examples
Gets a collection of `InputExample`s for the train set.
BERT_NER.py:134
Function
input_fn
(params)
BERT_NER.py:338
Function
main
(_)
BERT_NER.py:471
Function
metric_fn
(per_example_loss, label_ids, logits)
BERT_NER.py:443
Function
model_fn
(features, labels, mode, params)
BERT_NER.py:398
Function
precision
Multi-class precision metric for Tensorflow Parameters ---------- labels : Tensor of tf.int32 or tf.int64 The true labels
tf_metrics.py:15
Function
recall
Multi-class recall metric for Tensorflow Parameters ---------- labels : Tensor of tf.int32 or tf.int64 The true labels pr
tf_metrics.py:53
Function
tpu_scaffold
()
BERT_NER.py:418