Hi, in TF1, we can specify the columns to be used by both wide and deep parts of the algorithm using the specified parameters:
combined_estimator = tf.estimator.DNNLinearCombinedEstimator(
head=tf.estimator.BinaryClassHead(),
# Wide settings
linear_feature_columns=feature_columns,
linear_optimizer=optimizer,
# Deep settings
dnn_feature_columns=feature_columns,
dnn_hidden_units=[128],
dnn_optimizer=optimizer)
In TF2, tf.estimator.DNNLinearCombinedEstimator
was replaced by tf.keras.experimental.WideDeepModel
, which only accepts 2 arguments: linear part of the model and deep part of the model, without the ability to specify what kind of features these different parts should use.
combined_model = tf.keras.experimental.WideDeepModel(linear_model, dnn_model)
How do I indicate that only a subset of original features (and some derived ones) should be used by wide part, and the rest of the features (including some derived/preprocessed ones) by the deep part?
Thanks