Hey guys,
I am trying to convert a project from Pytorch code to TensorFlow, and while going through the nn.Embedding layer there was this argument called padding_idx and wherever you have an item equal to padding_idx, the output of the embedding layer at that index will be all zeros.
But coming to TensorFlow’s Embedding layer there isn’t an argument close to padding_idx. Is there any way to leverage this functionality in TensorFlow?

Screenshot 2021-10-10 at 4.41.50 PM743×492 69.9 KB

Best,
Ashik.