tf_agents.bandits.multi_objective.multi_objective_scalarizer.LinearScalarizer

Scalarizes multple objectives by a linear combination.

Inherits From: Scalarizer

weights A Sequence of weights for linearly combining the objectives.

TypeError if not isinstance(weights, Sequence).

Methods

call

View source

Implementation of scalarization logic by subclasses.

__call__

View source

Returns a single reward by scalarizing multiple objectives.

Args
multi_objectives A Tensor of shape [batch_size, number_of_objectives], where each column represents an objective.

Returns: A Tensor of shape [batch_size] representing scalarized rewards.

Raises
ValueError if multi_objectives.shape.rank != 2.
ValueError if multi_objectives.shape.dims[1] != self._num_of_objectives.