from tensorflow.contrib.learn.python.learn.estimators import composable_model

        model_dir=model_dir, config=config)

    num_ps_replicas = config.num_ps_replicas if config else 0

    self._linear_model = composable_model.LinearComposableModel(
        num_label_columns=target_column.num_label_columns,
        optimizer=linear_optimizer,
        gradient_clip_norm=gradient_clip_norm,
        num_ps_replicas=num_ps_replicas)

    self._dnn_model = composable_model.DNNComposableModel(
        num_label_columns=target_column.num_label_columns,
        hidden_units=dnn_hidden_units,
        optimizer=dnn_optimizer,
        activation_fn=dnn_activation_fn,
        dropout=dnn_dropout,
        gradient_clip_norm=gradient_clip_norm,
        num_ps_replicas=num_ps_replicas) if dnn_hidden_units else None

    self._linear_feature_columns = linear_feature_columns
