Mark input types

parent 5d3a122d
...@@ -23,3 +23,12 @@ def get_normalization_layer(name, dataset): ...@@ -23,3 +23,12 @@ def get_normalization_layer(name, dataset):
return normalizer return normalizer
categorical_cols = ['Date', 'Time', 'Weather', 'Parking']
for header in categorical_cols:
categorical_col = tf.keras.Input(shape=(1,), name=header, dtype='string')
encoding_layer = get_category_encoding_layer(header, train_ds, dtype='string',
max_tokens=5)
encoded_categorical_col = encoding_layer(categorical_col)
all_inputs.append(categorical_col)
encoded_features.append(encoded_categorical_col)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment