box_embeddings.modules.volume.tf_bessel_volume
¶
Module Contents¶
- eps = 1e-23¶
- euler_gamma = 0.5772156649015329¶
- tf_bessel_volume_approx(box_tensor: box_embeddings.parameterizations.tf_box_tensor.TFBoxTensor, volume_temperature: float = 1.0, intersection_temperature: float = 1.0, log_scale: bool = True, scale: float = 1.0) tensorflow.Tensor ¶
Volume of boxes. Uses the Softplus as an approximation of Bessel funtion.
- Parameters
box_tensor – input
volume_temperature – 1/volume_temperature is the beta parameter for the softplus
intersection_temperature – the intersection_temperature parameter (same value used in intersection).
log_scale – Whether the output should be in log scale or not.
scale – scale parameter. Should be left as 1.0 (default) in most cases.
- Returns
Tensor of shape (…, ) when self has shape (…, 2, num_dims)
- Raises
ValueError – if scale not in (0,1] or volume_temperature is 0.
- class TFBesselApproxVolume(log_scale: bool = True, volume_temperature: float = 1.0, intersection_temperature: float = 1.0)¶
Bases:
box_embeddings.modules.volume._tf_volume._TFVolume
Uses the Softplus as an approximation of Bessel function.