MCPcopy Create free account

hub / github.com/SooLab/CGFormer / functions

Functions468 in github.com/SooLab/CGFormer

Methodget_output_embeddings
(self)
bert/modeling_bert.py:1017
Methodget_special_tokens_mask
Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding special tokens using the
bert/tokenization_bert.py:258
Methodget_special_tokens_mask
Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding special tokens using the
bert/tokenization_utils.py:631
Methodget_vocab
(self)
bert/tokenization_bert.py:202
Methodget_vocab
Returns the vocabulary as a dict of {token: index} pairs. `tokenizer.get_vocab()[token]` is equivalent to `tokenizer.convert_tokens_to_ids(token)` wh
bert/tokenization_utils.py:174
Functiongroup_weight
(weight_group, module, lr)
utils/misc.py:169
Functionhard_softmax
(logits, dim)
model/layers.py:40
FunctionintersectionAndUnionGPU
(output, target, K, threshold=0.5)
utils/misc.py:147
Functionis_apex_available
()
bert/file_utils.py:151
Methodis_fast
Indicate if this BatchEncoding was generated from the result of a PreTrainedTokenizerFast Returns: True if generated from subclasses
bert/tokenization_utils_base.py:162
Methodis_fast
(self)
bert/tokenization_utils.py:166
Functionis_psutil_available
()
bert/file_utils.py:143
Functionis_py3nvml_available
()
bert/file_utils.py:147
Functionis_torch_tpu_available
()
bert/file_utils.py:139
MethodloadAnns
(self, ann_ids=[])
tools/refer.py:216
MethodloadCats
(self, cat_ids=[])
tools/refer.py:228
Functionload_cfg_from_cfg_file
(file)
utils/config.py:61
Functionload_tf_weights_in_bert
Load tf checkpoints in a pytorch model.
bert/modeling_bert.py:66
Functionloads_pyarrow
Args: buf: the output of `dumps`.
tools/folder2lmdb.py:12
Functionmain_worker
(gpu, args)
train.py:65
Methodmask_token
Mask token (string). E.g. when training a model with masked-language modeling. Log an error if used while not having been set.
bert/tokenization_utils_base.py:766
Methodmask_token_id
Id of the mask token in the vocabulary. E.g. when training a model with masked-language modeling. Log an error if used while not having been set.
bert/tokenization_utils_base.py:861
Functionmasks_to_boxes
Compute the bounding boxes around the provided masks The masks should be in format [N, H, W] where N is the number of masks, (H, W) are the spati
utils/box_ops.py:84
Methodmax_len
Kept here for backward compatibility. Now renamed to `model_max_length` to avoid ambiguity.
bert/tokenization_utils_base.py:1049
Methodmax_len_sentences_pair
(self)
bert/tokenization_utils_base.py:1060
Methodmax_len_single_sentence
(self)
bert/tokenization_utils_base.py:1056
Functionmerge_cfg_from_list
(cfg, cfg_list)
utils/config.py:77
Functionmish
(x)
bert/modeling_bert.py:138
Functionmulti_iou
(boxes1, boxes2)
utils/box_ops.py:18
Methodnum_labels
(self)
bert/configuration_utils.py:118
Methodnum_parameters
Get number of (optionally, trainable) parameters in the module.
bert/modeling_utils.py:78
Methodnum_special_tokens_to_add
Returns the number of added tokens when encoding a sequence with special tokens. Note: This encodes inputs and checks th
bert/tokenization_utils.py:237
Methodpad_token
Padding token (string). Log an error if used while not having been set.
bert/tokenization_utils_base.py:750
Methodpad_token_id
Id of the padding token in the vocabulary. Log an error if used while not having been set.
bert/tokenization_utils_base.py:842
Methodpad_token_type_id
Id of the padding token type in the vocabulary.
bert/tokenization_utils_base.py:849
Methodprepare_inputs_for_generation
(self, input_ids, attention_mask=None, **model_kwargs)
bert/modeling_bert.py:994
Methodprepare_inputs_for_generation
(self, input_ids, attention_mask=None, **model_kwargs)
bert/modeling_bert.py:1098
Functionprune_layer
Prune a Conv1D or nn.Linear layer (a model parameters) to keep only entries in index. Return the pruned layer as a new layer with requires_gr
bert/modeling_utils.py:1195
Methodresize_token_embeddings
Resize input token embeddings matrix of the model if new_num_tokens != config.vocab_size. Take care of tying weights embeddings afterwards if
bert/modeling_utils.py:376
Functionsave_checkpoint
Save checkpoint to file. The checkpoint will have 3 fields: ``meta``, ``state_dict`` and ``optimizer``. By default ``meta`` will contain vers
model/mmcv_custom/checkpoint.py:442
Methodsave_pretrained
Save a model and its configuration file to a directory, so that it can be re-loaded using the `:func:`~transformers.PreTrainedModel.from_
bert/modeling_utils.py:474
Methodsave_pretrained
Save the tokenizer vocabulary files together with: - added tokens, - special-tokens-to-class-attributes-mapping,
bert/tokenization_utils_base.py:1334
Methodsave_pretrained
Save a configuration object to the directory `save_directory`, so that it can be re-loaded using the :func:`~transformers.PretrainedC
bert/configuration_utils.py:126
Methodsave_vocabulary
Save the tokenizer vocabulary to a directory. This method does *NOT* save added tokens and special token mappings. Please us
bert/tokenization_utils.py:715
Methodsep_token
Separation token (string). E.g. separate context and query in an input sequence. Log an error if used while not having been set.
bert/tokenization_utils_base.py:742
Methodsep_token_id
Id of the separation token in the vocabulary. E.g. separate context and query in an input sequence. Log an error if used while not having been set.
bert/tokenization_utils_base.py:835
Methodset_input_embeddings
(self, value)
bert/modeling_bert.py:657
MethodshowMask
(self, ref)
tools/refer.py:351
Methodspecial_tokens_map
A dictionary mapping special token class attribute (cls_token, unk_token...) to their values ('<unk>', '<cls>'...) Convert to
bert/tokenization_utils_base.py:873
Methodspecial_tokens_map_extended
A dictionary mapping special token class attribute (cls_token, unk_token...) to their values ('<unk>', '<cls>'...) Keep the t
bert/tokenization_utils_base.py:887
Methodsplit_on_token
(tok, text)
bert/tokenization_utils.py:284
Methodsplit_on_tokens
(tok_list, text)
bert/tokenization_utils.py:337
Functionswish
(x)
bert/activations.py:11
Functiontf_required
(func)
bert/file_utils.py:799
Methodtoken_to_chars
Get the character span corresponding to an encoded token in a sequence of the batch. Character spans are returned as a CharSpan Name
bert/tokenization_utils_base.py:321
Methodtoken_to_word
Get the index of the word corresponding (i.e. comprising) to an encoded token in a sequence of the batch. Can be called as:
bert/tokenization_utils_base.py:231
Methodtokenize
Tokenizes a piece of text into its word pieces. This uses a greedy longest-match-first algorithm to perform tokenization using the gi
bert/tokenization_bert.py:495
Methodtokens
(self, batch_index: int = 0)
bert/tokenization_utils_base.py:221
Functiontorch_required
(func)
bert/file_utils.py:787
Methodunk_token
Unknown token (string). Log an error if used while not having been set.
bert/tokenization_utils_base.py:734
Methodunk_token_id
Id of the unknown token in the vocabulary. Log an error if used while not having been set.
bert/tokenization_utils_base.py:828
Methodvocab_size
(self)
bert/tokenization_bert.py:199
Methodvocab_size
Size of the base vocabulary (without the added tokens)
bert/tokenization_utils.py:170
Methodword_to_chars
Get the character span in the original string corresponding to given word in a sequence of the batch. Character spans are re
bert/tokenization_utils_base.py:398
Methodword_to_tokens
Get the encoded token span corresponding to a word in the sequence of the batch. Token spans are returned as a TokenSpan NamedTuple
bert/tokenization_utils_base.py:272
Methodwords
(self, batch_index: int = 0)
bert/tokenization_utils_base.py:226
Functionworker_init_fn
(worker_id, num_workers, rank, seed)
utils/misc.py:63
Functionwrapper
(*args, **kwargs)
bert/file_utils.py:790
← previous401–468 of 468, ranked by callers