Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/brightmart/albert_zh
/ functions
Functions
427 in github.com/brightmart/albert_zh
⨍
Functions
427
◇
Types & classes
49
↓ 27 callers
Function
convert_to_unicode
Converts `text` to Unicode (if it's not already), assuming utf-8 input.
classifier_utils.py:36
↓ 21 callers
Method
_read_json
Reads a tab separated value file.
classifier_utils.py:127
↓ 15 callers
Function
create_initializer
Creates a `truncated_normal_initializer` with the given range.
modeling.py:397
↓ 14 callers
Method
_read_tsv
Reads a tab separated value file.
run_classifier_sp_google.py:206
↓ 13 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_google_fast.py:1084
↓ 13 callers
Method
tokenize
(self, text)
tokenization.py:172
↓ 12 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_google.py:997
↓ 11 callers
Method
convert_tokens_to_ids
(self, tokens)
tokenization.py:180
↓ 11 callers
Function
create_initializer
Creates a `truncated_normal_initializer` with the given range.
modeling_google_fast.py:420
↓ 11 callers
Function
create_initializer
Creates a `truncated_normal_initializer` with the given range.
modeling_google.py:418
↓ 10 callers
Function
create_int_feature
(values)
run_classifier_clue.py:286
↓ 10 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:981
↓ 7 callers
Function
create_int_feature
(values)
create_pretraining_data_google.py:209
↓ 7 callers
Method
from_json_file
Constructs a `BertConfig` from a json file of parameters.
modeling.py:91
↓ 6 callers
Method
_read_tsv
Reads a tab separated value file.
run_classifier.py:195
↓ 6 callers
Function
create_int_feature
(values)
create_pretraining_data.py:172
↓ 6 callers
Function
create_int_feature
(values)
resources/create_pretraining_data_roberta.py:172
↓ 6 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:366
↓ 5 callers
Function
create_int_feature
(values)
run_classifier.py:319
↓ 5 callers
Function
create_int_feature
(values)
run_classifier_sp_google.py:549
↓ 5 callers
Function
layer_norm
Run layer normalization on the last dimension of the tensor.
modeling.py:384
↓ 4 callers
Function
convert_by_vocab
Converts a sequence of [tokens|ids] using the vocab.
tokenization.py:136
↓ 4 callers
Function
convert_by_vocab
Converts a sequence of [tokens|ids] using the vocab.
tokenization_google.py:207
↓ 4 callers
Function
dropout
Perform dropout. Args: input_tensor: float Tensor. dropout_prob: Python float. The probability of dropping out a value (NOT of *keepin
modeling_google_fast.py:391
↓ 4 callers
Function
dropout
Perform dropout. Args: input_tensor: float Tensor. dropout_prob: Python float. The probability of dropping out a value (NOT of *keepin
modeling_google.py:389
↓ 3 callers
Method
_create_examples
See base class.
classifier_utils.py:155
↓ 3 callers
Method
_create_examples
Creates examples for the training and dev sets.
classifier_utils.py:241
↓ 3 callers
Method
_create_examples
Creates examples for the training and dev sets.
classifier_utils.py:319
↓ 3 callers
Method
_create_examples
Creates examples for the training and dev sets.
classifier_utils.py:354
↓ 3 callers
Method
_create_examples
Creates examples for the training and dev sets.
classifier_utils.py:427
↓ 3 callers
Method
_create_examples
Creates examples for the training and dev sets.
classifier_utils.py:801
↓ 3 callers
Method
_create_examples
(self, lines, set_type)
classifier_utils.py:887
↓ 3 callers
Method
_create_examples
Creates examples for the training and dev sets.
run_classifier.py:636
↓ 3 callers
Method
_create_examples
Creates examples for the training and dev sets.
run_classifier.py:681
↓ 3 callers
Method
_create_examples
Creates examples for the training and dev sets.
run_classifier_sp_google.py:287
↓ 3 callers
Method
_create_examples
Creates examples for the training and dev sets.
run_classifier_sp_google.py:331
↓ 3 callers
Method
_create_examples
Creates examples for the training and dev sets.
run_classifier_sp_google.py:371
↓ 3 callers
Method
_create_examples
Creates examples for the training and dev sets.
run_classifier_sp_google.py:412
↓ 3 callers
Method
_create_examples_json
Creates examples for the training and dev sets.
classifier_utils.py:386
↓ 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
convert_to_unicode
Converts `text` to Unicode (if it's not already), assuming utf-8 input.
tokenization_google.py:150
↓ 3 callers
Function
dense_layer_2d
A dense layer with 2D kernel. Args: input_tensor: Float tensor with rank 3. output_size: The size of output dimension. initializer: Kern
modeling_google_fast.py:670
↓ 3 callers
Function
dense_layer_2d
A dense layer with 2D kernel. Args: input_tensor: Float tensor with rank 3. output_size: The size of output dimension. initializer: Kern
modeling_google.py:669
↓ 3 callers
Function
dense_layer_3d
A dense layer with 3D kernel. Args: input_tensor: float Tensor of shape [batch, seq_length, hidden_size]. num_attention_heads: Number of att
modeling_google_fast.py:594
↓ 3 callers
Function
dense_layer_3d
A dense layer with 3D kernel. Args: input_tensor: float Tensor of shape [batch, seq_length, hidden_size]. num_attention_heads: Number of att
modeling_google.py:592
↓ 3 callers
Function
file_based_convert_examples_to_features
Convert a set of `InputExample`s to a TFRecord file.
run_classifier_clue.py:407
↓ 3 callers
Function
file_based_convert_examples_to_features
Convert a set of `InputExample`s to a TFRecord file.
run_classifier.py:306
↓ 3 callers
Function
file_based_convert_examples_to_features
Convert a set of `InputExample`s to a TFRecord file.
run_classifier_sp_google.py:536
↓ 3 callers
Function
file_based_convert_examples_to_features_for_inews
Convert a set of `InputExample`s to a TFRecord file.
run_classifier_clue.py:272
↓ 3 callers
Function
file_based_input_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
run_classifier_clue.py:437
↓ 3 callers
Function
file_based_input_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
run_classifier.py:336
↓ 3 callers
Function
file_based_input_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
run_classifier_sp_google.py:566
↓ 3 callers
Method
get_labels
(self)
similarity.py:29
↓ 3 callers
Method
get_pooled_output
(self)
modeling.py:254
↓ 3 callers
Method
get_pooled_output
(self)
modeling_google.py:244
↓ 3 callers
Method
get_sequence_output
Gets final hidden layer of encoder. Returns: float Tensor of shape [batch_size, seq_length, hidden_size] corresponding to the final hi
modeling_google.py:247
↓ 3 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: (opti
bert_utils.py:13
↓ 3 callers
Function
layer_norm
Run layer normalization on the last dimension of the tensor.
modeling_google_fast.py:407
↓ 3 callers
Function
layer_norm
Run layer normalization on the last dimension of the tensor.
modeling_google.py:405
↓ 3 callers
Function
reshape_to_matrix
Reshapes a >= rank 2 tensor to a rank 2 tensor (i.e., a matrix).
modeling.py:1018
↓ 3 callers
Function
whitespace_tokenize
Runs basic whitespace cleaning and splitting on a piece of text.
tokenization.py:154
↓ 3 callers
Function
whitespace_tokenize
Runs basic whitespace cleaning and splitting on a piece of text.
tokenization_google.py:223
↓ 2 callers
Function
_truncate_seq_pair
Truncates a sequence pair in place to the maximum length.
run_classifier_clue.py:485
↓ 2 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:637
↓ 2 callers
Function
convert_single_example
Converts a single `InputExample` into a single `InputFeatures`.
run_classifier_clue.py:305
↓ 2 callers
Function
convert_single_example
Converts a single `InputExample` into a single `InputFeatures`.
run_classifier.py:204
↓ 2 callers
Function
convert_single_example
Converts a single `InputExample` into a single `InputFeatures`.
run_classifier_sp_google.py:434
↓ 2 callers
Function
convert_single_example_for_inews
(ex_index, tokens_a, tokens_b, label_map, max_seq_length, tokenizer, exam
run_classifier_clue.py:150
↓ 2 callers
Function
create_masked_lm_predictions
Creates the predictions for the masked LM objective.
create_pretraining_data.py:498
↓ 2 callers
Function
create_masked_lm_predictions
Creates the predictions for the masked LM objective.
resources/create_pretraining_data_roberta.py:501
↓ 2 callers
Function
create_model
Creates a classification model.
run_classifier.py:401
↓ 2 callers
Function
embedding_lookup_factorized
Looks up words embeddings for id tensor, but in a factorized style followed by albert. it is used to reduce much percentage of parameters previous exi
modeling.py:448
↓ 2 callers
Function
encode_pieces
turn sentences into word pieces.
tokenization_google.py:106
↓ 2 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:302
↓ 2 callers
Method
get_dev_examples
Gets a collection of `InputExample`s for the dev set.
run_classifier.py:182
↓ 2 callers
Method
get_embedding_table
(self)
modeling_google.py:278
↓ 2 callers
Function
get_new_segment
输入一句话,返回一句经过处理的话: 为了支持中文全称mask,将被分开的词,将上特殊标记("#"),使得后续处理模块,能够知道哪些字是属于同一个词的。 :param segment: 一句话 :return: 一句处理过的话
resources/create_pretraining_data_roberta.py:250
↓ 2 callers
Method
get_test_examples
Gets a collection of `InputExample`s for prediction.
run_classifier.py:186
↓ 2 callers
Method
get_train_examples
Gets a collection of `InputExample`s for the train set.
run_classifier.py:178
↓ 2 callers
Function
input_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
run_pretraining_google_fast.py:382
↓ 2 callers
Function
input_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
run_pretraining.py:329
↓ 2 callers
Function
input_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
run_pretraining_google.py:382
↓ 2 callers
Function
is_start_piece
(piece)
create_pretraining_data_google.py:421
↓ 2 callers
Function
printable_text
Returns text encoded in a way suitable for print or `tf.logging`.
tokenization_google.py:170
↓ 2 callers
Function
reshape_from_matrix
Reshapes a rank 2 tensor back to its original rank >= 2 tensor.
modeling.py:1032
↓ 2 callers
Function
total_parameters_transformer
(share_parameter_across_layers)
test_changes.py:49
↓ 2 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:833
↓ 2 callers
Function
transpose_for_scores
(input_tensor, batch_size, num_attention_heads, seq_length, width)
modeling.py:708
↓ 2 callers
Function
truncate_seq_pair
Truncates a pair of sequences to a maximum sequence length.
create_pretraining_data.py:657
↓ 1 callers
Method
__init__
Constructs a LAMBOptimizer.
optimization.py:195
↓ 1 callers
Method
__str__
(self)
create_pretraining_data.py:82
↓ 1 callers
Method
__str__
(self)
create_pretraining_data_google.py:109
↓ 1 callers
Method
__str__
(self)
resources/create_pretraining_data_roberta.py:81
↓ 1 callers
Method
_clean_text
Performs invalid character removal and whitespace cleanup on text.
tokenization.py:288
↓ 1 callers
Method
_clean_text
Performs invalid character removal and whitespace cleanup on text.
tokenization_google.py:383
↓ 1 callers
Function
_decode_record
Decodes a record to a TensorFlow example.
run_pretraining_google_fast.py:456
↓ 1 callers
Function
_decode_record
Decodes a record to a TensorFlow example.
run_pretraining.py:396
↓ 1 callers
Function
_decode_record
Decodes a record to a TensorFlow example.
run_classifier_clue.py:449
↓ 1 callers
Function
_decode_record
Decodes a record to a TensorFlow example.
run_pretraining_google.py:456
↓ 1 callers
Function
_decode_record
Decodes a record to a TensorFlow example.
run_classifier.py:348
next →
1–100 of 427, ranked by callers