Skip to content

exporting the model to onnx #10159

@AhmedEmadEldinHussin

Description

@AhmedEmadEldinHussin

Search before asking

  • I have searched the YOLOv5 issues and found no similar bug report.

YOLOv5 Component

No response

Bug

Traceback (most recent call last):
File "/home/ahmed/yolov5/export.py", line 652, in
main(opt)
File "/home/ahmed/yolov5/export.py", line 647, in main
run(**vars(opt))
File "/home/ahmed/anaconda3/envs/yolo/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/home/ahmed/yolov5/export.py", line 528, in run
model = attempt_load(weights, device=device, inplace=True, fuse=True) # load FP32 model
File "/home/ahmed/yolov5/models/experimental.py", line 79, in attempt_load
ckpt = torch.load(attempt_download(w), map_location='cpu') # load
File "/home/ahmed/anaconda3/envs/yolo/lib/python3.9/site-packages/torch/serialization.py", line 771, in load
with _open_file_like(f, 'rb') as opened_file:
File "/home/ahmed/anaconda3/envs/yolo/lib/python3.9/site-packages/torch/serialization.py", line 270, in _open_file_like
return _open_file(name_or_buffer, mode)
File "/home/ahmed/anaconda3/envs/yolo/lib/python3.9/site-packages/torch/serialization.py", line 251, in init
super(_open_file, self).init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'onnx'

Environment

No response

Minimal Reproducible Example

No response

Additional

while exporting the model to onnx
i found this issue
FileNotFoundError: [Errno 2] No such file or directory: 'onnx'

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions