box_embeddings.modules.volume.tf_soft_volume

Module Contents

eps = 1e-23
tf_soft_volume(box_tensor: box_embeddings.parameterizations.tf_box_tensor.TFBoxTensor, beta: float = 1.0, scale: float = 1.0) tensorflow.Tensor

Volume of boxes. Uses softplus instead of ReLU/clamp

Parameters
  • box_tensor – input

  • beta – the beta parameter for the softplus

  • 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]

tf_log_soft_volume(box_tensor: box_embeddings.parameterizations.tf_box_tensor.TFBoxTensor, beta: float = 1.0, scale: float = 1.0) tensorflow.Tensor

Volume of boxes. Uses softplus instead of ReLU/clamp

Parameters
  • box_tensor – input

  • beta – the beta parameter for the softplus

  • 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]

class TFSoftVolume(log_scale: bool = True, beta: float = 1.0)

Bases: box_embeddings.modules.volume.tf_volume.TFVolume

Softplus based volume.