I'm following one of the TensorFlow's tutorial and I don't understand the purpose of the following code:
numeric_inputs = {name:input for name,input in inputs.items()
if input.dtype==tf.float32}
x = layers.Concatenate()(list(numeric_inputs.values()))
norm = layers.Normalization()
norm.adapt(np.array(titanic[numeric_inputs.keys()]))
all_numeric_inputs = norm(x)
all_numeric_inputs
This is my current attempt:
numeric_inputsis a map of filtered results- I don't understand why use
layers.Concatenate()here. I have read the docs. - I understand that
norm.adapt()need to be called before usingnormas a (starting) layer of theSequentialmodel (from the section above). But why call it withxhere, i.e.norm(x)?
Btw, any advice regarding learning with official tutorials? I found that some of them are still too vague for me.