Shortcuts

torch.nn.utils.parameters_to_vector

torch.nn.utils.parameters_to_vector(parameters)[source]

Convert parameters to one vector

Parameters

parameters (Iterable[Tensor]) – an iterator of Tensors that are the parameters of a model.

Returns

The parameters represented by a single vector

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources