Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Vincent131499/TextSim_cn_finetune
/ functions
Functions
120 in github.com/Vincent131499/TextSim_cn_finetune
⨍
Functions
120
◇
Types & classes
24
↳
Endpoints
1
↓ 14 callers
Method
_read_tsv
Reads a tab separated value file.
run_classifier_serving.py:209
↓ 10 callers
Function
create_initializer
Creates a `truncated_normal_initializer` with the given range.
modeling.py:376
↓ 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:897
↓ 8 callers
Method
tokenize
(self, text)
tokenization.py:170
↓ 5 callers
Function
create_int_feature
(values)
run_classifier_serving.py:556
↓ 4 callers
Function
convert_by_vocab
Converts a sequence of [tokens|ids] using the vocab.
tokenization.py:136
↓ 4 callers
Method
convert_tokens_to_ids
(self, tokens)
tokenization.py:178
↓ 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:345
↓ 3 callers
Method
_create_examples
Creates examples for the training and dev sets.
run_classifier_serving.py:289
↓ 3 callers
Method
_create_examples
Creates examples for the training and dev sets.
run_classifier_serving.py:331
↓ 3 callers
Method
_create_examples
Creates examples for the training and dev sets.
run_classifier_serving.py:368
↓ 3 callers
Method
_create_examples
Creates examples for the training and dev sets.
run_classifier_serving.py:408
↓ 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_classifier_serving.py:543
↓ 3 callers
Function
file_based_input_fn_builder
Creates an `input_fn` closure to be passed to TPUEstimator.
run_classifier_serving.py:573
↓ 3 callers
Function
layer_norm
Run layer normalization on the last dimension of the tensor.
modeling.py:363
↓ 3 callers
Function
reshape_to_matrix
Reshapes a >= rank 2 tensor to a rank 2 tensor (i.e., a matrix).
modeling.py:934
↓ 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_classifier_serving.py:427
↓ 2 callers
Function
reshape_from_matrix
Reshapes a rank 2 tensor back to its original rank >= 2 tensor.
modeling.py:948
↓ 2 callers
Function
transpose_for_scores
(input_tensor, batch_size, num_attention_heads, seq_length, width)
modeling.py:631
↓ 1 callers
Method
_clean_text
Performs invalid character removal and whitespace cleanup on text.
tokenization.py:286
↓ 1 callers
Function
_decode_record
Decodes a record to a TensorFlow example.
run_classifier_serving.py:585
↓ 1 callers
Method
_do_use_weight_decay
Whether to use L2 weight decay for `param_name`.
optimization.py:156
↓ 1 callers
Method
_get_variable_name
Get the variable name from the tensor name.
optimization.py:166
↓ 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_classifier_serving.py:621
↓ 1 callers
Function
_truncate_seq_pair
Truncates a sequence pair in place to the maximum length.
test_serving.py:103
↓ 1 callers
Function
_truncate_seq_pair
Truncates a sequence pair in place to the maximum length.
test_tf_serving.py:66
↓ 1 callers
Function
_truncate_seq_pair
Truncates a sequence pair in place to the maximum length.
test_serving_api.py:101
↓ 1 callers
Method
apply_gradients
See base class.
optimization.py:105
↓ 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:961
↓ 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:560
↓ 1 callers
Function
convert_single_example
Converts a single `InputExample` into a single `InputFeatures`.
test_serving.py:120
↓ 1 callers
Function
convert_single_example
Converts a single `InputExample` into a single `InputFeatures`.
test_tf_serving.py:83
↓ 1 callers
Function
convert_single_example
Converts a single `InputExample` into a single `InputFeatures`.
test_serving_api.py:118
↓ 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:526
↓ 1 callers
Function
create_model
Creates a classification model.
run_classifier_serving.py:638
↓ 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:381
↓ 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:430
↓ 1 callers
Method
from_dict
Constructs a `BertConfig` from a Python dictionary of parameters.
modeling.py:82
↓ 1 callers
Method
from_json_file
Constructs a `BertConfig` from a json file of parameters.
modeling.py:90
↓ 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:281
↓ 1 callers
Method
get_dev_examples
Gets a collection of `InputExample`s for the dev set.
run_classifier_serving.py:196
↓ 1 callers
Method
get_labels
Gets the list of labels for this data set.
run_classifier_serving.py:204
↓ 1 callers
Method
get_pooled_output
(self)
modeling.py:235
↓ 1 callers
Method
get_test_examples
Gets a collection of `InputExample`s for prediction.
run_classifier_serving.py:200
↓ 1 callers
Method
get_train_examples
Gets a collection of `InputExample`s for the train set.
run_classifier_serving.py:192
↓ 1 callers
Function
layer_norm_and_dropout
Runs layer normalization followed by dropout.
modeling.py:369
↓ 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_classifier_serving.py:683
↓ 1 callers
Function
predict_offline
()
test_serving.py:241
↓ 1 callers
Function
predict_offline
()
test_tf_serving.py:191
↓ 1 callers
Method
to_dict
Serializes this instance to a Python dictionary.
modeling.py:96
↓ 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:756
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:87
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_serving.py:142
Method
__init__
(self, input_ids, input_mask, segment_ids, label_i
run_classifier_serving.py:176
Method
__init__
(self)
run_classifier_serving.py:221
Method
__init__
(self)
run_classifier_serving.py:309
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:58
Method
__init__
(self, input_ids, input_mask, segment_ids, label_i
test_serving.py:91
Method
__init__
Constructs BertConfig. Args: vocab_size: Vocabulary size of `inputs_ids` in `BertModel`. hidden_size: Size of the encoder layers and
modeling.py:33
Method
__init__
Constructor for BertModel. Args: config: `BertConfig` instance. is_training: bool. rue for training model, false for eval model. Cont
modeling.py:130
Method
__init__
Constructs a InputExample. Args: guid: Unique id for the example. text_a: string. The untokenized text of the first sequence. For
test_tf_serving.py:21
Method
__init__
(self, input_ids, input_mask, segment_ids, lab
test_tf_serving.py:54
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_api.py:56
Method
__init__
(self, input_ids, input_mask, segment_ids, label_i
test_serving_api.py:89
Function
convert_examples_to_features
Convert a set of `InputExample`s to a list of `InputFeatures`.
run_classifier_serving.py:841
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: input_tensor: f
modeling.py:265
Method
get_all_encoder_layers
(self)
modeling.py:247
Function
get_assignment_map_from_checkpoint
Compute the union of the current variables and checkpoint variables.
modeling.py:318
Method
get_dev_examples
See base class.
run_classifier_serving.py:243
Method
get_dev_examples
See base class.
run_classifier_serving.py:274
Method
get_dev_examples
See base class.
run_classifier_serving.py:317
Method
get_dev_examples
See base class.
run_classifier_serving.py:354
Method
get_dev_examples
See base class.
run_classifier_serving.py:394
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:250
Method
get_embedding_table
(self)
modeling.py:261
Method
get_labels
See base class.
run_classifier_serving.py:261
Method
get_labels
See base class.
run_classifier_serving.py:285
Method
get_labels
See base class.
run_classifier_serving.py:327
Method
get_labels
See base class.
run_classifier_serving.py:364
Method
get_labels
See base class.
run_classifier_serving.py:404
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 h
modeling.py:238
Method
get_test_examples
See base class.
run_classifier_serving.py:280
Method
get_test_examples
See base class.
run_classifier_serving.py:322
next →
1–100 of 120, ranked by callers