I saw in many tutorials in the Tensorflow 2 documentation, that they use two different functions to deal with categorical features: