TensorFlow in version <=2.4 is slow when tf.keras.layers.Embedding is used

Using the embedding layer can significantly slow down backward propagation.

Issue description

Using tf.keras.layers.Embedding can significantly slow down backwards propagation (up to 20 times). This is caused by a bug which is not yet fixed in TensorFlow upstream.

Affected packages

Severity

Issue fix

TensorFlow upstream does not have a fix yet. If the Embedding layer is important to you from performace point of view, switch to alternative libraries, such as PyTorch.

Pipeline units

Recommendation types

See this document that describes recommendation types listed.

Issues associated