Code Monkey home page Code Monkey logo

Comments (8)

ooooverflow avatar ooooverflow commented on May 26, 2024 27

The bug comes from 270 line in model.py
return [torch.zeros(0), torch.zeros(0), torch.zeros(0, 4)]
Because it does not return the value in GPU device. Change this line like this:
return [torch.zeros([1]).cuda(0), torch.zeros([1]).cuda(0), torch.zeros([1, 4]).cuda(0)]
Do not forget to change torch.zeros(0) to torch.zeros([1]), otherwise there will be another bug about array bound

from pytorch-retinanet.

zbxzc35 avatar zbxzc35 commented on May 26, 2024

I got this error too

from pytorch-retinanet.

Kwongrf avatar Kwongrf commented on May 26, 2024

emmmmm , I got the same error

from pytorch-retinanet.

Kwongrf avatar Kwongrf commented on May 26, 2024

My solution is moving this mAP = csv_eval.evaluate(dataset_val, retinanet) out of for iter_num, data in enumerate(dataloader_train): because calculating mAP should be done after one epoch.

from pytorch-retinanet.

mahaling avatar mahaling commented on May 26, 2024

@Kwongrf the train.py already has that line of code out of the for loop.. I am still getting the same error.. Any idea on what else is wrong?

from pytorch-retinanet.

Kwongrf avatar Kwongrf commented on May 26, 2024

@mahaling Have you modified other parts of train.py... In my case, I tried to change train.py to train on my own data but I made a mistake that I moved that line in the for loop. So it just trained one batch and then it started to evaluate. It seems like yours can train one entire epoch and then get the assertionerror. Maybe you can print the inputs in .../torch/nn/parallel/_functions.py .

from pytorch-retinanet.

mahaling avatar mahaling commented on May 26, 2024

For now I turned off csv_eval, so that I get the data trained for 100 epochs.

from pytorch-retinanet.

Kwongrf avatar Kwongrf commented on May 26, 2024

I get the assertion error again after I have trained for 4 epochs...It seems like there are some faults in csv_eval.py

from pytorch-retinanet.

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.