Full-Weight Aggregator

class bacon.aggregators.lsp.full_weight.FullWeightAggregator(*args, **kwargs)
aggregate_float(values: Sequence[float], a: float, weights: Sequence[float]) float

Aggregate N scalar values with scalar andness a and N weights.

aggregate_tensor(values: Sequence[Any], andness, weights)

Aggregates two tensors using the Full Weight method.

Parameters:
  • x1 (torch.Tensor) – First input tensor.

  • x2 (torch.Tensor) – Second input tensor.

  • andness (float) – Andness.

  • w0 (float) – Weight for the first tensor.

  • w1 (float) – Weight for the second tensor.

Returns:

Resulting tensor after aggregation.

Return type:

torch.Tensor