class_docstr: Helper class to simplify the handling of parameter buckets
class_docstr_tok: ["Helper","class","to","simplify","the","handling","of","parameter","buckets"]
docstr: Given the parameters which have been registered previously, rebuild the whole bucket
docstr_tok: ["Given","the","parameters","which","have","been","registered","previously",",","rebuild","the","whole","bucket"]
code: def _reattach_params(self) -> None:
      """
      Given the parameters which have been registered previously, rebuild the whole bucket
      """
      assert len(self._params) > 0
  
      self._fill = 0
      for p in self._params:
          if p.dtype != self.buffer.dtype:
              p.data = p.data.to(self.buffer.dtype)
          self._add_param_as_view(p, keep_existing_value=False)
  
imports: from typing import Any, Callable, List, Optional, Union
  import torch
label_desc: Use image node_id 5 for calling the ParamBucket obj's underlying member method code with example usage: obj._reattach_params() without return types