# pypose.randn_SO3¶

class pypose.randn_SO3(*lsize, sigma=1.0, **kwargs)[source]

Returns SO3_type LieTensor filled with the Exponential map of the random so3_type LieTensor.

\begin{aligned} \mathrm{data}[*, :] &= \mathrm{Exp}([\delta_x, \delta_y, \delta_z]) \\ &= \mathrm{Exp}([\delta_x', \delta_y', \delta_z'] \cdot \theta), \end{aligned}

where $$[\delta_x', \delta_y', \delta_z']$$ is generated from uniform distribution $$\mathcal{U}_{\mathrm{s}}$$ on a standard sphere, $$\mathrm{Exp}()$$ is the Exponential map, $$\theta$$ is generated from a normal distribution $$\mathcal{N}(0, \sigma)$$ where $$\sigma$$ (sigma) is the standard deviation.

For detailed explanation, please see pypose.randn_so3() and pypose.Exp().

Parameters
• lsize (int...) – a sequence of integers defining the lshape of the output tensor. Can be a variable number of arguments or a collection like a list or tuple.

• sigma (float, optional) – standard deviation for the angle of the generated rotation. Default: 1.0.

• requires_grad (bool, optional) – If autograd should record operations on the returned tensor. Default: False.

• generator (torch.Generator, optional) – a pseudorandom number generator for sampling

• dtype (torch.dtype, optional) – the desired data type of returned tensor. Default: None. If None, uses a global default (see torch.set_default_tensor_type()).

• layout (torch.layout, optional) – the desired layout of returned Tensor. Default: torch.strided.

• device (torch.device, optional) – the desired device of returned tensor. Default: None. If None, uses the current device for the default tensor type (see torch.set_default_tensor_type()). Device will be the CPU for CPU tensor types and the current CUDA device for CUDA tensor types.

Returns

a SO3_type LieTensor.

Return type

LieTensor

Example

>>> pp.randn_SO3(sigma=0.1, requires_grad=True)
SO3Type LieTensor:
LieTensor([ 0.0082,  0.0077, -0.0018,  0.9999], requires_grad=True)