-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
export_torchscript_with_instances gives Module 'ResNet' has no attribute 'stages_and_names' error #2734
Comments
As https://detectron2.readthedocs.io/en/latest/tutorials/deployment.html#deployment-with-tracing-or-scripting says the feature requires pytorch >= 1.8 |
thanks @ppwwyyxx , the colab instructions for running Dectron2 use pytorch 1.7
do you know if that is just outdated? or do I need to train on 1.7 and have a different notebook for inference running 1.8? |
It is outdated. You can train on 1.8 as well. Using detectron2 with pytorch 1.8 requires building detectron2 from source for now. |
awesome. thank you. |
@ppwwyyxx sorry to bother but have one more question : when looking at the
vs
I am not able to use Visualizer for the If so, is there a workaround where I can use the visualizer on torchscript inference another way? |
Since detectron2/detectron2/modeling/meta_arch/rcnn.py Lines 218 to 219 in 321735b
Also note that for now the scripted model cannot be reloaded later (#2582). |
hi @ppwwyyxx when I tried using
I was wondering if you have any advice or an example of turning the i have my example colab here https://colab.research.google.com/drive/1Z8hWbW7hgTdVUu7kr5qQPwAddtRW251C?usp=sharing (also, I saw your video on dectron2 on youtube, very cool) |
try |
Instructions To Reproduce the 🐛 Bug:
code is here in colab
https://colab.research.google.com/drive/1Z8hWbW7hgTdVUu7kr5qQPwAddtRW251C?usp=sharing
it is the same code as the example colab except with parts of this file https://github.com/facebookresearch/detectron2/blob/master/tests/test_export_torchscript.py#L37 pasted in.
Expected behavior:
I would have expected an outputted torchscript file.
Environment:
colab
The text was updated successfully, but these errors were encountered: