class_docstr: Scalarizes multple objectives by a linear combination.
class_docstr_tok: ["Scalarizes","multple","objectives","by","a","linear","combination","."]
docstr: Initialize the LinearScalarizer.
  
  Args:
    weights: A `Sequence` of weights for linearly combining the objectives.
    multi_objective_transform: A `Optional` `Callable` that takes in a
      `tf.Tensor` of multiple objective values and applies an arbitrary
      transform that returns a `tf.Tensor` of transformed multiple objectives.
      This transform is applied before the linear scalarization. The transform
      should apply to each objective so that the shape of the multiobjectives
      and the transformed multiobjectives are equal. This is verified in
      _validate_scalarization_parameter_shape via __call__.
docstr_tok: ["Initialize","the","LinearScalarizer",".","Args",":","weights",":","A","`","Sequence","`","of","weights","for","linearly","combining","the","objectives",".","multi_objective_transform",":","A","`","Optional","`","`","Callable","`","that","takes","in","a","`","tf.Tensor","`","of","multiple","objective","values","and","applies","an","arbitrary","transform","that","returns","a","`","tf.Tensor","`","of","transformed","multiple","objectives",".","This","transform","is","applied","before","the","linear","scalarization",".","The","transform","should","apply","to","each","objective","so","that","the","shape","of","the","multiobjectives","and","the","transformed","multiobjectives","are","equal",".","This","is","verified","in","_validate_scalarization_parameter_shape","via","__call__","."]
code: def __init__(
      self,
      weights: Sequence[ScalarFloat],
      multi_objective_transform: Optional[
          Callable[[tf.Tensor], tf.Tensor]
      ] = None,
  ):
      """Initialize the LinearScalarizer.
  
      Args:
        weights: A `Sequence` of weights for linearly combining the objectives.
        multi_objective_transform: A `Optional` `Callable` that takes in a
          `tf.Tensor` of multiple objective values and applies an arbitrary
          transform that returns a `tf.Tensor` of transformed multiple objectives.
          This transform is applied before the linear scalarization. The transform
          should apply to each objective so that the shape of the multiobjectives
          and the transformed multiobjectives are equal. This is verified in
          _validate_scalarization_parameter_shape via __call__.
      """
      self._weights = copy.deepcopy(weights)
      self._transformer = multi_objective_transform
      super(LinearScalarizer, self).__init__(len(self._weights))
  
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 1 to create a new LinearScalarizer object from inherited base classes: Scalarizer with example: obj = LinearScalarizer(weights, multi_objective_transform)