tf_agents.bandits.multi_objective.multi_objective_scalarizer.Scalarizer

Abstract base class for different Scalarizers.

The Scalarizer class is a callable that transforms multiple objectives into a single scalar reward.

num_of_objectives A non-negative integer indicating the number of objectives to scalarize.

ValueError if not isinstance(num_of_objectives, int).
ValueError if num_of_objectives < 2.

Methods

set_parameters

View source

Setter method for scalarization parameters.

__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.