Giter Club home page Giter Club logo

Comments (9)

ujsyehao avatar ujsyehao commented on July 27, 2024 1

you can refer to https://github.com/ujsyehao/yolov3-multigpu

from pytorch-yolov3.

eriklindernoren avatar eriklindernoren commented on July 27, 2024

Support for multigpu is on the todo-list.

from pytorch-yolov3.

weiaicunzai avatar weiaicunzai commented on July 27, 2024

@eriklindernoren Sorry to ask, do we have support for multigpu now? Thanks

from pytorch-yolov3.

LeoCHANGcn avatar LeoCHANGcn commented on July 27, 2024

just add

model =  torch.nn.DataParallel(model)

and run again.

from pytorch-yolov3.

Lausannen avatar Lausannen commented on July 27, 2024

@LeoCHANGcn It seems that multi-gpus version can not accelerate the training. I compared single GPU and multi gpus, one epoch costed similiar time. During your test, did you have this problem?

from pytorch-yolov3.

dtmoodie avatar dtmoodie commented on July 27, 2024

I have also noticed the same issue.

from pytorch-yolov3.

tensmyo avatar tensmyo commented on July 27, 2024

@LeoCHANGcn
I added the following at Initiate model,

@train.py
model = Darknet(opt.model_config_path)
model =  torch.nn.DataParallel(model)

but new error on loss.backward()
grad can be implicitly created only for scalar outputs
does loss function should be change too?

from pytorch-yolov3.

Robmosh91 avatar Robmosh91 commented on July 27, 2024

Hi,
this issue is coming up since loss.backward()is equivalent to loss.backward(torch.Tensor([1])).
When using DataParallel this is invalid. Instead you should use either
loss.backward(torch.Tensor([1, 1])) or loss.sum().backward().
The behaviour of both should be the exact same.

from pytorch-yolov3.

stevenXS avatar stevenXS commented on July 27, 2024

@Robmosh91 Hi,when I used your suggestion,thefollowing issue occurred:'DataParallel' object has no attribute 'losses'?

from pytorch-yolov3.

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.