top of page

Deep Learning Tips how to use to_categorical for one hot encoding in TensorFlow

Updated: Jul 24, 2023

TensorFlow requires us to pay attention to how we put out categorical classification target into our model. The to_categorical function in TensorFlow works in a similar way to the get_dummies function in Pandas. And on a DataFrame can be used as a substitute. Hot one encoding with TensorFlow requires use to give integers as our class. If we use an sklearn preprocessing LabelEncoder and can then return these integers back into the original classes.











Follow Data Science Teacher Brandyn





dataGroups:












37 views0 comments

Recent Posts

See All
bottom of page