Coder Social home page Coder Social logo

Comments (5)

larsoncs avatar larsoncs commented on May 14, 2024 1

@WongKinYiu ,"把SyncBatchNorm轉回BatchNorm可以解決", but the common.py use BatchNorm2d, not use SyncBatchNorm,how to convert SyncBatchNorm to BatchNorm? thx

from scaledyolov4.

larsoncs avatar larsoncs commented on May 14, 2024 1

i use cpu to run test.py ,get this error:

Traceback (most recent call last):
File "test.py", line 281, in
opt.verbose)
File "test.py", line 99, in test
inf_out, train_out = model(img, augment=augment) # inference and training outputs
File "/D/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/data/home//odetect/yolov4/models/yolo.py", line 109, in forward
return self.forward_once(x, profile) # single-scale inference, train
File "/data/home//odetect/yolov4/models/yolo.py", line 129, in forward_once
x = m(x) # run
File "/D/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/data/home//odetect/yolov4/models/common.py", line 66, in forward
return self.cv4(self.act(self.bn(torch.cat((y1, y2), dim=1))))
File "/D/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/D/lib/python3.7/site-packages/torch/nn/modules/batchnorm.py", line 477, in forward
raise ValueError('SyncBatchNorm expected input tensor to be on GPU')
ValueError: SyncBatchNorm expected input tensor to be on GPU

from scaledyolov4.

WongKinYiu avatar WongKinYiu commented on May 14, 2024

把SyncBatchNorm轉回BatchNorm可以解決

from scaledyolov4.

lx120 avatar lx120 commented on May 14, 2024

I am confused : How to convert SyncBatchNorm to BatchNorm. Could you please tie codes, THKs

from scaledyolov4.

Actor12 avatar Actor12 commented on May 14, 2024

I am confused : How to convert SyncBatchNorm to BatchNorm. Could you please tie codes, THKs

I changed the pytorch version and solved it, torch==1.3 && torchvision==0.4.2

from scaledyolov4.

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.