GithubHelp home page GithubHelp logo

can you help me to solve it ?WARNING: non-finite loss, ending training tensor([ nan, 0.22070, 0.00000, nan], device='cuda:0') about yolov3-channel-and-layer-pruning HOT 5 OPEN

tanluren avatar tanluren commented on July 30, 2024
can you help me to solve it ?WARNING: non-finite loss, ending training tensor([ nan, 0.22070, 0.00000, nan], device='cuda:0')

from yolov3-channel-and-layer-pruning.

Comments (5)

tanluren avatar tanluren commented on July 30, 2024

Hi, it looks like gradient explosion, did you load pretrained model? did you prepare your data according to https://github.com/ultralytics/yolov3/wiki/Train-Custom-Data ?could you show the command you used to train?

from yolov3-channel-and-layer-pruning.

shenghsiaowong avatar shenghsiaowong commented on July 30, 2024

Hi, it looks like gradient explosion, did you load pretrained model? did you prepare your data according to https://github.com/ultralytics/yolov3/wiki/Train-Custom-Data ?could you show the command you used to train?

this is my train command ,python train.py --cfg cfg/yolov3-1cls.cfg --data data/voc.data --weights darknet53.conv.74

from yolov3-channel-and-layer-pruning.

tanluren avatar tanluren commented on July 30, 2024

you may try to lower the lr and use yolov3.weights as pretrained model

from yolov3-channel-and-layer-pruning.

chouxianyu avatar chouxianyu commented on July 30, 2024

@shenghsiaowong
Are you using focal loss?
If you are using it,you may try removing the focal loss.

A few days ago,i used focal loss and found an error(obj_loss is nan,other loss,other losses are occasionally nan) .
Accoarding to issue842, i have tried many ways:lower the lr,remove the tiny object ,lower the weight of
losses in the hyp and so on,but the error still exists.
Finally I removed focal loss on the obj_loss and the nan error didn't appear anymore.
So you may try removing the focal loss.For example,if your obj_loss is nan,just remove the focal loss on obj_loss).

from yolov3-channel-and-layer-pruning.

xiaozhangya avatar xiaozhangya commented on July 30, 2024

you may try to lower the lr and use yolov3.weights as pretrained model
Hello, what if you change the network slightly and cannot use the pre-trained network? How can I start training a model from scratch? thank you for your reply!

from yolov3-channel-and-layer-pruning.

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.