Coder Social home page Coder Social logo

Comments (14)

BangguWu avatar BangguWu commented on July 23, 2024 2

@sacmehta I have the same issues with you, not only validation loss, sometimes the training loss occurs inf of Average Loss, Average Regression Loss, but the classification loss continues to decline, how do you solve it? Thank you

from pytorch-ssd.

qfgaohao avatar qfgaohao commented on July 23, 2024

Hi @sacmehta , are you using your own dataset? The log says the regression loss is Inf. The regression loss here is Smooth L1 Loss. It might be helpful if you check out some input data and intermediate values. Plz also reference the implementation is PyTorch.
https://pytorch.org/docs/stable/nn.html#torch.nn.SmoothL1Loss .

from pytorch-ssd.

sacmehta avatar sacmehta commented on July 23, 2024

I am able to fix the above issue, but now I am getting another issue. Loss is not decreasing. Total loss is fixed at around 12. Any idea what might go wrong?

P.S.: I am using PyTorch weights and not Caffe weights.

from pytorch-ssd.

qfgaohao avatar qfgaohao commented on July 23, 2024

Hi @sacmehta , have you tried a smaller learning rate? Also, try a small subset of the training data to verify the process is right. If the process is all right, you should get a overfitted model with 0 loss.

from pytorch-ssd.

AlanStark avatar AlanStark commented on July 23, 2024

@sacmehta Hi, are you able to share your pretrained PyTorch ImageNet weights? I can try to reproduce it, since I am working on a similar project.

from pytorch-ssd.

sacmehta avatar sacmehta commented on July 23, 2024

@AlanStark If you use PyTorch’s vision api, you should be able to download them by setting the pretrained argument to True.

from pytorch-ssd.

AlanStark avatar AlanStark commented on July 23, 2024

Oh, I see. I was thinking something different.

from pytorch-ssd.

sacmehta avatar sacmehta commented on July 23, 2024

@qfgaohao Do you have any training logs for MobileNet?

from pytorch-ssd.

sosong avatar sosong commented on July 23, 2024

I am able to fix the above issue, but now I am getting another issue. Loss is not decreasing. Total loss is fixed at around 12. Any idea what might go wrong?

P.S.: I am using PyTorch weights and not Caffe weights.

Hi, @sacmehta, how do you fix the inf problem, I am lost in it.

from pytorch-ssd.

sacmehta avatar sacmehta commented on July 23, 2024

Make sure the feature map size used for prior generation is the same as feature maps from CNN used for SSD

from pytorch-ssd.

sosong avatar sosong commented on July 23, 2024

@sacmehta ,thanks a lot.
I have solved the problem, because my training data has very small boxes, so the smoothed l1 loss(log(0)=-inf) become -Inf.

from pytorch-ssd.

sacmehta avatar sacmehta commented on July 23, 2024

Well, I rewrote most of the SSD code from here:

https://github.com/amdegroot/ssd.pytorch

You can find my implementation here and see if it helps:

https://github.com/sacmehta/EdgeNets

from pytorch-ssd.

BangguWu avatar BangguWu commented on July 23, 2024

Thanks for your reply, could you tell me what caused the inf loss? I have modified network structure , So I want to be able to locate errors in my code.

from pytorch-ssd.

sacmehta avatar sacmehta commented on July 23, 2024

I don’t remember it. It’s been a while. You can try to plug-in your model in my codebase and see if that helps.

from pytorch-ssd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.