nngeometry/object/vector.py
def random_pvector(layer_collection, device=None):
    """
    Returns a random :class:`nngeometry.object.PVector` object using
    the structure defined by the `layer_collection` parameter, with 
    each components drawn from a normal distribution with mean 0 and standard
    deviation 1.

    The returned `PVector` will internally use a flat representation.

    :param layer_collection: The :class:`nngeometry.layercollection.LayerCollection`
    describing the structure of the random pvector
    """
    n_parameters = layer_collection.numel()
    random_v_flat = torch.normal(0, 1, (n_parameters,),
                               device=device)
    return PVector(layer_collection=layer_collection,
                   vector_repr=random_v_flat)

    Returns a random :class:`nngeometry.object.PVector` object using
    the structure defined by the `layer_collection` parameter, with 
    each components drawn from a normal distribution with mean 0 and standard
    deviation 1.

    The returned `PVector` will internally use a flat representation.

    :param layer_collection: The :class:`nngeometry.layercollection.LayerCollection`
    describing the structure of the random pvector
    
Returns a random :class:`nngeometry.object.PVector` object using
the structure defined by the `layer_collection` parameter, with
each components drawn from a normal distribution with mean 0 and standard
deviation 1.

The returned `PVector` will internally use a flat representation.
Returns a random : class : ` nngeometry . object . PVector ` object using the structure defined by the ` layer_collection ` parameter with each components drawn from a normal distribution with mean 0 and standard deviation 1 . The returned ` PVector ` will internally use a flat representation .
def random_pvector(layer_collection, device=None):
    n_parameters = layer_collection.numel()
    random_v_flat = torch.normal(0, 1, (n_parameters,),
                               device=device)
    return PVector(layer_collection=layer_collection,
                   vector_repr=random_v_flat)
def random_pvector ( layer_collection , device = None ) : n_parameters = layer_collection . numel ( ) random_v_flat = torch . normal ( 0 , 1 , ( n_parameters , ) , device = device ) return PVector ( layer_collection = layer_collection , vector_repr = random_v_flat )
Returns a random :class:`nngeometry.object.PVector` object using
the structure defined by the `layer_collection` parameter, with
each components drawn from a normal distribution with mean 0 and standard
deviation 1.
Returns a random : class : ` nngeometry . object . PVector ` object using the structure defined by the ` layer_collection ` parameter with each components drawn from a normal distribution with mean 0 and standard deviation 1 .
"""
    Returns a random :class:`nngeometry.object.PVector` object using
    the structure defined by the `layer_collection` parameter, with 
    each components drawn from a normal distribution with mean 0 and standard
    deviation 1.

    The returned `PVector` will internally use a flat representation.

    :param layer_collection: The :class:`nngeometry.layercollection.LayerCollection`
    describing the structure of the random pvector
    """
layer_collection
The :class:`nngeometry.layercollection.LayerCollection`
describing the structure of the random pvector
The : class : ` nngeometry . layercollection . LayerCollection ` describing the structure of the random pvector
device