Combine one-hot encodings?

If I have a few different types of one-hot encoding, what’s the best way of combining them and structure my input?

For example my input data looks like this [name, sex, nationality], eg. [“John”, “male”, “USA”], [“Emily”, “female”, “CAN”]. I need to one-hot encode each of those attributes, so it will then look like [[0,0,0,…1,0,0], [0,1], [0,1,0,…,0]]. My question is - do I have to feed these as three separate input (through Keras functional interface) and merge them, or they can be flattened and taken as one input (eg. [0,0,0,…1,0,0,0,1, 0,1,0,…,0])?

Thanks!

Best might be to leave them as integers and feed each into an embedding, then concat. See lesson 14 for an example.

Thanks! Curious when part 2 will be available to the public? Would love to start learning soon :slight_smile:

@cardinal, it already is: lesson 14 wiki