Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Vincent131499/Multi_Label_Classifier_finetune
/ functions
Functions
136 in github.com/Vincent131499/Multi_Label_Classifier_finetune
⨍
Functions
136
◇
Types & classes
24
↓ 11 callers
Method
_read_tsv
Reads a tab separated value file.
run_multilabels_classifier.py:192
↓ 10 callers
Function
create_initializer
Creates a `truncated_normal_initializer` with the given range.
modeling.py:375
↓ 9 callers
Function
get_shape_list
Returns a list of the shape of tensor, preferring static dimensions. Args: tensor: A tf.Tensor object to find the shape of. expected_rank:
modeling.py:895
↓ 7 callers
Method
tokenize
(self, text)
tokenization.py:170
↓ 5 callers
Method
convert_tokens_to_ids
(self, tokens)
tokenization.py:178
↓ 5 callers
Function
create_int_feature
(values)
run_multilabels_classifier.py:531
↓ 4 callers
Function
convert_by_vocab
Converts a sequence of [tokens|ids] using the vocab.
tokenization.py:136
↓ 4 callers
Function
dropout
Perform dropout. Args: input_tensor: float Tensor. dropout_prob: Python float. The probability of dropping out a value (NOT of *keepi
modeling.py:344
↓ 4 callers
Method
tokenize
Tokenizes a piece of text.
tokenization.py:196
↓ 3 callers
Method
_create_examples
Creates examples for the training and dev sets.
run_multilabels_classifier.py:273
↓ 3 callers
Method
_create_examples
Creates examples for the training and dev sets.
run_multilabels_classifier.py:313
↓ 3 callers
Method
_create_examples
Creates examples for the training and dev sets.
run_multilabels_classifier.py:353
↓ 3 callers
Method
_create_examples
Creates examples for the training and dev sets.
run_multilabels_classifier.py:395
↓ 3 callers
Method
_create_examples
Creates examples for the training and dev sets.
run_classifier_predict_online.py:139
↓ 3 callers
Function
convert_to_unicode
Converts `text` to Unicode (if it's not already), assuming utf-8 input.
tokenization.py:78
↓ 3 callers
Function
file_based_convert_examples_to_features
Convert a set of `InputExample`s to a TFRecord file.
run_multilabels_classifier.py:518
↓ 3 callers
Function
file_based_input_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
run_multilabels_classifier.py:552
↓ 3 callers
Method
from_json_file
Constructs a `BertConfig` from a json file of parameters.
modeling.py:91
↓ 3 callers
Method
get_pooled_output
(self)
modeling.py:234
↓ 3 callers
Function
layer_norm
Run layer normalization on the last dimension of the tensor.
modeling.py:362
↓ 3 callers
Function
reshape_to_matrix
Reshapes a >= rank 2 tensor to a rank 2 tensor (i.e., a matrix).
modeling.py:932
↓ 3 callers
Method
tokenize
Tokenizes a piece of text into its word pieces. This uses a greedy longest-match-first algorithm to perform tokenization using the given voca
tokenization.py:308
↓ 3 callers
Function
whitespace_tokenize
Runs basic whitespace cleaning and splitting on a piece of text.
tokenization.py:152
↓ 2 callers
Function
convert_single_example
Converts a single `InputExample` into a single `InputFeatures`.
run_multilabels_classifier.py:411
↓ 2 callers
Function
reshape_from_matrix
Reshapes a rank 2 tensor back to its original rank >= 2 tensor.
modeling.py:946
↓ 2 callers
Function
transpose_for_scores
(input_tensor, batch_size, num_attention_heads, seq_length, width)
modeling.py:629
↓ 1 callers
Method
_clean_text
Performs invalid character removal and whitespace cleanup on text.
tokenization.py:286
↓ 1 callers
Method
_create_model
Creates a classification model.
model_exporter.py:33
↓ 1 callers
Function
_decode_record
Decodes a record to a TensorFlow example.
run_multilabels_classifier.py:564
↓ 1 callers
Method
_do_use_weight_decay
Whether to use L2 weight decay for `param_name`.
optimization.py:159
↓ 1 callers
Method
_get_variable_name
Get the variable name from the tensor name.
optimization.py:169
↓ 1 callers
Method
_is_chinese_char
Checks whether CP is the codepoint of a CJK character.
tokenization.py:264
↓ 1 callers
Function
_is_control
Checks whether `chars` is a control character.
tokenization.py:374
↓ 1 callers
Function
_is_punctuation
Checks whether `chars` is a punctuation character.
tokenization.py:386
↓ 1 callers
Function
_is_whitespace
Checks whether `chars` is a whitespace character.
tokenization.py:362
↓ 1 callers
Method
_run_split_on_punc
Splits punctuation on a piece of text.
tokenization.py:231
↓ 1 callers
Method
_run_strip_accents
Strips accents from a piece of text.
tokenization.py:220
↓ 1 callers
Method
_tokenize_chinese_chars
Adds whitespace around any CJK character.
tokenization.py:251
↓ 1 callers
Function
_truncate_seq_pair
Truncates a sequence pair in place to the maximum length.
run_multilabels_classifier.py:600
↓ 1 callers
Function
_truncate_seq_pair
Truncates a sequence pair in place to the maximum length.
test_serving.py:61
↓ 1 callers
Function
_truncate_seq_pair
Truncates a sequence pair in place to the maximum length.
run_classifier_predict_online.py:244
↓ 1 callers
Method
apply_gradients
See base class.
optimization.py:108
↓ 1 callers
Function
assert_rank
Raises an exception if the tensor rank is not of the expected rank. Args: tensor: A tf.Tensor to check the rank of. expected_rank: Python i
modeling.py:959
↓ 1 callers
Function
attention_layer
Performs multi-headed attention from `from_tensor` to `to_tensor`. This is an implementation of multi-headed attention based on "Attention is all
modeling.py:558
↓ 1 callers
Function
convert_single_example
Converts a single `InputExample` into a single `InputFeatures`.
test_serving.py:78
↓ 1 callers
Function
convert_single_example
Converts a single `InputExample` into a single `InputFeatures`.
run_classifier_predict_online.py:154
↓ 1 callers
Function
create_attention_mask_from_input_mask
Create 3D attention mask from a 2D tensor mask. Args: from_tensor: 2D or 3D Tensor of shape [batch_size, from_seq_length, ...]. to_mask: in
modeling.py:524
↓ 1 callers
Function
create_model
Creates a classification model.
run_multilabels_classifier.py:617
↓ 1 callers
Function
create_model
Creates a classification model.
run_classifier_predict_online.py:261
↓ 1 callers
Function
embedding_lookup
Looks up words embeddings for id tensor. Args: input_ids: int32 Tensor of shape [batch_size, seq_length] containing word ids. vocab_s
modeling.py:380
↓ 1 callers
Function
embedding_postprocessor
Performs various post-processing on a word embedding tensor. Args: input_tensor: float Tensor of shape [batch_size, seq_length, embedding
modeling.py:428
↓ 1 callers
Method
from_dict
Constructs a `BertConfig` from a Python dictionary of parameters.
modeling.py:83
↓ 1 callers
Function
generate_labels
:param classes: 所有的标签列表 :param labels_list: 每个句子对应的标签集合 :return:
generate_train_data.py:10
↓ 1 callers
Function
get_activation
Maps a string to a Python function, e.g., "relu" => `tf.nn.relu`. Args: activation_string: String name of the activation function. Returns:
modeling.py:280
↓ 1 callers
Method
get_dev_examples
Gets a collection of `InputExample`s for the dev set.
run_multilabels_classifier.py:179
↓ 1 callers
Method
get_labels
Gets the list of labels for this data set.
run_multilabels_classifier.py:187
↓ 1 callers
Method
get_labels
Gets the list of labels for this data set.
run_classifier_predict_online.py:102
↓ 1 callers
Method
get_test_examples
Gets a collection of `InputExample`s for prediction.
run_multilabels_classifier.py:183
↓ 1 callers
Method
get_train_examples
Gets a collection of `InputExample`s for the train set.
run_multilabels_classifier.py:175
↓ 1 callers
Function
layer_norm_and_dropout
Runs layer normalization followed by dropout.
modeling.py:368
↓ 1 callers
Function
load_vocab
Loads a vocabulary file into a dictionary.
tokenization.py:121
↓ 1 callers
Function
model_fn_builder
Returns `model_fn` closure for TPUEstimator.
run_multilabels_classifier.py:669
↓ 1 callers
Function
predict_online
do online prediction. each time make prediction for one instance. you can change to a batch if you want. :param line: a list. element is
run_classifier_predict_online.py:348
↓ 1 callers
Method
to_dict
Serializes this instance to a Python dictionary.
modeling.py:97
↓ 1 callers
Method
transfer
(self)
model_exporter.py:77
↓ 1 callers
Function
transformer_model
Multi-headed, multi-layer Transformer from "Attention is All You Need". This is almost an exact implementation of the original Transformer encoder.
modeling.py:754
Method
__init__
(self, max_seq_length=128)
model_exporter.py:28
Method
__init__
(self, vocab_file, do_lower_case=True)
tokenization.py:164
Method
__init__
Constructs a BasicTokenizer. Args: do_lower_case: Whether to lower case the input.
tokenization.py:188
Method
__init__
(self, vocab, unk_token="[UNK]", max_input_chars_per_word=200)
tokenization.py:303
Method
__init__
Constructs a AdamWeightDecayOptimizer.
optimization.py:90
Method
__init__
Constructs a InputExample. Args: guid: Unique id for the example. text_a: string. The untokenized text of the first seque
run_multilabels_classifier.py:125
Method
__init__
(self, input_ids, input_mask, segment_ids,
run_multilabels_classifier.py:159
Method
__init__
(self)
run_multilabels_classifier.py:205
Method
__init__
Constructs a InputExample. Args: guid: Unique id for the example. text_a: string. The untokenized text of the first sequence. For sin
test_serving.py:16
Method
__init__
(self, input_ids, input_mask, segment_ids, label_i
test_serving.py:49
Method
__init__
Constructs a InputExample. Args: guid: Unique id for the example. text_a: string. The untokenized text of the first sequence. For sin
run_classifier_predict_online.py:59
Method
__init__
(self, input_ids, input_mask, segment_ids, label_id)
run_classifier_predict_online.py:80
Method
__init__
Constructs BertConfig. Args: vocab_size: Vocabulary size of `inputs_ids` in `BertModel`. hidden_size: Size of the encoder layers and
modeling.py:34
Method
__init__
Constructor for BertModel. Args: config: `BertConfig` instance. is_training: bool. true for training model, false for eval model. Con
modeling.py:131
Method
_read_tsv
Reads a tab separated value file.
run_classifier_predict_online.py:107
Function
convert_examples_to_features
Convert a set of `InputExample`s to a list of `InputFeatures`.
run_multilabels_classifier.py:830
Function
convert_ids_to_tokens
(inv_vocab, ids)
tokenization.py:148
Method
convert_ids_to_tokens
(self, ids)
tokenization.py:181
Function
convert_tokens_to_ids
(vocab, tokens)
tokenization.py:144
Function
create_optimizer
Creates an optimizer training op.
optimization.py:25
Function
gelu
Gaussian Error Linear Unit. This is a smoother version of the RELU. Original paper: https://arxiv.org/abs/1606.08415 Args: x: float Tensor
modeling.py:264
Method
get_all_encoder_layers
(self)
modeling.py:246
Function
get_assignment_map_from_checkpoint
Compute the union of the current variables and checkpoint variables.
modeling.py:317
Method
get_dev_examples
See base class.
run_multilabels_classifier.py:227
Method
get_dev_examples
See base class.
run_multilabels_classifier.py:258
Method
get_dev_examples
See base class.
run_multilabels_classifier.py:299
Method
get_dev_examples
See base class.
run_multilabels_classifier.py:339
Method
get_dev_examples
See base class.
run_multilabels_classifier.py:380
Method
get_dev_examples
Gets a collection of `InputExample`s for the dev set.
run_classifier_predict_online.py:94
Method
get_dev_examples
See base class.
run_classifier_predict_online.py:124
Method
get_embedding_output
Gets output of the embedding lookup (i.e., input to the transformer). Returns: float Tensor of shape [batch_size, seq_length, hidden_size]
modeling.py:249
Method
get_embedding_table
(self)
modeling.py:260
Method
get_labels
See base class.
run_multilabels_classifier.py:245
Method
get_labels
See base class.
run_multilabels_classifier.py:269
next →
1–100 of 136, ranked by callers