Changing the dim-parameter results in an error.
When running the provided example for ConformerBlock, it is not possible to change the encoder dimension.
Setting dim=256 yields:
tensorflow.python.framework.errors_impl.InvalidArgumentError: Exception encountered when calling layer "conformer_block" (type ConformerBlock). Incompatible shapes: [1,512,256] vs. [1,1024,256] [Op:AddV2] Call arguments received: • inputs=tf.Tensor(shape=(1, 1024, 256), dtype=float32) • mask=None
Setting dim=144 yields:
tensorflow.python.framework.errors_impl.InvalidArgumentError: Exception encountered when calling layer "conformer_block" (type ConformerBlock). Incompatible shapes: [1,288,144] vs. [1,1024,144] [Op:AddV2] Call arguments received: • inputs=tf.Tensor(shape=(1, 1024, 144), dtype=float32) • mask=None
The example is not modified in any other way except for the parameter and the last dimension of the random.normal input data. I am using tensorflow version 2.8.0.
Seeing the 288 (=2x144) in the sequence dimension I assume that the axes are getting mixed up somewhere in the graph.
I had the same error i dont really see how to use this library if you can't change the input shape!!!