Shortcuts

pypose.optim.kernel.Cauchy

class pypose.optim.kernel.Cauchy(delta=1.0)[source]

The robust Cauchy kernel cost function.

\[\bm{y}_i = \delta^2 \log\left(1 + \frac{\bm{x}_i}{\delta^2}\right), \]

where \(\delta\) (delta) is a hyperparameter, \(\bm{x}\) and \(\bm{y}\) are the input and output tensors, respectively.

Parameters

delta (float, optional) – Specify the Cauchy cost. The value must be positive. Default: 1.0

Note

The input has to be a non-negative tensor and the output tensor has the same shape with the input.

Example

>>> import pypose.optim.kernel as ppok
>>> kernel = ppok.Cauchy()
>>> input = torch.tensor([0, 0.5, 1, 2, 3])
>>> kernel(input)
tensor([0.0000, 0.4055, 0.6931, 1.0986, 1.3863])
../../_images/cauchy.png
forward(input)[source]
Parameters

input (torch.Tensor) – the input tensor (non-negative).

Docs

Access documentation for PyPose

View Docs

Tutorials

Get started with tutorials and examples

View Tutorials

Get Started

Find resources and how to start using pypose

View Resources