TorchBicop.from_bicop
- classmethod TorchBicop.from_bicop(cop, cache_integrals=True, device=None, dtype=torch.float64)
Lifts a fitted
Bicopinto aTorchBicop.The resulting
TorchBicopis atorch.nn.Module(so.to("cuda")moves the density grid in one line) built from a differentiable bilinear interpolator, with autograd flowing through everypdf/cdf/hfunc/hinvcall.- Parameters:
- copBicop
A fitted
Bicopof the TLL family atrotation=0(the only shapeTorchBicoprepresents directly). The density values are taken straight fromcop.parameters; the grid coordinates come fromInterpolationGrid2D.make_grid_pointswith the canonical Phi-spaced normal gridBicopuses. The grid is already normalised, so renormalisation is skipped (parity is typically< 1e-12per cell on fresh fits).- cache_integralsbool, default=True
See
__init__.- devicetorch.device or None, default=None
See
__init__.- dtypetorch.dtype, default=torch.float64
See
__init__.
- Returns:
- TorchBicop
A
TorchBicopmirroringcop.