keras-team / tf-keras

The TensorFlow-specific implementation of the Keras API, which was the default Keras from 2019 to 2023.
Apache License 2.0
63 stars 28 forks source link

ConvNeXt `classifier_activation=softmax` returns linear layer #319

Closed Frightera closed 1 year ago

Frightera commented 1 year ago

Describe the problem.

Specifying classifier_activation=softmax in ConvNeXt models does not work, instead it returns the model with a linear classifier layer.

Inspecting source code: https://github.com/keras-team/keras/blob/e6784e4302c7b8cd116b74a784f4b78d60e83c26/keras/applications/convnext.py#L524-L526

Definition of Head function: https://github.com/keras-team/keras/blob/e6784e4302c7b8cd116b74a784f4b78d60e83c26/keras/applications/convnext.py#L327-L348

Find the Colab gist here.

If OK I can open a PR and fix it.

innat commented 1 year ago

FYI, all models are moving to keras-cv. https://github.com/keras-team/keras-cv/pull/678

Frightera commented 1 year ago

I see, in keras-cv the implementation is correct. Shall I close this issue?

innat commented 1 year ago

Yes, you may. All the models from application will be moved to kcv completely soon.

innat commented 1 year ago

@Frightera please re-open this ticket.

Shall I close this issue? yes.

I was wrong. This should be discussed and fixed right away.

Frightera commented 1 year ago

@innat Sure, re-opened it. Should be a small and easy fix. I think I can create a PR for that now.

Frightera commented 1 year ago

Closing as PR was merged.

google-ml-butler[bot] commented 1 year ago

Are you satisfied with the resolution of your issue? Yes No