Skip to content

Cannot converge on image compression task #31

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

Closed
dwgan opened this issue Apr 13, 2025 · 2 comments
Closed

Cannot converge on image compression task #31

dwgan opened this issue Apr 13, 2025 · 2 comments

Comments

@dwgan
Copy link

dwgan commented Apr 13, 2025

Hi,

This work looks great.

I was trying to implement it on image compression task. I use this model as follows, and the input shape is 16, 32, 96, 96.

    def forward(self, x):
        b, c, h, w = x.shape
        x = x.reshape(b, c, -1).permute(0, 2, 1)
        x = self.act1(x)
        x = self.drop1(x)
        x = self.fc1(x)
        x = self.act2(x)
        x = self.drop2(x)
        x = self.fc2(x)
        x = x.permute(0, 2, 1).reshape(b, c, h, w)
        return x

However, my model cannot converge during training.

Training:  75%|██████████████                    | 1171/1563 [02:38<00:53,  7.36it/s, loss=nan]

Could you please give me some advice?

Thanks you very much.

@truong04
Copy link

I face the same problem in NLP, where my model loss does not decrease

@dwgan
Copy link
Author

dwgan commented May 13, 2025

@truong04 I finally found that the problem was caused by using the wrong function. We should use KAT_Group2D to process the image signal, otherwise it cannot converge.

@dwgan dwgan closed this as completed May 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants