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

torch 1.4 error - RuntimeError: Failed to register operator torchvision::_new_empty_tensor_op. #148

Closed
ChargedMonk opened this issue Jun 20, 2020 · 6 comments
Labels
bug Something isn't working Stale

Comments

@ChargedMonk
Copy link

The latest commit in the requirements.txt stating support for torch 1.4 gives the following error when detect.py is run

File "detect.py", line 3, in <module>
   from utils.datasets import *
 File "/content/drive/My Drive/SocialDistancing/yolov5/utils/datasets.py", line 17, in <module>
   from utils.utils import xyxy2xywh, xywh2xyxy
 File "/content/drive/My Drive/SocialDistancing/yolov5/utils/utils.py", line 18, in <module>
   import torchvision
 File "/usr/local/lib/python3.6/dist-packages/torchvision/__init__.py", line 3, in <module>
   from torchvision import models
 File "/usr/local/lib/python3.6/dist-packages/torchvision/models/__init__.py", line 12, in <module>
   from . import detection
 File "/usr/local/lib/python3.6/dist-packages/torchvision/models/detection/__init__.py", line 1, in <module>
   from .faster_rcnn import *
 File "/usr/local/lib/python3.6/dist-packages/torchvision/models/detection/faster_rcnn.py", line 7, in <module>
   from torchvision.ops import misc as misc_nn_ops
 File "/usr/local/lib/python3.6/dist-packages/torchvision/ops/__init__.py", line 13, in <module>
   _register_custom_op()
 File "/usr/local/lib/python3.6/dist-packages/torchvision/ops/_register_onnx_ops.py", line 51, in _register_custom_op
   register_custom_op_symbolic('torchvision::_new_empty_tensor_op', new_empty_tensor_op, _onnx_opset_version)
 File "/usr/local/lib/python3.6/dist-packages/torch/onnx/__init__.py", line 200, in register_custom_op_symbolic
   return utils.register_custom_op_symbolic(symbolic_name, symbolic_fn, opset_version)
 File "/usr/local/lib/python3.6/dist-packages/torch/onnx/utils.py", line 793, in register_custom_op_symbolic
   .format(symbolic_name))
RuntimeError: Failed to register operator torchvision::_new_empty_tensor_op. The symbolic name must match the format Domain::Name, and sould start with a letter and contain only                            alphanumerical charactersrwise it is non-actionable, and we can not help you:
@ChargedMonk ChargedMonk added the bug Something isn't working label Jun 20, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Jun 20, 2020

Hello @ChargedMonk, thank you for your interest in our work! Please visit our Custom Training Tutorial to get started, and see our Jupyter Notebook Open In Colab, Docker Image, and Google Cloud Quickstart Guide for example environments.

If this is a bug report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.

If this is a custom model or data training question, please note that Ultralytics does not provide free personal support. As a leader in vision ML and AI, we do offer professional consulting, from simple expert advice up to delivery of fully customized, end-to-end production solutions for our clients, such as:

  • Cloud-based AI systems operating on hundreds of HD video streams in realtime.
  • Edge AI integrated into custom iOS and Android apps for realtime 30 FPS video inference.
  • Custom data training, hyperparameter evolution, and model exportation to any destination.

For more information please visit https://www.ultralytics.com.

@ChargedMonk ChargedMonk changed the title It is not supported for torch 1.4 torch 1.4 error - RuntimeError: Failed to register operator torchvision::_new_empty_tensor_op. Jun 20, 2020
@glenn-jocher
Copy link
Member

@ChargedMonk yes I see this also. We pushed a commit today to allow torch>=1.4
24dd150

But perhaps this was a bad decision. I will revert this to the original torch>=1.5 requirement.

@glenn-jocher
Copy link
Member

@Lornatang I think the recent PR #143 may not work correctly. See @ChargedMonk's issue above.

@Lornatang
Copy link
Contributor

@glenn-jocher I tried it on this machine and found no errors.
I hope you keep that comment, because this problem is indeed encountered by many people, as for @ChargedMonk the error encountered, I may need some time to reproduce his error and improve it.

@Lornatang
Copy link
Contributor

Lornatang commented Jun 20, 2020

@glenn-jocher @ChargedMonk This failed It is because of the mismatch of torchvision, I will add a PR to ensure that the Torch and Torchvision versions correspond. it's my mistake.

More details see: pytorch/vision#1827 and pytorch/vision#1827 (comment)

@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants