Closed jasonrute closed 1 year ago
This simple PR removes the need for valid_indices, which was already superfluous since it was always equal to range(n) where n was the length of the embedding tensor, and hence tf.gather(emb_matrix, self._valid_indices) was a no-op.
range(n)
n
tf.gather(emb_matrix, self._valid_indices)
The tests all pass.
This simple PR removes the need for valid_indices, which was already superfluous since it was always equal to
range(n)
wheren
was the length of the embedding tensor, and hencetf.gather(emb_matrix, self._valid_indices)
was a no-op.The tests all pass.