Deprecated TensorFlow methods

I’m currently working on the Linear Regression Health Costs Calculator, and I want to one-hot encode all categorical columns. However, when using the functions “categorical_column_with_vocabulary_list”, “indicator_column” and “numeric_column”, although they work, I got the message that they were deprecated and taking a look their documentation it says that they are not recommended for new code, and that Keras preprocessing layers cover this functionality.

So I took a look at both mentioned there (guides Migrate tf.feature_columns to Keras preprocessing layers  |  TensorFlow Core and จำแนกข้อมูลที่มีโครงสร้างโดยใช้เลเยอร์การประมวลผลล่วงหน้าของ Keras  |  TensorFlow Core), but I didn’t really understand what the equivalent methods could be. Maybe the terminology they use is too advanced for me or the migration for these specific methods isn’t explicit enough, but I would truly want to learn what the “modern” equivalences are.

Thanks in advance

Hello, I´ve the same problem. were you able to solve it?

Yes, I solved it. There are two keras Layers that work, StringLookup (StringLookup layer) and TextVectorization (TextVectorization layer). I don’t remember if I used them both or only one of them, but when you use them together with Keras Sequential model (The Sequential class) I felt they were easier to use than the deprecated methods.

Take a look at those and let me know if you have any doubts and I’ll try to help. I think you can see my project in my FCC’s profile under the certifications option, or in a while I can upload the code to my github and send you the link if you want.

Okay, I will take a look at it. Thank you.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.