torch.nn.Module.named_parameters()

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2024 Mar 8 13:47
Editor
Edited
Edited
2025 Oct 31 10:55
Refs
Refs
The torch.nn.Module.named_parameters() method returns an iterator that yields tuples containing both the name and the parameter tensor for each parameter in the module.
  • Iterator-based: Returns an iterator rather than a list, making it memory-efficient for large models
  • Hierarchical naming: Parameter names reflect the module hierarchy using dot notation (e.g., layer1.weight)
  • Recursive by default: Includes parameters from all submodules unless specified otherwise

Selective
Parameter Freezing

 
 
 
 
 
 

Recommendations