Skip to content
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

about run error,TypeError: __init__() takes 2 positional arguments but 3 were given #6

Open
zhanghongyong123456 opened this issue Aug 5, 2021 · 3 comments

Comments

@zhanghongyong123456
Copy link

image

@HW140701
Copy link

You can change from detector.yolo.darknet import Darknet in darknet2onnx.py to detector.yolo.darknet_trt import Darknet, and it will work.

@zhanghongyong123456
Copy link
Author

You can change from detector.yolo.darknet import Darknet in darknet2onnx.py to detector.yolo.darknet_trt import Darknet, and it will work.
Thank you for your reply. I'll try it on

@lalita934
Copy link

ARNING ⚠️ no model scale passed. Assuming scale='n'.

TypeError Traceback (most recent call last)
in <cell line: 4>()
2
3 # Load a model
----> 4 model = YOLO('ECA.yaml') # load a custom model
5
6

4 frames
/content/Google_Drive/MyDrive/yolov11/ultralytics-main/ultralytics/nn/tasks.py in parse_model(d, ch, verbose)
1062 c2 = ch[f]
1063
-> 1064 m_ = nn.Sequential(*(m(*args) for _ in range(n))) if n > 1 else m(*args) # module
1065 t = str(m)[8:-2].replace("main.", "") # module type
1066 m.np = sum(x.numel() for x in m_.parameters()) # number params

TypeError: ECAAttention.init() takes from 2 to 3 positional arguments but 4 were given

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants