class_docstr: Abstract base class for different Scalarizers.
  
  The Scalarizer class is a callable that transforms multiple objectives into
  a single scalar reward.
class_docstr_tok: ["Abstract","base","class","for","different","Scalarizers",".","The","Scalarizer","class","is","a","callable","that","transforms","multiple","objectives","into","a","single","scalar","reward","."]
docstr: 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`.
docstr_tok: ["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","`","."]
code: def __call__(self, multi_objectives: tf.Tensor) -> tf.Tensor:
      """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`.
      """
      if multi_objectives.shape.rank != 2:
          raise ValueError(
              "The rank of the input should be 2, but is {}".format(
                  multi_objectives.shape.rank
              )
          )
      if multi_objectives.shape.dims[1] != self._num_of_objectives:
          raise ValueError(
              "The number of input objectives should be {}, but is {}.".format(
                  self._num_of_objectives,
                  multi_objectives.shape.dims[1],
              )
          )
      return self._scalarize(self._transform(multi_objectives))
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import copy
  from typing import Callable, Dict, NamedTuple, Optional, Sequence, Union
  import numpy
  import six
  import tensorflow.compat.v2
label_desc: Use image node_id 2 for calling the Scalarizer obj's underlying member method code with example usage: obj.__call__(multi_objectives) and returns: self