File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 3131import tempfile
3232import tensorflow .compat .v1 as tf
3333from tensorflow .compat .v1 import estimator as tf_estimator
34- import tensorflow_hub as hub
34+ from tensorflow . python . feature_column import feature_column_v2 # pylint: disable=g-deprecated-tf-checker
3535import tensorflow_model_analysis as tfma
3636from tensorflow_model_analysis .addons .fairness .post_export_metrics import fairness_indicators # pylint: disable=unused-import
3737
@@ -71,8 +71,9 @@ def parse_function(serialized):
7171 filenames = [train_tf_file ]).map (parse_function ).batch (512 )
7272 return train_dataset
7373
74- text_embedding_column = hub .text_embedding_column (
75- key = text_feature , module_spec = module_spec )
74+ text_embedding_column = feature_column_v2 .text_embedding_column (
75+ key = text_feature , module_spec = module_spec
76+ )
7677
7778 classifier = tf_estimator .DNNClassifier (
7879 hidden_units = [500 , 100 ],
You can’t perform that action at this time.
0 commit comments