Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ChineseGLUE/ChineseGLUE
/ functions
Functions
3,165 in github.com/ChineseGLUE/ChineseGLUE
⨍
Functions
3,165
◇
Types & classes
518
↓ 1 callers
Method
_update_mems
(self, hids, mems, qlen, mlen)
baselines/models_pytorch/classifier_pytorch/transformers/modeling_transfo_xl.py:670
↓ 1 callers
Method
_validate_input_pipeline
Validates the input pipeline. Perform some sanity checks to log user friendly information. We should error out to give users better error mes
baselines/models/xlnet/tpu_estimator.py:1283
↓ 1 callers
Method
_validate_model_features_and_labels
Validates that the features and labels for the model function are valid. A valid features/labels object is the one with: - Type: A tensor or
baselines/models/xlnet/tpu_estimator.py:1524
↓ 1 callers
Function
_validate_tpu_training_graph
Validate graph before running distributed training. Raises: ValueError: If the graph seems invalid for running on device
baselines/models/xlnet/tpu_estimator.py:3010
↓ 1 callers
Function
_verify_cross_hosts_transfer_size
(tensor_dict, message)
baselines/models/xlnet/tpu_estimator.py:3450
↓ 1 callers
Method
_verify_estimator_spec
Validates the estimator_spec.
baselines/models/xlnet/tpu_estimator.py:1618
↓ 1 callers
Method
_verify_tpu_spec_predictions
Validates TPUEstimatorSpec.predictions dict.
baselines/models/xlnet/tpu_estimator.py:1510
↓ 1 callers
Function
_wrap_computation_in_while_loop
Wraps the ops generated by `op_fn` in tf.while_loop.
baselines/models/xlnet/tpu_estimator.py:2969
↓ 1 callers
Function
abs_attn_core
Core absolute positional attention operations.
baselines/models/xlnet/modeling.py:109
↓ 1 callers
Function
add_one_encoder_layer
(layer_number)
baselines/models_pytorch/classifier_pytorch/convert_ernie_original_pad_checkpoint_to_pytorch.py:112
↓ 1 callers
Method
add_special
(self, sym)
baselines/models_pytorch/classifier_pytorch/transformers/tokenization_transfo_xl.py:207
↓ 1 callers
Function
angle_defn
(pos, i, d_model_size)
baselines/models_pytorch/classifier_pytorch/transformers/modeling_ctrl.py:42
↓ 1 callers
Method
apply_gradients
See base class.
baselines/models/roberta/optimization.py:137
↓ 1 callers
Method
apply_gradients
See base class.
baselines/models/roberta/optimization_finetuning.py:108
↓ 1 callers
Method
apply_gradients
See base class.
baselines/models/albert/optimization.py:213
↓ 1 callers
Method
apply_gradients
See base class.
baselines/models/albert/optimization_finetuning.py:108
↓ 1 callers
Method
apply_gradients
See base class.
baselines/models/xlnet/model_utils.py:318
↓ 1 callers
Method
as_dict
Returns the signals as Python dict.
baselines/models/xlnet/tpu_estimator.py:3313
↓ 1 callers
Method
as_estimator_spec
Creates an equivalent `EstimatorSpec` used by CPU train/eval.
baselines/models/xlnet/tpu_estimator.py:326
↓ 1 callers
Method
assert_all_tensors_reachable
Checks that all the tensors in the graph are reachable from outputs.
baselines/models/roberta_wwm_ext/modeling_test.py:162
↓ 1 callers
Method
assert_all_tensors_reachable
Checks that all the tensors in the graph are reachable from outputs.
baselines/models/ernie/modeling_test.py:162
↓ 1 callers
Method
assert_all_tensors_reachable
Checks that all the tensors in the graph are reachable from outputs.
baselines/models/bert_wwm_ext/modeling_test.py:162
↓ 1 callers
Method
assert_all_tensors_reachable
Checks that all the tensors in the graph are reachable from outputs.
baselines/models/roberta_wwm_large_ext/modeling_test.py:162
↓ 1 callers
Method
assert_all_tensors_reachable
Checks that all the tensors in the graph are reachable from outputs.
baselines/models/bert/modeling_test.py:162
↓ 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
baselines/models/roberta/modeling.py:959
↓ 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 intege
baselines/models/albert/bert_utils.py:74
↓ 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
baselines/models/albert/modeling.py:1045
↓ 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
baselines/models/roberta_wwm_ext/modeling.py:959
↓ 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
baselines/models/ernie/modeling.py:959
↓ 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
baselines/models/bert_wwm_ext/modeling.py:959
↓ 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
baselines/models/roberta_wwm_large_ext/modeling.py:959
↓ 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
baselines/models/bert/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
baselines/models/roberta/modeling.py:558
↓ 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
baselines/models/roberta_wwm_ext/modeling.py:558
↓ 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
baselines/models/ernie/modeling.py:558
↓ 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
baselines/models/bert_wwm_ext/modeling.py:558
↓ 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
baselines/models/roberta_wwm_large_ext/modeling.py:558
↓ 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
baselines/models/bert/modeling.py:558
↓ 1 callers
Function
average_dense
(grad_and_vars)
baselines/models/xlnet/gpu_utils.py:19
↓ 1 callers
Function
average_sparse
(grad_and_vars)
baselines/models/xlnet/gpu_utils.py:28
↓ 1 callers
Method
bpe
(self, token)
baselines/models_pytorch/classifier_pytorch/transformers/tokenization_gpt2.py:139
↓ 1 callers
Method
bpe
(self, token)
baselines/models_pytorch/classifier_pytorch/transformers/tokenization_ctrl.py:92
↓ 1 callers
Method
bpe
(self, token)
baselines/models_pytorch/classifier_pytorch/transformers/tokenization_xlm.py:615
↓ 1 callers
Function
build_tf_to_pytorch_map
A map of modules from TF to PyTorch. This time I use a map to keep the PyTorch model as identical to the original PyTorch model as possible.
baselines/models_pytorch/classifier_pytorch/transformers/modeling_transfo_xl.py:48
↓ 1 callers
Function
build_tf_xlnet_to_pytorch_map
A map of modules from TF to PyTorch. I use a map to keep the PyTorch model as identical to the original PyTorch model as possible.
baselines/models_pytorch/classifier_pytorch/transformers/modeling_xlnet.py:45
↓ 1 callers
Function
build_weight_map
()
baselines/models_pytorch/classifier_pytorch/convert_ernie_original_pad_checkpoint_to_pytorch.py:99
↓ 1 callers
Function
bytes_to_unicode
Returns list of utf-8 byte and a mapping to unicode strings. We specifically avoids mapping to whitespace/control characters the bpe code bar
baselines/models_pytorch/classifier_pytorch/transformers/tokenization_gpt2.py:68
↓ 1 callers
Method
cache_mem
cache hidden states into memory.
baselines/models_pytorch/classifier_pytorch/transformers/modeling_xlnet.py:654
↓ 1 callers
Function
calc_em_score
(answers, prediction)
baselines/models/xlnet/cmrc2018_evaluate_drcd.py:124
↓ 1 callers
Function
calc_f1_score
(answers, prediction)
baselines/models/xlnet/cmrc2018_evaluate_drcd.py:108
↓ 1 callers
Method
call_without_tpu
(self, features, labels, is_export_mode)
baselines/models/xlnet/tpu_estimator.py:1324
↓ 1 callers
Method
check_output
(self, result)
baselines/models/roberta_wwm_ext/modeling_test.py:114
↓ 1 callers
Method
check_output
(self, result)
baselines/models/ernie/modeling_test.py:114
↓ 1 callers
Method
check_output
(self, result)
baselines/models/bert_wwm_ext/modeling_test.py:114
↓ 1 callers
Method
check_output
(self, result)
baselines/models/roberta_wwm_large_ext/modeling_test.py:114
↓ 1 callers
Method
check_output
(self, result)
baselines/models/bert/modeling_test.py:114
↓ 1 callers
Method
clean_up_tokenization
Clean up a list of simple English tokenization artifacts like spaces before punctuations and abreviated forms.
baselines/models_pytorch/classifier_pytorch/transformers/tokenization_utils.py:1062
↓ 1 callers
Function
compute_exact
(a_gold, a_pred)
baselines/models/xlnet/squad_utils.py:63
↓ 1 callers
Function
compute_f1
(a_gold, a_pred)
baselines/models/xlnet/squad_utils.py:66
↓ 1 callers
Function
compute_metrics
(task_name, preds, labels)
baselines/models_pytorch/classifier_pytorch/metrics/glue_compute_metrics.py:57
↓ 1 callers
Function
convert_example_list_for_inews
Converts a single `InputExample` into a single `InputFeatures`.
baselines/models/roberta/run_classifier.py:345
↓ 1 callers
Function
convert_example_list_for_inews
Converts a single `InputExample` into a single `InputFeatures`.
baselines/models/albert/run_classifier.py:422
↓ 1 callers
Function
convert_example_list_for_inews
Converts a single `InputExample` into a single `InputFeatures`.
baselines/models/roberta_wwm_ext/run_classifier.py:345
↓ 1 callers
Function
convert_example_list_for_inews
Converts a single `InputExample` into a single `InputFeatures`.
baselines/models/ernie/run_classifier.py:422
↓ 1 callers
Function
convert_example_list_for_inews
Converts a single `InputExample` into a single `InputFeatures`.
baselines/models/bert_wwm_ext/run_classifier.py:427
↓ 1 callers
Function
convert_example_list_for_inews
Converts a single `InputExample` into a single `InputFeatures`.
baselines/models/roberta_wwm_large_ext/run_classifier.py:422
↓ 1 callers
Function
convert_example_list_for_inews
Converts a single `InputExample` into a single `InputFeatures`.
baselines/models/bert/run_classifier.py:344
↓ 1 callers
Function
convert_example_list_for_inews
Converts a single `InputExample` into a single `InputFeatures`.
baselines/models/xlnet/run_classifier_thucnews.py:332
↓ 1 callers
Function
convert_example_list_for_inews
Converts a single `InputExample` into a single `InputFeatures`.
baselines/models/xlnet/classifier_utils.py:213
↓ 1 callers
Function
convert_examples_to_features
Loads a data file into a list of `InputBatch`s.
baselines/models/roberta_wwm_ext/extract_features.py:210
↓ 1 callers
Function
convert_examples_to_features
Loads a data file into a list of `InputBatch`s.
baselines/models/ernie/extract_features.py:210
↓ 1 callers
Function
convert_examples_to_features
Loads a data file into a list of `InputBatch`s.
baselines/models/bert_wwm_ext/extract_features.py:210
↓ 1 callers
Function
convert_examples_to_features
Loads a data file into a list of `InputBatch`s.
baselines/models/roberta_wwm_large_ext/extract_features.py:210
↓ 1 callers
Function
convert_examples_to_features
Loads a data file into a list of `InputBatch`s.
baselines/models/bert/extract_features.py:210
↓ 1 callers
Function
convert_tf_checkpoint_to_pytorch
(tf_checkpoint_path, bert_config_file, pytorch_dump_path)
baselines/models_pytorch/classifier_pytorch/convert_albert_original_tf_checkpoint_to_pytorch.py:29
↓ 1 callers
Function
convert_tf_checkpoint_to_pytorch
(tf_checkpoint_path, bert_config_file, pytorch_dump_path, is_albert)
baselines/models_pytorch/mrc_pytorch/convert_tf_checkpoint_to_pytorch.py:30
↓ 1 callers
Method
convert_to_single_tpu_eval_step
Converts user provided model_fn` as a single eval step on TPU. Similar to training, the user provided `model_fn` takes input tuple (features,
baselines/models/xlnet/tpu_estimator.py:1398
↓ 1 callers
Method
convert_to_single_tpu_predict_step
Converts user provided model_fn` as a single predict step on TPU. Args: dequeue_fn: The function to retrieve inputs, features and labels, f
baselines/models/xlnet/tpu_estimator.py:1461
↓ 1 callers
Method
convert_to_single_tpu_train_step
Converts user provided model_fn` as a single train step on TPU. The user provided `model_fn` takes input tuple (features, labels) and produce
baselines/models/xlnet/tpu_estimator.py:1327
↓ 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
baselines/models/roberta/modeling.py:524
↓ 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
baselines/models/albert/modeling.py:603
↓ 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
baselines/models/roberta_wwm_ext/modeling.py:524
↓ 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
baselines/models/ernie/modeling.py:524
↓ 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
baselines/models/bert_wwm_ext/modeling.py:524
↓ 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
baselines/models/roberta_wwm_large_ext/modeling.py:524
↓ 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
baselines/models/bert/modeling.py:524
↓ 1 callers
Function
create_float_feature
(values)
baselines/models/roberta/create_pretraining_data.py:177
↓ 1 callers
Function
create_float_feature
(values)
baselines/models/albert/create_pretraining_data.py:177
↓ 1 callers
Function
create_float_feature
(values)
baselines/models/albert/resources/create_pretraining_data_roberta.py:177
↓ 1 callers
Function
create_float_feature
(values)
baselines/models/roberta_wwm_ext/create_pretraining_data.py:174
↓ 1 callers
Function
create_float_feature
(values)
baselines/models/ernie/create_pretraining_data.py:174
↓ 1 callers
Function
create_float_feature
(values)
baselines/models/bert_wwm_ext/create_pretraining_data.py:174
↓ 1 callers
Function
create_float_feature
(values)
baselines/models/roberta_wwm_large_ext/create_pretraining_data.py:174
↓ 1 callers
Function
create_float_feature
(values)
baselines/models/bert/create_pretraining_data.py:174
↓ 1 callers
Function
create_instances_from_document
Creates `TrainingInstance`s for a single document.
baselines/models/roberta/create_pretraining_data.py:319
↓ 1 callers
Function
create_instances_from_document
Creates `TrainingInstance`s for a single document.
baselines/models/albert/resources/create_pretraining_data_roberta.py:319
↓ 1 callers
Function
create_instances_from_document
Creates `TrainingInstance`s for a single document.
baselines/models/roberta_wwm_ext/create_pretraining_data.py:223
↓ 1 callers
Function
create_instances_from_document
Creates `TrainingInstance`s for a single document.
baselines/models/ernie/create_pretraining_data.py:223
↓ 1 callers
Function
create_instances_from_document
Creates `TrainingInstance`s for a single document.
baselines/models/bert_wwm_ext/create_pretraining_data.py:223
↓ 1 callers
Function
create_instances_from_document
Creates `TrainingInstance`s for a single document.
baselines/models/roberta_wwm_large_ext/create_pretraining_data.py:223
← previous
next →
901–1,000 of 3,165, ranked by callers