keras-io icon indicating copy to clipboard operation
keras-io copied to clipboard

Inconsistency when running the keras-io/examples/timeseries/timeseries_classification_transformer.py

Open condor-cp opened this issue 6 months ago • 2 comments

Running the example shows inconsistency in number of parameters and model performance compared to what is displayed.

It seems that the global average pooling should take data_format to "channel_first" to reach the same number of parameters and the accuracy performance consistent with the displayed console log (tried with google colab).

https://github.com/keras-team/keras-io/blob/2ac94c4c4da54c1f7c80fea7f18832fd54c6be28/examples/timeseries/timeseries_classification_transformer.py#L115

But then there is no pooling, just removing the feature dimension => Maybe another layer should be used.

condor-cp avatar Aug 13 '24 15:08 condor-cp