MCPcopy Create free account

hub / github.com/Aveiro-Lin/GraphiContact / functions

Functions11,352 in github.com/Aveiro-Lin/GraphiContact

↓ 10 callersFunctionamplitude_to_db
Converts an amplitude spectrogram to the decibel scale. This computes `20 * log10(spectrogram / reference)`, using basic logarithm properties
src/transformers/src/transformers/audio_utils.py:530
↓ 10 callersMethodassert_batch_padded_input_match
( self, input_r: dict, input_p: dict, max_length: int, pad_token_id: i
src/transformers/tests/test_tokenization_common.py:356
↓ 10 callersFunctionchunk_iter
(inputs, feature_extractor, chunk_len, stride_left, stride_right, rescale=True, dtype=None)
src/transformers/src/transformers/pipelines/automatic_speech_recognition.py:61
↓ 10 callersFunctioncopy_func
Returns a copy of a function f.
src/transformers/src/transformers/utils/doc.py:1184
↓ 10 callersFunctioncustom_object_save
Save the modeling files corresponding to a custom model/configuration/tokenizer etc. in a given folder. Optionally adds the proper fields in
src/transformers/src/transformers/dynamic_module_utils.py:503
↓ 10 callersFunctionfilter_framework_files
Filter a list of files to only keep the ones corresponding to a list of frameworks. Args: files (`List[Union[str, os.PathLike]]`): T
src/transformers/src/transformers/commands/add_new_model_like.py:597
↓ 10 callersFunctionfloats_tensor
Creates a random float32 tensor
src/transformers/tests/test_modeling_common.py:3351
↓ 10 callersMethodget_labels
(self)
src/transformers/examples/research_projects/adversarial/utils_hans.py:158
↓ 10 callersMethodget_lm_head
The LM Head layer. This method must be overwritten by all the models that have a lm head. Return: `tf.keras.layers.Layer
src/transformers/src/transformers/modeling_tf_utils.py:1968
↓ 10 callersMethodget_memory_footprint
r""" Get the memory footprint of a model. This will return the memory footprint of the current model in bytes. Useful to benchmark the
src/transformers/src/transformers/modeling_utils.py:2251
↓ 10 callersFunctionget_params
Function extracts relevant parameters into flatten dict from model params, appends batch normalization statistics if present
src/transformers/tests/test_modeling_flax_common.py:102
↓ 10 callersFunctionget_results
(output_dir)
src/transformers/examples/pytorch/test_accelerate_examples.py:50
↓ 10 callersMethodget_rust_tokenizer
(self, **kwargs)
src/transformers/tests/test_tokenization_common.py:271
↓ 10 callersFunctionis_torch_fp16_available_on_device
(device)
src/transformers/src/transformers/utils/import_utils.py:338
↓ 10 callersFunctionmel_filter_bank
Creates a frequency bin conversion matrix used to obtain a mel spectrogram. This is called a *mel filter bank*, and various implementation ex
src/transformers/src/transformers/audio_utils.py:119
↓ 10 callersFunctionpower_to_db
Converts a power spectrogram to the decibel scale. This computes `10 * log10(spectrogram / reference)`, using basic logarithm properties for
src/transformers/src/transformers/audio_utils.py:479
↓ 10 callersMethodpredict
(self, predict_dataset, predict_examples, ignore_keys=None, metric_key_prefix: str = "test")
src/transformers/examples/pytorch/question-answering/trainer_qa.py:93
↓ 10 callersMethodregister_subcommand
(parser: ArgumentParser)
src/transformers/src/transformers/commands/run.py:64
↓ 10 callersMethodrender
(self, vertices, faces=None, img=None, camera_t=np.zeros([3], dtype=np.float32),
src/utils/renderer.py:545
↓ 10 callersMethodreset
Resets the accumulated gradients on the current replica.
src/transformers/src/transformers/optimization_tf.py:364
↓ 10 callersFunctionrun_command
Runs `command` with `subprocess.check_output` and will potentially return the `stdout`. Will also properly capture if an error occured while
src/transformers/src/transformers/testing_utils.py:1967
↓ 10 callersFunctionstable_softmax
Stable wrapper that returns the same output as `tf.nn.softmax`, but that works reliably with XLA on CPU. It is meant as a workaround for the
src/transformers/src/transformers/tf_utils.py:49
↓ 10 callersMethodupdate
(self, token_id: int)
src/transformers/src/transformers/generation/beam_constraints.py:309
↓ 9 callersMethod__init__
(self, *args, **kwargs)
src/transformers/src/transformers/data/processors/glue.py:420
↓ 9 callersMethod__new__
( cls, data: Optional[torch.Tensor] = None, requires_grad=False, # quantized weights
src/bitsandbytes/bitsandbytes/nn/modules.py:212
↓ 9 callersFunction_configure_library_root_logger
()
src/transformers/src/transformers/utils/logging.py:82
↓ 9 callersMethod_get_uniform_logits
(self, batch_size: int, length: int)
src/transformers/tests/generation/test_flax_logits_process.py:44
↓ 9 callersMethod_update_model_kwargs_for_generation
( self, outputs: ModelOutput, model_kwargs: Dict[str, Any], is_encoder_decoder
src/transformers/src/transformers/generation/utils.py:848
↓ 9 callersMethodadd_callback
Add a callback to the current list of [`~transformers.TrainerCallback`]. Args: callback (`type` or [`~transformers.Traine
src/transformers/src/transformers/trainer.py:651
↓ 9 callersMethodargparsersEqual
Small helper to check pseudo-equality of parsed arguments on `ArgumentParser` instances.
src/transformers/tests/utils/test_hf_argparser.py:144
↓ 9 callersMethodbuild_inputs_with_special_tokens
Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and adding special tokens
src/transformers/src/transformers/tokenization_utils_base.py:3321
↓ 9 callersMethodcheck_callbacks_equality
(self, cbs1, cbs2)
src/transformers/tests/trainer/test_trainer_callback.py:107
↓ 9 callersMethodcheck_saved_checkpoints
(self, output_dir, freq, total, is_pretrained=True, safe_weights=True)
src/transformers/tests/trainer/test_trainer.py:407
↓ 9 callersFunctionextract_imports
Get the imports a given module makes. Args: module_fname (`str`): The name of the file of the module where we want to lo
src/transformers/utils/tests_fetcher.py:612
↓ 9 callersMethodfinalize
Return the properly gathered arrays and truncate to the number of samples (since the sampler added some extras to get each process a
src/transformers/src/transformers/trainer_pt_utils.py:467
↓ 9 callersFunctionfreeze_params
Set requires_grad=False for each of model.parameters()
src/transformers/examples/research_projects/seq2seq-distillation/utils.py:540
↓ 9 callersFunctionget_aligned_output_features_output_indices
Get the `out_features` and `out_indices` so that they are aligned. The logic is as follows: - `out_features` not set, `out_indices`
src/transformers/src/transformers/utils/backbone_utils.py:87
↓ 9 callersMethodget_bias
Dict of bias attached to an LM head. The key represents the name of the bias attribute. Return: `tf.Variable`: The weigh
src/transformers/src/transformers/modeling_tf_utils.py:1935
↓ 9 callersMethodget_input_embeddings
Returns the model's input embeddings layer. Returns: `tf.Variable`: The embeddings layer mapping vocabulary to hidden st
src/transformers/src/transformers/modeling_tf_utils.py:1319
↓ 9 callersFunctionget_module_dependencies
Refines the result of `extract_imports` to remove subfolders and get a proper list of module filenames: if a file as an import `from utils im
src/transformers/utils/tests_fetcher.py:694
↓ 9 callersMethodget_optimizer_cls_and_kwargs
Returns the optimizer class and optimizer parameters based on the training arguments. Args: args (`transformers.training
src/transformers/src/transformers/trainer.py:969
↓ 9 callersFunctionget_rank
()
src/utils/comm.py:24
↓ 9 callersFunctionget_results
(output_dir)
src/transformers/examples/tensorflow/test_tensorflow_examples.py:71
↓ 9 callersFunctionhas_length
Checks if the dataset implements __len__() and it doesn't raise an error
src/transformers/src/transformers/trainer_utils.py:659
↓ 9 callersMethodis_done
(self)
src/transformers/src/transformers/utils/hub.py:1180
↓ 9 callersFunctionis_remote_url
(url_or_filename)
src/transformers/src/transformers/utils/hub.py:153
↓ 9 callersFunctionlist_field
(default=None, metadata=None)
src/transformers/tests/utils/test_hf_argparser.py:38
↓ 9 callersFunctionmel_to_hertz
Convert frequency from mels to hertz. Args: mels (`float` or `np.ndarray`): The frequency, or multiple frequencies, in m
src/transformers/src/transformers/audio_utils.py:61
↓ 9 callersFunctionnested_numpify
Numpify `tensors` (even if it's a nested list/tuple/dict of tensors).
src/transformers/src/transformers/trainer_pt_utils.py:154
↓ 9 callersFunctionnormalize
Normalizes `image` using the mean and standard deviation specified by `mean` and `std`. image = (image - mean) / std Args: imag
src/transformers/src/transformers/image_transforms.py:347
↓ 9 callersMethodnormalize
Normalizes `image` with `mean` and `std`. Note that this will trigger a conversion of `image` to a NumPy array if it's a PIL Image.
src/transformers/src/transformers/image_utils.py:439
↓ 9 callersMethodnum_rows
(self)
src/utils/tsv_file.py:62
↓ 9 callersFunctionresize
Resizes `image` to `(height, width)` specified by `size` using the PIL library. Args: image (`np.ndarray`): The image to
src/transformers/src/transformers/image_transforms.py:276
↓ 9 callersMethodseek
(self, idx)
src/utils/tsv_file.py:66
↓ 9 callersFunctionset_seed
(seed, n_gpu)
src/utils/miscellaneous.py:149
↓ 9 callersFunctionsimple_accuracy
(preds, labels)
src/transformers/src/transformers/data/metrics/__init__.py:30
↓ 9 callersMethodto_dict
Serializes this instance to a Python dictionary. Returns: `Dict[str, Any]`: Dictionary of all the attributes that make u
src/transformers/src/transformers/generation/configuration_utils.py:841
↓ 9 callersMethodto_json_string
Serializes this instance to a JSON string.
src/transformers/src/transformers/modelcard.py:245
↓ 9 callersMethodtoken_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:
src/transformers/src/transformers/tokenization_utils_base.py:425
↓ 9 callersFunctionvalidate_stopping_criteria
(stopping_criteria: StoppingCriteriaList, max_length: int)
src/transformers/src/transformers/generation/stopping_criteria.py:144
↓ 8 callersMethod__init__
(self, hidden_size)
src/transformers/tests/trainer/test_trainer.py:349
↓ 8 callersMethod_check_no_pad_token_padding
(self, tokenizer, sequences)
src/transformers/tests/test_tokenization_common.py:2436
↓ 8 callersMethod_gather_and_numpify
Gather value of `tensors` (tensor or list/tuple of nested tensors) and convert them to numpy before concatenating them to `gathered`
src/transformers/src/transformers/trainer.py:3776
↓ 8 callersFunction_pad
(items, key, padding_value, padding_side)
src/transformers/src/transformers/pipelines/base.py:73
↓ 8 callersMethod_prepare_inputs
Prepare `inputs` before feeding them to the model, converting them to tensors if they are not already and handling potential state.
src/transformers/src/transformers/trainer.py:2641
↓ 8 callersMethodadd
Add a key to _index (MinHashLSH) the min_hash is used to query closest matches based on the jaccard_threshold. The new key is either a
src/transformers/examples/research_projects/codeparrot/scripts/minhash_deduplication.py:47
↓ 8 callersMethodassert_dump_and_restore
(self, be_original: BatchEncoding, equal_op: Optional[Callable] = None)
src/transformers/tests/tokenization/test_tokenization_utils.py:59
↓ 8 callersMethodcompute_objective
(metrics: Dict[str, float])
src/transformers/tests/trainer/test_trainer.py:2501
↓ 8 callersMethodcompute_transition_scores
Computes the transition scores of sequences given the generation scores (and beam indices, if beam search was used). This is a conven
src/transformers/src/transformers/generation/utils.py:1147
↓ 8 callersFunctioncreate_and_fill_np_array
Create and fill numpy array of size len_of_validation_data * max_length_of_output_tensor Args: start_or_end_logits(:obj:
src/transformers/examples/pytorch/question-answering/run_qa_beam_search_no_trainer.py:697
↓ 8 callersFunctiondownload_url
Downloads a given url in a temporary file. This function is not safe to use in multiple processes. Its only use is for deprecated behavior al
src/transformers/src/transformers/utils/hub.py:557
↓ 8 callersMethodevaluate
Run evaluation and returns metrics. The calling script will be responsible for providing a method to compute metrics, as they are ta
src/transformers/src/transformers/trainer_seq2seq.py:112
↓ 8 callersFunctionexpand_dims
Framework-agnostic version of `numpy.expand_dims` that will work on torch/TensorFlow/Jax tensors as well as NumPy arrays.
src/transformers/src/transformers/utils/generic.py:625
↓ 8 callersMethodexpand_frame
(self, line)
src/transformers/src/transformers/debug_utils.py:168
↓ 8 callersMethodfinalize
( self, input_ids: torch.LongTensor, next_scores: torch.FloatTensor, next_toke
src/transformers/src/transformers/generation/beam_search.py:111
↓ 8 callersFunctionfreeze_params
Set requires_grad=False for each of model.parameters()
src/transformers/examples/legacy/seq2seq/utils.py:559
↓ 8 callersFunctionget_gpu_count
Return the number of available gpus (regardless of whether torch, tf or jax is used)
src/transformers/src/transformers/testing_utils.py:1042
↓ 8 callersFunctionget_random_image
(height, width)
src/transformers/tests/utils/test_image_utils.py:42
↓ 8 callersFunctionget_results
(output_dir, split="eval")
src/transformers/examples/flax/test_flax_examples.py:64
↓ 8 callersMethodgradient_checkpointing_enable
Activates gradient checkpointing for the current model. Note that in other frameworks this feature can be referred to as "activation
src/transformers/src/transformers/modeling_utils.py:1864
↓ 8 callersMethodhf_compute_loss
(self, labels, logits)
src/transformers/src/transformers/modeling_tf_utils.py:304
↓ 8 callersFunctionhttp_get
( url, temp_file, proxies=None, resume_size=0, user_agent=None, )
src/transformers/examples/research_projects/lxmert/utils.py:254
↓ 8 callersFunctionis_apex_available
()
src/transformers/src/transformers/utils/import_utils.py:542
↓ 8 callersFunctionis_bitsandbytes_available
()
src/transformers/src/transformers/utils/import_utils.py:596
↓ 8 callersFunctionis_ray_available
()
src/transformers/src/transformers/integrations/integration_utils.py:105
↓ 8 callersFunctionlmap
list(map(f, x))
src/transformers/examples/research_projects/seq2seq-distillation/utils.py:56
↓ 8 callersFunctionpad_list_tensors
location will always be cpu for np tensors
src/transformers/examples/research_projects/visual_bert/modeling_frcnn.py:46
↓ 8 callersFunctionpad_list_tensors
location will always be cpu for np tensors
src/transformers/examples/research_projects/lxmert/modeling_frcnn.py:46
↓ 8 callersFunctionparse_flag_from_env
(key, default=False)
src/transformers/src/transformers/testing_utils.py:157
↓ 8 callersFunctionprepare_reports
(title, header, reports, to_truncate=True)
src/transformers/utils/notification_service.py:748
↓ 8 callersMethodquant
(x, quant_type, dim=1)
src/bitsandbytes/tests/test_modules.py:74
↓ 8 callersFunctionreplace_model_patterns
Replace all patterns present in a given text. Args: text (`str`): The text to treat. old_model_patterns (`ModelPatterns`): T
src/transformers/src/transformers/commands/add_new_model_like.py:324
↓ 8 callersMethodsave_pretrained
r""" Save a generation configuration object to the directory `save_directory`, so that it can be re-loaded using the [`~GenerationConf
src/transformers/src/transformers/generation/configuration_utils.py:500
↓ 8 callersFunctionsetup_logger
(name, save_dir, distributed_rank, filename="log.txt")
src/utils/logger.py:82
↓ 8 callersMethodto_dict
(self)
src/transformers/src/transformers/pipelines/base.py:1254
↓ 8 callersMethodto_dict
(self)
src/transformers/examples/research_projects/lxmert/utils.py:143
↓ 8 callersMethodtokenize
Wrapper function for tokenizing query and supports Args: x (`List[str] or List[List[str]]`): List of stri
src/transformers/examples/research_projects/fsner/src/fsner/tokenizer_utils.py:10
↓ 8 callersMethodupdate
(self, val, n=1)
src/utils/metric_logger.py:19
↓ 8 callersMethodupdate_from_string
Updates attributes of this class with attributes from `update_str`. The expected format is ints, floats and strings as is, and for b
src/transformers/src/transformers/configuration_utils.py:953
↓ 7 callersMethod__init__
Conv1D layer as defined by Radford et al. for OpenAI GPT (and also used in GPT-2) Basically works like a Linear layer but the weights are
src/modeling/bert/modeling_utils.py:524
← previousnext →301–400 of 11,352, ranked by callers