Inference with TimeDistributed(Dense(1, activation="sigmoid")) in Keras 3 is a lot slower than in Keras 2 (tf.keras) Profiling shows TimeDistributed is the bottleneck.
Model: Conv1D → LSTM → Conv1DTranspose → TimeDistributed(Dense(1)).
input shape (none,none,1)
Tried: run_eagerly=False, tf.function, TensorFlow/JAX/PyTorch backends—no significant improvement.
Question
Is there a solution to fix the TimeDistributed slowdown in Keras 3 without changing the model architecture? Currently using tf_keras as a workaround.
Details
Keras Version: 3.9.0