Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pytorch/examples
/ functions
Functions
460 in github.com/pytorch/examples
⨍
Functions
460
◇
Types & classes
108
Method
forward
(self, input1, input2)
siamese_network/main.py:64
Method
forward
Performs a graph convolution operation. Args: input_tensor (torch.Tensor): Input tensor representing node features.
gcn/main.py:46
Method
forward
Performs forward pass of the Graph Convolutional Network (GCN). Args: input_tensor (torch.Tensor): Input node feature ma
gcn/main.py:89
Method
forward
(self, X)
fast_neural_style/neural_style/transformer_net.py:29
Method
forward
(self, x)
fast_neural_style/neural_style/transformer_net.py:51
Method
forward
(self, x)
fast_neural_style/neural_style/transformer_net.py:71
Method
forward
(self, x)
fast_neural_style/neural_style/transformer_net.py:93
Method
forward
(self, X)
fast_neural_style/neural_style/vgg.py:27
Function
func
(txt_input)
language_translation/src/data.py:63
Method
generate
Take a conditioning sequence of indices idx (LongTensor of shape (b,t)) and complete the sequence max_new_tokens times, feeding the p
distributed/minGPT-ddp/mingpt/model.py:173
Function
get_dataset
(tokenizer, type_path, num_samples, args)
distributed/FSDP/summarization_dataset.py:80
Function
get_date_of_run
create date and time for file save uniqueness example: 2022-05-07-08:31:12_PM'
distributed/FSDP/model_checkpointing/checkpoint_handler.py:31
Method
get_dist_gradients
(self, cid)
distributed/rpc/parameter_server/rpc_parameter_server.py:105
Method
get_param_rrefs
(self)
distributed/rpc/parameter_server/rpc_parameter_server.py:117
Function
get_parameter_server
(num_gpus=0)
distributed/rpc/parameter_server/rpc_parameter_server.py:124
Function
get_size_policy
(min_params=1e8)
distributed/FSDP/policies/wrapping.py:27
Function
get_t5_wrapper
we register our main layer class and use the fsdp transformer wrapping policy ensures embedding layers are in the root fsdp unit for shared access
distributed/FSDP/policies/wrapping.py:34
Function
gram_matrix
(y)
fast_neural_style/neural_style/utils.py:21
Method
init_weights
(self, init_std: float)
distributed/tensor_parallelism/llama2_model.py:269
Method
init_weights
(self)
distributed/tensor_parallelism/llama2_model.py:341
Method
init_weights
(self, m)
siamese_network/main.py:54
Method
is_empty
(self)
distributed/FSDP2/checkpoint.py:47
Method
is_leaf_module
(self, m : torch.nn.Module, qualname : str)
fx/custom_tracer.py:67
Function
load_distributed_model_checkpoint
(model, rank, cfg)
distributed/FSDP/model_checkpointing/checkpoint_handler.py:244
Function
load_image
(filename, size=None, scale=None)
fast_neural_style/neural_style/utils.py:5
Function
load_model_checkpoint
load local checkpoint to rank0 cpu must be called * before * passing to FSDP
distributed/FSDP/model_checkpointing/checkpoint_handler.py:159
Function
load_model_sharded
(model, rank, cfg, verbose=True)
distributed/FSDP/model_checkpointing/checkpoint_handler.py:44
Function
load_optimizer_checkpoint
load an fdsp optimizer full_state checkpoint using scatter method this ensures only rank 0 loads the optimizer state dict and scatters to other ra
distributed/FSDP/model_checkpointing/checkpoint_handler.py:215
Function
main
(rank: int, world_size: int, save_every: int, total_epochs: int, batch_size: int)
distributed/ddp-tutorial-series/multigpu.py:86
Function
normalize_batch
(batch)
fast_neural_style/neural_style/utils.py:29
Method
parameter_rrefs
(self)
distributed/rpc/pipeline/main.py:179
Function
pattern
(a1, a2)
fx/subgraph_rewriter_basic_use.py:51
Function
replacement
(w1, w2)
fx/subgraph_rewriter_basic_use.py:56
Function
report_download_progress
(chunk_number, chunk_size, file_size)
cpp/tools/download_mnist.py:25
Method
report_reward
r""" Observers call this function to report rewards.
distributed/rpc/rl/main.py:146
Method
reset_parameters
(self)
distributed/FSDP2/model.py:71
Method
reset_parameters
(self)
distributed/FSDP2/model.py:91
Method
reset_parameters
(self)
distributed/minGPT-ddp/mingpt/model.py:88
Function
run
(rank, world_size)
distributed/rpc/batch/parameter_server.py:119
Method
run_episode
r""" Run one episode of n_steps. Args: agent_rref (RRef): an RRef referencing the agent object. n_steps (int)
distributed/rpc/rl/main.py:90
Method
run_episode
r""" Run one episode of n_steps. Args: agent_rref (RRef): an RRef referencing the agent object. n_steps (int)
distributed/rpc/batch/reinforce.py:80
Function
run_parameter_server
(rank, world_size)
distributed/rpc/parameter_server/rpc_parameter_server.py:134
Function
run_trainer
(ps_rref)
distributed/rpc/batch/parameter_server.py:101
Function
run_worker
r""" A wrapper function that initializes RPC, calls the function, and shuts down RPC.
distributed/rpc/ddp_rpc/main.py:113
Function
run_worker
(rank, world_size, num_gpus, train_loader, test_loader)
distributed/rpc/parameter_server/rpc_parameter_server.py:220
Function
run_worker
r""" This is the entry point for all processes. The rank 0 is the agent. All other ranks are observers.
distributed/rpc/rl/main.py:210
Function
run_worker
r""" A wrapper function that initializes RPC, calls the function, and shuts down RPC.
distributed/rpc/rnn/main.py:65
Function
run_worker
(rank, world_size, num_split)
distributed/rpc/pipeline/main.py:251
Function
run_worker
r""" This is the entry point for all processes. The rank 0 is the agent. All other ranks are observers.
distributed/rpc/batch/reinforce.py:220
Function
save_distributed_model_checkpoint
(model, rank, cfg, epoch=1)
distributed/FSDP/model_checkpointing/checkpoint_handler.py:278
Function
save_model_and_optimizer_sharded
save model and optimizer via sharded_state_dict to save_dir
distributed/FSDP/model_checkpointing/checkpoint_handler.py:82
Function
save_model_checkpoint
saving model via rank0 cpu streaming and full_state_dict
distributed/FSDP/model_checkpointing/checkpoint_handler.py:121
Function
save_optimizer_checkpoint
save optimizer state via full state dict
distributed/FSDP/model_checkpointing/checkpoint_handler.py:186
Method
select_action
r""" This function is mostly borrowed from the Reinforcement Learning example. See https://github.com/pytorch/examples/tree/main/reinf
distributed/rpc/rl/main.py:129
Method
select_action
r""" Non-batching select_action, return the action right away.
distributed/rpc/batch/reinforce.py:173
Method
select_action_batch
r""" Batching select_action: In each step, the agent waits for states from all observers, and process them together. This helps to red
distributed/rpc/batch/reinforce.py:146
Function
train
(rank, args, model, device, dataset, dataloader_kwargs)
mnist_hogwild/train.py:7
Method
train
(self, x_pos, x_neg)
mnist_forward_forward/main.py:71
Method
update_and_fetch_model
(ps_rref, grads)
distributed/rpc/batch/parameter_server.py:48
Function
weights_init
(m)
dcgan/main.py:117
← previous
401–460 of 460, ranked by callers