From 3b0139f50f76f6beccb6fc2d6cf3804738df1fe7 Mon Sep 17 00:00:00 2001 From: Dustin Neighly Date: Sat, 6 Apr 2019 12:49:11 -0700 Subject: [PATCH 1/2] Updated docs formatting tf.feature_column.categorical_column_with_vocabulary_file defined in python/feature_column/feature_column_v2.py. --- tensorflow/python/feature_column/feature_column_v2.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tensorflow/python/feature_column/feature_column_v2.py b/tensorflow/python/feature_column/feature_column_v2.py index 6553f496541..3a112119dc6 100644 --- a/tensorflow/python/feature_column/feature_column_v2.py +++ b/tensorflow/python/feature_column/feature_column_v2.py @@ -1589,7 +1589,7 @@ def categorical_column_with_vocabulary_file_v2(key, and `''` for string, which will be dropped by this feature column. Example with `num_oov_buckets`: - File '/us/states.txt' contains 50 lines, each with a 2-character U.S. state + File `'/us/states.txt'` contains 50 lines, each with a 2-character U.S. state abbreviation. All inputs with values in that file are assigned an ID 0-49, corresponding to its line number. All other values are hashed and assigned an ID 50-54. @@ -1604,8 +1604,8 @@ def categorical_column_with_vocabulary_file_v2(key, ``` Example with `default_value`: - File '/us/states.txt' contains 51 lines - the first line is 'XX', and the - other 50 each have a 2-character U.S. state abbreviation. Both a literal 'XX' + File `'/us/states.txt'` contains 51 lines - the first line is `'XX'`, and the + other 50 each have a 2-character U.S. state abbreviation. Both a literal `'XX'` in input, and other values missing from the file, will be assigned ID 0. All others are assigned the corresponding line number 1-50. From 89446363a3703068dde42d7fb404fe10825f2fd2 Mon Sep 17 00:00:00 2001 From: Dustin Neighly Date: Wed, 10 Apr 2019 16:36:44 -0700 Subject: [PATCH 2/2] Update feature_column_v2.py Fixed line lengths --- tensorflow/python/feature_column/feature_column_v2.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tensorflow/python/feature_column/feature_column_v2.py b/tensorflow/python/feature_column/feature_column_v2.py index 3a112119dc6..313f6d6a8ff 100644 --- a/tensorflow/python/feature_column/feature_column_v2.py +++ b/tensorflow/python/feature_column/feature_column_v2.py @@ -1605,9 +1605,9 @@ def categorical_column_with_vocabulary_file_v2(key, Example with `default_value`: File `'/us/states.txt'` contains 51 lines - the first line is `'XX'`, and the - other 50 each have a 2-character U.S. state abbreviation. Both a literal `'XX'` - in input, and other values missing from the file, will be assigned ID 0. All - others are assigned the corresponding line number 1-50. + other 50 each have a 2-character U.S. state abbreviation. Both a literal + `'XX'` in input, and other values missing from the file, will be assigned + ID 0. All others are assigned the corresponding line number 1-50. ```python states = categorical_column_with_vocabulary_file(