Check OOV token

[CODE SOLUTION REMOVED FROM MODERATOR]
Issue with Label Encoding Vocabulary in TensorFlow

I’m facing an issue with encoding labels using tf.keras.layers.StringLookup. The expected vocabulary is ['sport', 'business', 'politics', 'tech', 'entertainment'], but my output includes [None, 'sport', 'business', 'politics', 'tech', 'entertainment']. It seems that an extra None value is being added to the vocabulary. How can I ensure the vocabulary only contains the intended labels without the None?

u can do it like this tf.keras.layers.StringLookup(vocabulary=None, mask_token=None, num_oov_indices=0) I hope this helps

u can do u can do it like this tf.keras.layers.StringLookup(vocabulary=None, mask_token=None, num_oov_indices=0) I hope this helps

@Neo93

you do not require vocabulary and mask_token to be included to that function, only including num_oov_indices=0 is enough

Also this is an old issue and has been address by the mentor as well in his other post he had created.

Regards
DP