-
-
Notifications
You must be signed in to change notification settings - Fork 16.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I changed backbone and head of yolov5s,train process done,error happened in detect process. #658
Comments
@Polary-L if your model trains correctly then it will also operate correctly with test.py and detect.py. Your yaml model definition is not correct though, it has redundant nn.Conv2d() ops which we eliminated in v2.0. You should start a clean slate: clone current repo and go from there. |
the
this problem is same as this one :[(https://github.com/ultralytics/yolov3/issues/883)] |
|
|
@zhepherd if you are running into difficulties with fusing custom models, I would recommend you simply convert the fuse() method into a pass through entity: Lines 160 to 170 in 702c4fa
For example: def fuse(self): # fuse model Conv2d() + BatchNorm2d() layers
print('Skipping fuse... ')
# print('Fusing layers... ')
# for m in self.model.modules():
# if type(m) is Conv and hasattr(Conv, 'bn'):
# m._non_persistent_buffers_set = set() # pytorch 1.6.0 compatability
# m.conv = fuse_conv_and_bn(m.conv, m.bn) # update conv
# delattr(m, 'bn') # remove batchnorm
# m.forward = m.fuseforward # update forward
# self.info()
return self |
I soved it in the same way and it works. |
@glenn-jocher |
reduce image size, increase batch size, use faster hardware. |
please where you define 'SLayer'? |
❔Question
here is the changed yolov5s.yaml
and train process is done with
Additional context
then I used the best.pt to detect ,error happened with
"RuntimeError: shape '[16, 16, 5, 5]' is invalid for input of size 400"
I saw this error in your yolov3 version,and you gave suggestions in https://github.com/ultralytics/yolov3/issues/1395
how to fix this bug in yolov5 whose model has changed?
another question is my
test_batch0_pred.jpg
didn't prediction anything.I use different sizes images to train the new network,is that reason caused the error?The text was updated successfully, but these errors were encountered: