tensorflow/models · error · ValueError

The {name}_input_combiner layer must be specified if the {na

Error message

The {name}_input_combiner layer must be specified if the {name}_feature_encoder is not None. Consider using tf_keras.layers.Concatenate() as a combiner layer.

What it means

Error "The {name}_input_combiner layer must be specified if the {name}_feature_encoder is not None. Consider using tf_keras.layers.Concatenate() as a combiner layer." thrown in tensorflow/models.

Source

Thrown at official/recommendation/uplift/layers/uplift_networks/two_tower_uplift_network.py:115

    self._control_input_combiner = control_input_combiner
    self._treatment_feature_encoder = treatment_feature_encoder
    self._treatment_input_combiner = treatment_input_combiner

    self._validate_encoder_combiner_layers(
        control_feature_encoder, control_input_combiner, "control"
    )
    self._validate_encoder_combiner_layers(
        treatment_feature_encoder, treatment_input_combiner, "treatment"
    )

  def _validate_encoder_combiner_layers(
      self,
      encoder: tf_keras.layer.Layer,
      combiner: tf_keras.layer.Layer,
      name: str,
  ) -> None:
    if encoder is not None and combiner is None:
      raise ValueError(
          f"The {name}_input_combiner layer must be specified if the"
          f" {name}_feature_encoder is not None. Consider using"
          " tf_keras.layers.Concatenate() as a combiner layer."
      )
    if encoder is None and combiner is not None:
      raise ValueError(
          f"The {name}_feature_encoder layer must be specified if the"
          f" {name}_input_combiner is not None."
      )

  def call(
      self,
      inputs: types.DictOfTensors,
      training: bool | None = None,
      mask: tf.Tensor | None = None,
  ) -> types.TwoTowerNetworkOutputs:
    """Computes control and treatment logits.

View on GitHub (pinned to e006f5f0d5)

When it happens

Trigger: Thrown at official/recommendation/uplift/layers/uplift_networks/two_tower_uplift_network.py:115 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tensorflow/models@e006f5f0d5 (2026-08-24). Data as JSON: /api/errors/42e1a4ea43b38745. Report an issue: GitHub.