Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Segformer test for num_classes 1 with softmax #2401

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sampathweb
Copy link
Collaborator

@sampathweb sampathweb commented Mar 21, 2024

Keras has recently started to emit warnings when softmax has only one class. This PR fixes it by having more than one class at the output. Or we can re-compile the model with BinaryCrossEntropy if we want num_classes to 1.

@sampathweb sampathweb added the kokoro:force-run Runs Tests on GPU label Mar 21, 2024
@kokoro-team kokoro-team removed the kokoro:force-run Runs Tests on GPU label Mar 21, 2024
@sampathweb sampathweb added the kokoro:force-run Runs Tests on GPU label Mar 22, 2024
@kokoro-team kokoro-team removed the kokoro:force-run Runs Tests on GPU label Mar 22, 2024
@innat
Copy link
Contributor

innat commented Mar 26, 2024

@sampathweb
You're compiling segformer model with BinaryCrossentropy() but the last layer activations is hard coded to softmax. An activation params should be introduced here.

@innat innat mentioned this pull request Mar 26, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants