MCPcopy Create free account

hub / github.com/pytorch/examples / functions

Functions460 in github.com/pytorch/examples

↓ 30 callersMethodsave
(self, model: FSDPModule, optim: torch.optim.Optimizer)
distributed/FSDP2/checkpoint.py:199
↓ 22 callersMethodupdate
(self, val, n=1)
imagenet/main.py:455
↓ 14 callersFunctionrank_log
helper function to log only on global rank 0
distributed/tensor_parallelism/log_utils.py:12
↓ 14 callersMethodtrain
(self, x_pos, x_neg)
mnist_forward_forward/main.py:52
↓ 10 callersMethodreset
(self)
imagenet/main.py:449
↓ 10 callersMethodreset_parameters
(self)
distributed/FSDP2/model.py:53
↓ 7 callersFunctiontimed_log
(text)
distributed/rpc/batch/parameter_server.py:27
↓ 6 callersMethodtrace
(self, root, concrete_args=None)
fx/profiling_tracer.py:66
↓ 4 callersMethod__init__
(self, dim: int, eps: float = 1e-6)
distributed/tensor_parallelism/llama2_model.py:129
↓ 4 callersMethod_make_layer
(self, planes, blocks, stride=1)
distributed/rpc/pipeline/main.py:56
↓ 4 callersFunction_remote_method
r""" a helper function to run method on the owner of rref and fetch back the result using RPC
distributed/rpc/rnn/rnn.py:14
↓ 4 callersMethodall_reduce
(self)
imagenet/main.py:461
↓ 4 callersMethodforward
(self, x)
mnist_forward_forward/main.py:67
↓ 4 callersMethodinit_hidden
(self, bsz)
word_language_model/model.py:56
↓ 4 callersMethodinit_weights
(self, init_std: float)
distributed/tensor_parallelism/llama2_model.py:185
↓ 4 callersMethodparameter_rrefs
r""" Create one RRef for each parameter in the given local module, and return a list of RRefs.
distributed/rpc/pipeline/main.py:77
↓ 3 callersMethod__init__
(self, block, inplanes, num_classes=1000, groups=1, width_per_group=64, norm_layer=None)
distributed/rpc/pipeline/main.py:44
↓ 3 callersMethod__init__
(self, args: ModelArgs)
distributed/FSDP2/model.py:19
↓ 3 callersMethod__init__
(self, config: GPTConfig)
distributed/minGPT-ddp/mingpt/model.py:102
↓ 3 callersMethod__init__
(self, in_channels, out_channels, kernel_size, stride)
fast_neural_style/neural_style/transformer_net.py:45
↓ 3 callersFunctionbatchify
(data, bsz)
word_language_model/main.py:85
↓ 3 callersMethodclean_text
(self, text)
distributed/FSDP/summarization_dataset.py:39
↓ 3 callersMethodcreate_node
(self, kind : str, target : Union[str, Callable], args : Tuple[Any], kwargs : Dict[str, An
fx/custom_tracer.py:99
↓ 3 callersMethoddecode
(self, z)
vae/main.py:65
↓ 3 callersFunctiondraw
(yi, color)
time_sequence_prediction/train.py:83
↓ 3 callersFunctionget_data
(opts)
language_translation/src/data.py:19
↓ 3 callersFunctionget_logger
()
distributed/tensor_parallelism/log_utils.py:8
↓ 3 callersFunctionmakedirs
helper function for python 2 and 3 to call os.makedirs() avoiding an error if the directory to be created already exists
legacy/snli/util.py:4
↓ 3 callersFunctionoverlay_y_on_x
(x, y, classes=10)
mnist_forward_forward/main.py:25
↓ 3 callersFunctionremote_method
(method, rref, *args, **kwargs)
distributed/rpc/parameter_server/rpc_parameter_server.py:79
↓ 3 callersFunctiontest
(model, criterion, input, target, mask)
gat/main.py:277
↓ 3 callersFunctiontest
(model, criterion, input, target, mask)
gcn/main.py:189
↓ 3 callersMethodtokenize
Tokenizes a text file.
word_language_model/data.py:27
↓ 3 callersFunctionverify_min_gpu_count
verification that we have at least 2 gpus to run dist examples
distributed/tensor_parallelism/log_utils.py:18
↓ 2 callersMethod__init__
(self, rnn_type, ntoken, ninp, nhid, nlayers, dropout=0.5, tie_weights=False)
word_language_model/model.py:9
↓ 2 callersMethod__init__
(self, num_gpus=0)
distributed/rpc/parameter_server/rpc_parameter_server.py:19
↓ 2 callersMethod__init__
(self, ntoken, nhid, dropout)
distributed/rpc/rnn/rnn.py:62
↓ 2 callersMethod_prepare_dataloader
(self, dataset: Dataset)
distributed/minGPT-ddp/mingpt/trainer.py:73
↓ 2 callersFunction_remote_method
r""" a helper function to run method on the owner of rref and fetch back the result using RPC
distributed/rpc/rl/main.py:41
↓ 2 callersMethod_run_epoch
(self, epoch: int, dataloader: DataLoader, train: bool = True)
distributed/minGPT-ddp/mingpt/trainer.py:117
↓ 2 callersFunction_seq_transform
(*transforms)
language_translation/src/data.py:62
↓ 2 callersFunction_yield_tokens
(iterable_data, tokenizer, src)
language_translation/src/data.py:9
↓ 2 callersFunctionaccuracy
Computes the accuracy over the k top predictions for the specified values of k
imagenet/main.py:512
↓ 2 callersFunctioncalculate_valid_crop_size
(crop_size, upscale_factor)
super_resolution/data.py:34
↓ 2 callersFunctioncreate_mask
(src, tgt, pad_idx, device)
language_translation/src/data.py:104
↓ 2 callersMethoddisplay
(self, batch)
imagenet/main.py:497
↓ 2 callersFunctiondownload_bsd300
(dest="dataset")
super_resolution/data.py:10
↓ 2 callersFunctionevaluate
(data_source)
word_language_model/main.py:143
↓ 2 callersFunctionf
(x)
fx/invert.py:51
↓ 2 callersFunctionformat_metrics_to_gb
quick function to format numbers to gigabyte and round to 4 digit precision
distributed/FSDP/utils/train_utils.py:29
↓ 2 callersMethodforward
(self, x_rref)
distributed/rpc/pipeline/main.py:110
↓ 2 callersMethodforward_once
(self, x)
siamese_network/main.py:59
↓ 2 callersFunctiongenerate_square_subsequent_mask
(size, device)
language_translation/src/data.py:98
↓ 2 callersFunctionget_batch
(source, i)
word_language_model/main.py:136
↓ 2 callersFunctioninput_transform
(crop_size, upscale_factor)
super_resolution/data.py:38
↓ 2 callersFunctionloss_function
(recon_x, x, mu, logvar)
vae/main.py:80
↓ 2 callersFunctionpoly_desc
Creates a string description of a polynomial.
regression/main.py:24
↓ 2 callersFunctionprecompute_freqs_cis
Precompute the frequency tensor for complex exponentials (cis) with given dimensions. This function calculates a frequency tensor with compl
distributed/tensor_parallelism/llama2_model.py:30
↓ 2 callersMethodpredict
(self, x)
mnist_forward_forward/main.py:40
↓ 2 callersFunctionrepackage_hidden
Wraps hidden states in new Tensors, to detach them from their history.
word_language_model/main.py:117
↓ 2 callersFunctionrepeat_kv
torch.repeat_interleave(x, dim=2, repeats=n_rep)
distributed/tensor_parallelism/llama2_model.py:103
↓ 2 callersMethodreset_parameters
(self)
distributed/tensor_parallelism/llama2_model.py:141
↓ 2 callersFunctionrun_validate
(loader, base_progress=0)
imagenet/main.py:362
↓ 2 callersFunctionsave_image
(filename, data)
fast_neural_style/neural_style/utils.py:14
↓ 2 callersFunctionsigmoid_lowp
(x : torch.Tensor)
fx/primitive_library.py:22
↓ 2 callersFunctiontarget_transform
(crop_size)
super_resolution/data.py:46
↓ 2 callersMethodtrain
(self)
distributed/minGPT-ddp/mingpt/trainer.py:146
↓ 2 callersFunctionvalidate
(val_loader, model, criterion, args)
imagenet/main.py:358
↓ 1 callersMethod__init__
Initializes the GAT model. Args: in_features (int): number of input features per node. n_hidden (int): output size
gat/main.py:149
↓ 1 callersMethod__init__
(self, config)
legacy/snli/model.py:21
↓ 1 callersMethod__init__
(self, world_size)
distributed/rpc/rl/main.py:113
↓ 1 callersMethod__init__
(self, world_size, batch=True)
distributed/rpc/batch/reinforce.py:120
↓ 1 callersMethod__init__
(self, dims)
mnist_forward_forward/main.py:33
↓ 1 callersMethod__init__
( self, num_encoder_layers, num_decoder_layers, embed_size,
language_translation/src/model.py:29
↓ 1 callersMethod__init__
(self, ngpu)
dcgan/main.py:127
↓ 1 callersMethod__init__
(self, root, train, download=False)
siamese_network/main.py:81
↓ 1 callersMethod__init__
(self, input_dim, hidden_dim, output_dim, use_bias=True, dropout_p=0.1)
gcn/main.py:79
↓ 1 callersMethod_generate_square_subsequent_mask
(self, sz)
word_language_model/model.py:122
↓ 1 callersMethod_get_attention_scores
calculates the attention scores e_ij for all pairs of nodes (i, j) in the graph in vectorized parallel form. for each pair of source and targe
gat/main.py:67
↓ 1 callersMethod_get_batch_fmtstr
(self, num_batches)
imagenet/main.py:507
↓ 1 callersMethod_get_full_model_state_dict
(self, model: FSDPModule)
distributed/FSDP2/checkpoint.py:136
↓ 1 callersMethod_get_full_optimizer_state_dict
( self, model: FSDPModule, opt: torch.optim.Optimizer, )
distributed/FSDP2/checkpoint.py:156
↓ 1 callersMethod_init_weights
(self)
language_translation/src/model.py:61
↓ 1 callersMethod_initialize_weights
(self)
super_resolution/model.py:26
↓ 1 callersMethod_load_snapshot
(self)
distributed/minGPT-ddp/mingpt/trainer.py:83
↓ 1 callersMethod_load_snapshot
(self, snapshot_path)
distributed/ddp-tutorial-series/multigpu_torchrun.py:39
↓ 1 callersMethod_load_snapshot
(self, snapshot_path)
distributed/ddp-tutorial-series/multinode.py:40
↓ 1 callersMethod_norm
(self, x: torch.Tensor)
distributed/tensor_parallelism/llama2_model.py:134
↓ 1 callersFunction_parameter_rrefs
r""" Create one RRef for each parameter in the given local module, and return a list of RRefs.
distributed/rpc/rnn/rnn.py:27
↓ 1 callersMethod_run_batch
(self, source, targets, train: bool = True)
distributed/minGPT-ddp/mingpt/trainer.py:99
↓ 1 callersMethod_run_batch
(self, source, targets)
distributed/ddp-tutorial-series/single_gpu.py:22
↓ 1 callersMethod_run_batch
(self, source, targets)
distributed/ddp-tutorial-series/multigpu.py:40
↓ 1 callersMethod_run_batch
(self, source, targets)
distributed/ddp-tutorial-series/multigpu_torchrun.py:46
↓ 1 callersMethod_run_batch
(self, source, targets)
distributed/ddp-tutorial-series/multinode.py:47
↓ 1 callersMethod_run_epoch
(self, epoch)
distributed/ddp-tutorial-series/single_gpu.py:29
↓ 1 callersMethod_run_epoch
(self, epoch)
distributed/ddp-tutorial-series/multigpu.py:47
↓ 1 callersMethod_run_epoch
(self, epoch)
distributed/ddp-tutorial-series/multigpu_torchrun.py:53
↓ 1 callersMethod_run_epoch
(self, epoch)
distributed/ddp-tutorial-series/multinode.py:54
↓ 1 callersFunction_run_trainer
r""" The trainer creates a distributed RNNModel and a DistributedOptimizer. Then, it performs training using random input data.
distributed/rpc/rnn/main.py:13
↓ 1 callersMethod_save_checkpoint
(self, epoch)
distributed/ddp-tutorial-series/single_gpu.py:37
next →1–100 of 460, ranked by callers