pytorch/test/nn
Mikayla Gawarecki 3372aa51b4 Integrate swap_tensors into nn.Module.load_state_dict (#117913)
Added a `torch.Tensor` method that defines how to transform `other`, a value in the state dictionary, to be loaded into `self`, a param/buffer in an `nn.Module` before swapping via `torch.utils.swap_tensors`
* `param.module_load(sd[key])`

This method can be overridden using `__torch_function__`.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/117913
Approved by: https://github.com/albanD
2024-02-09 22:32:29 +00:00
..
test_convolution.py [CUDA][cuDNN][TF32] Misc TF32 updates (#118781) 2024-02-01 15:32:50 +00:00
test_dropout.py
test_embedding.py
test_init.py
test_lazy_modules.py [optim] Rectify capturable testing and fix bugs! (#118326) 2024-02-02 19:13:00 +00:00
test_load_state_dict.py Integrate swap_tensors into nn.Module.load_state_dict (#117913) 2024-02-09 22:32:29 +00:00
test_module_hooks.py
test_multihead_attention.py
test_packed_sequence.py
test_parametrization.py
test_pooling.py
test_pruning.py