How to handle different input sizes of an NN when One-Hot-Encoding a categorical input?
A solution is set a maximum length for the number of categories and fill the future categories in order to see them in your data. Hence, that part of the categories which are not seen in the sampled data would be set to zero.