Rate this Page
โ˜… โ˜… โ˜… โ˜… โ˜…

torch.nn.utils.convert_parameters.vector_to_parameters#

torch.nn.utils.convert_parameters.vector_to_parameters(vec, parameters)[source]#

Copy slices of a vector into an iterable of parameters.

Parameters
  • vec (Tensor) โ€“ a single vector representing the parameters of a model.

  • parameters (Iterable[Tensor]) โ€“ an iterable of Tensors that are the parameters of a model.