parameters: (self,  # _joint_linear_weights pylint: disable=invalid-name
                 model_dir=None,
                 n_classes=2,
                 weight_column_name=None,
                 linear_feature_columns=None,
                 linear_optimizer=None,
                 _joint_linear_weights=False,
                 dnn_feature_columns=None,
                 dnn_optimizer=None,
                 dnn_hidden_units=None,
                 dnn_activation_fn=nn.relu,
                 dnn_dropout=None,
                 gradient_clip_norm=None,
                 enable_centered_bias=False,
                 config=None,
                 feature_engineering_fn=None,
                 embedding_lr_multipliers=None,
                 input_layer_min_slice_size=None,
                 label_keys=None,
                 fix_global_step_increment_bug=False)
docstring: Constructs a DNNLinearCombinedClassifier instance.
  
      Note: New users must set `fix_global_step_increment_bug=True` when creating
      an estimator.
  
      Args:
        model_dir: Directory to save model parameters, graph and etc. This can
          also be used to load checkpoints from the directory into a estimator
          to continue training a previously saved model.
        n_classes: number of label classes. Default is binary classification.
          Note that class labels are integers representing the class index (i.e.
          values from 0 to n_classes-1). For arbitrary label values (e.g. string
          labels), convert to class indices first.
        weight_column_name: A string defining feature column name representing
          weights. It is used to down weight or boost examples during training.
          It will be multiplied by the loss of the example.
        linear_feature_columns: An iterable containing all the feature columns
          used by linear part of the model. All items in the set must be
          instances of classes derived from `FeatureColumn`.
        linear_optimizer: An instance of `tf.Optimizer` used to apply gradients to
          the linear part of the model. If `None`, will use a FTRL optimizer.
        _joint_linear_weights: If True a single (possibly partitioned) variable
          will be used to store the linear model weights. It's faster, but
          requires all columns are sparse and have the 'sum' combiner.
        dnn_feature_columns: An iterable containing all the feature columns used
          by deep part of the model. All items in the set must be instances of
          classes derived from `FeatureColumn`.
        dnn_optimizer: An instance of `tf.Optimizer` used to apply gradients to
          the deep part of the model. If `None`, will use an Adagrad optimizer.
        dnn_hidden_units: List of hidden units per layer. All layers are fully
          connected.
        dnn_activation_fn: Activation function applied to each layer. If `None`,
          will use `tf.nn.relu`.
        dnn_dropout: When not None, the probability we will drop out
          a given coordinate.
        gradient_clip_norm: A float > 0. If provided, gradients are clipped
          to their global norm with this clipping ratio. See
          tf.clip_by_global_norm for more details.
        enable_centered_bias: A bool. If True, estimator will learn a centered
          bias variable for each class. Rest of the model structure learns the
          residual after centered bias.
        config: RunConfig object to configure the runtime settings.
        feature_engineering_fn: Feature engineering function. Takes features and
          labels which are the output of `input_fn` and returns features and
          labels which will be fed into the model.
        embedding_lr_multipliers: Optional. A dictionary from `EmbeddingColumn` to
          a `float` multiplier. Multiplier will be used to multiply with
          learning rate for the embedding variables.
        input_layer_min_slice_size: Optional. The min slice size of input layer
          partitions. If not provided, will use the default of 64M.
        label_keys: Optional list of strings with size `[n_classes]` defining the
          label vocabulary. Only supported for `n_classes` > 2.
        fix_global_step_increment_bug: If `False`, the estimator needs two fit
          steps to optimize both linear and dnn parts. If `True`, this bug is
          fixed. New users must set this to `True`, but it the default value is
          `False` for backwards compatibility.
  
      Raises:
        ValueError: If `n_classes` < 2.
        ValueError: If both `linear_feature_columns` and `dnn_features_columns`
          are empty at the same time.
docstring_summary: Constructs a DNNLinearCombinedClassifier instance.
docstring_tokens: Constructs a DNNLinearCombinedClassifier instance .
function: def __init__(self,  # _joint_linear_weights pylint: disable=invalid-name
                 model_dir=None,
                 n_classes=2,
                 weight_column_name=None,
                 linear_feature_columns=None,
                 linear_optimizer=None,
                 _joint_linear_weights=False,
                 dnn_feature_columns=None,
                 dnn_optimizer=None,
                 dnn_hidden_units=None,
                 dnn_activation_fn=nn.relu,
                 dnn_dropout=None,
                 gradient_clip_norm=None,
                 enable_centered_bias=False,
                 config=None,
                 feature_engineering_fn=None,
                 embedding_lr_multipliers=None,
                 input_layer_min_slice_size=None,
                 label_keys=None,
                 fix_global_step_increment_bug=False):
      """Constructs a DNNLinearCombinedClassifier instance.
  
      Note: New users must set `fix_global_step_increment_bug=True` when creating
      an estimator.
  
      Args:
        model_dir: Directory to save model parameters, graph and etc. This can
          also be used to load checkpoints from the directory into a estimator
          to continue training a previously saved model.
        n_classes: number of label classes. Default is binary classification.
          Note that class labels are integers representing the class index (i.e.
          values from 0 to n_classes-1). For arbitrary label values (e.g. string
          labels), convert to class indices first.
        weight_column_name: A string defining feature column name representing
          weights. It is used to down weight or boost examples during training.
          It will be multiplied by the loss of the example.
        linear_feature_columns: An iterable containing all the feature columns
          used by linear part of the model. All items in the set must be
          instances of classes derived from `FeatureColumn`.
        linear_optimizer: An instance of `tf.Optimizer` used to apply gradients to
          the linear part of the model. If `None`, will use a FTRL optimizer.
        _joint_linear_weights: If True a single (possibly partitioned) variable
          will be used to store the linear model weights. It's faster, but
          requires all columns are sparse and have the 'sum' combiner.
        dnn_feature_columns: An iterable containing all the feature columns used
          by deep part of the model. All items in the set must be instances of
          classes derived from `FeatureColumn`.
        dnn_optimizer: An instance of `tf.Optimizer` used to apply gradients to
          the deep part of the model. If `None`, will use an Adagrad optimizer.
        dnn_hidden_units: List of hidden units per layer. All layers are fully
          connected.
        dnn_activation_fn: Activation function applied to each layer. If `None`,
          will use `tf.nn.relu`.
        dnn_dropout: When not None, the probability we will drop out
          a given coordinate.
        gradient_clip_norm: A float > 0. If provided, gradients are clipped
          to their global norm with this clipping ratio. See
          tf.clip_by_global_norm for more details.
        enable_centered_bias: A bool. If True, estimator will learn a centered
          bias variable for each class. Rest of the model structure learns the
          residual after centered bias.
        config: RunConfig object to configure the runtime settings.
        feature_engineering_fn: Feature engineering function. Takes features and
          labels which are the output of `input_fn` and returns features and
          labels which will be fed into the model.
        embedding_lr_multipliers: Optional. A dictionary from `EmbeddingColumn` to
          a `float` multiplier. Multiplier will be used to multiply with
          learning rate for the embedding variables.
        input_layer_min_slice_size: Optional. The min slice size of input layer
          partitions. If not provided, will use the default of 64M.
        label_keys: Optional list of strings with size `[n_classes]` defining the
          label vocabulary. Only supported for `n_classes` > 2.
        fix_global_step_increment_bug: If `False`, the estimator needs two fit
          steps to optimize both linear and dnn parts. If `True`, this bug is
          fixed. New users must set this to `True`, but it the default value is
          `False` for backwards compatibility.
  
      Raises:
        ValueError: If `n_classes` < 2.
        ValueError: If both `linear_feature_columns` and `dnn_features_columns`
          are empty at the same time.
      """
      head = head_lib.multi_class_head(
          n_classes=n_classes,
          weight_column_name=weight_column_name,
          enable_centered_bias=enable_centered_bias,
          label_keys=label_keys)
      linear_feature_columns = tuple(linear_feature_columns or [])
      dnn_feature_columns = tuple(dnn_feature_columns or [])
      self._feature_columns = linear_feature_columns + dnn_feature_columns
      if not self._feature_columns:
        raise ValueError("Either linear_feature_columns or dnn_feature_columns "
                         "must be defined.")
  
      # TODO(b/35922130): Replace with `input_layer_partitioner` arg.
      input_layer_partitioner = None
      if input_layer_min_slice_size is not None:
        input_layer_partitioner = (
            partitioned_variables.min_max_variable_partitioner(
                max_partitions=config.num_ps_replicas if config else 0,
                min_slice_size=input_layer_min_slice_size))
  
      super(DNNLinearCombinedClassifier, self).__init__(
          model_fn=_dnn_linear_combined_model_fn,
          model_dir=model_dir,
          config=config,
          params={
              "head": head,
              "linear_feature_columns": linear_feature_columns,
              "linear_optimizer": linear_optimizer,
              "joint_linear_weights": _joint_linear_weights,
              "dnn_feature_columns": dnn_feature_columns,
              "dnn_optimizer": dnn_optimizer,
              "dnn_hidden_units": dnn_hidden_units,
              "dnn_activation_fn": dnn_activation_fn,
              "dnn_dropout": dnn_dropout,
              "gradient_clip_norm": gradient_clip_norm,
              "embedding_lr_multipliers": embedding_lr_multipliers,
              "input_layer_partitioner": input_layer_partitioner,
              "fix_global_step_increment_bug": fix_global_step_increment_bug,
          },
          feature_engineering_fn=feature_engineering_fn)
function_tokens: def __init__ ( self , # _joint_linear_weights pylint: disable=invalid-name model_dir = None , n_classes = 2 , weight_column_name = None , linear_feature_columns = None , linear_optimizer = None , _joint_linear_weights = False , dnn_feature_columns = None , dnn_optimizer = None , dnn_hidden_units = None , dnn_activation_fn = nn . relu , dnn_dropout = None , gradient_clip_norm = None , enable_centered_bias = False , config = None , feature_engineering_fn = None , embedding_lr_multipliers = None , input_layer_min_slice_size = None , label_keys = None , fix_global_step_increment_bug = False ) : head = head_lib . multi_class_head ( n_classes = n_classes , weight_column_name = weight_column_name , enable_centered_bias = enable_centered_bias , label_keys = label_keys ) linear_feature_columns = tuple ( linear_feature_columns or [ ] ) dnn_feature_columns = tuple ( dnn_feature_columns or [ ] ) self . _feature_columns = linear_feature_columns + dnn_feature_columns if not self . _feature_columns : raise ValueError ( "Either linear_feature_columns or dnn_feature_columns " "must be defined." ) # TODO(b/35922130): Replace with `input_layer_partitioner` arg. input_layer_partitioner = None if input_layer_min_slice_size is not None : input_layer_partitioner = ( partitioned_variables . min_max_variable_partitioner ( max_partitions = config . num_ps_replicas if config else 0 , min_slice_size = input_layer_min_slice_size ) ) super ( DNNLinearCombinedClassifier , self ) . __init__ ( model_fn = _dnn_linear_combined_model_fn , model_dir = model_dir , config = config , params = { "head" : head , "linear_feature_columns" : linear_feature_columns , "linear_optimizer" : linear_optimizer , "joint_linear_weights" : _joint_linear_weights , "dnn_feature_columns" : dnn_feature_columns , "dnn_optimizer" : dnn_optimizer , "dnn_hidden_units" : dnn_hidden_units , "dnn_activation_fn" : dnn_activation_fn , "dnn_dropout" : dnn_dropout , "gradient_clip_norm" : gradient_clip_norm , "embedding_lr_multipliers" : embedding_lr_multipliers , "input_layer_partitioner" : input_layer_partitioner , "fix_global_step_increment_bug" : fix_global_step_increment_bug , } , feature_engineering_fn = feature_engineering_fn )