Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Commit 5507ba0

Browse files
committed
Fix some punctuation.
1 parent 4d8e61e commit 5507ba0

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

rfcs/20191212-keras-categorical-inputs.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Note the hashed output from KPL will be different than the hashed output from fe
5555
This feature column is merely for having identical inputs and outputs except mapping out-of-range value into `default_value`, thus can easily be done at data cleaning stage,
5656
not be part of feature engineering, and hence dropped in this proposal.
5757

58-
3. Replacing `tf.feature_column.categorical_column_with_vocabulary_file` and `tf.feature_column.categorical_column_with_vocabulary_list` with `StringLookup` or `IntegerLookup`
58+
3. Replacing `tf.feature_column.categorical_column_with_vocabulary_file` and `tf.feature_column.categorical_column_with_vocabulary_list` with `StringLookup` or `IntegerLookup`.
5959
for string inputs,
6060
from
6161
```python
@@ -86,7 +86,7 @@ any values other than `default_value=-1`.
8686
Note the out-of-range values for `StringLookup` is prepended, i.e., [0,..., num_oov_tokens) for out-of-range values, whereas for `categorical_colulmn_with_vocabulary_file` is
8787
appended, i.e., [vocabulary_size, vocabulary_size + num_oov_tokens) for out-of-range values. The former can give you more flexibility when reloading and adding vocab.
8888

89-
for integer inputs,
89+
For integer inputs,
9090
from
9191
```python
9292
tf.feature_column.categorical_column_with_vocabulary_file(key, vocabulary_file, vocabulary_size, tf.dtypes.int64, default_value, num_oov_buckets)
@@ -180,7 +180,7 @@ weighted_output = tf.keras.layers.experimental.preprocessing.CategoryEncoding(
180180
max_tokens=categorical_column.num_buckets)(lookup_output, weight_input)
181181
```
182182

183-
8. Replacing `tf.feature_column.shared_embeddings` with a single `tf.keras.layers.Embedding`
183+
8. Replacing `tf.feature_column.shared_embeddings` with a single `tf.keras.layers.Embedding`.
184184
Similar to 5, but with multiple categorical inputs:
185185
from
186186
```python
@@ -197,17 +197,17 @@ embedded_watched_video_input = embed_layer(watched_video_input)
197197
embedded_impression_video_input = embed_layer(impression_video_input)
198198
```
199199

200-
9. Replacing `tf.estimator.LinearXXX` with `CategoryEncoding` and `tf.keras.experimental.LinearModel`
200+
9. Replacing `tf.estimator.LinearXXX` with `CategoryEncoding` and `tf.keras.experimental.LinearModel`.
201201
LinearClassifier or LinearRegressor treats categorical columns by multi-hot, this can be replaced by encoding layer and Keras linear model, see Workflow 2 for details.
202202

203-
10. Replacing `tf.feature_column.numeric_column` and `tf.feature_column.sequence_numeric_column` with `tf.keras.Input` and `Normalization`
203+
10. Replacing `tf.feature_column.numeric_column` and `tf.feature_column.sequence_numeric_column` with `tf.keras.Input` and `Normalization`.
204204
`tf.keras.layers.experimental.preprocessing.Normalization` with `set_weights` on mean and standard deviation.
205205

206-
11. Replacing `tf.feature_column.sequence_categorical_xxx`
206+
11. Replacing `tf.feature_column.sequence_categorical_xxx`.
207207
Replacing `tf.feature_column.sequence_categorical_xxx` is similar to `tf.feature_column.categorical_xxx` except `tf.keras.Input` should take time dimension into
208208
`input_shape` as well.
209209

210-
12. Replacing `tf.feature_column.bucketized_column` with `Discretization`
210+
12. Replacing `tf.feature_column.bucketized_column` with `Discretization`.
211211
from
212212
```python
213213
source_column = tf.feature_column.numeric_column(key)

0 commit comments

Comments
 (0)