You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "/opt/conda/envs/alpha_env/lib/python3.8/site-packages/torch/jit/_recursive.py", line 368, in create_methods_and_properties_from_stubs
concrete_type._create_methods_and_properties(property_defs, property_rcbs, method_defs, method_rcbs, method_defaults)
RuntimeError:
Module 'ResNet' has no attribute 'stages_and_names' (This attribute exists on the Python module, but we failed to convert Python type: 'list' to a TorchScript type. Could not infer type of list element: Cannot infer concrete type of torch.nn.Module. Its type was inferred; try adding a type annotation for the attribute.):
File "/root/code/modeling/backbone/res2net.py", line 632
if "stem" in self._out_features:
outputs["stem"] = x
for stage, name in self.stages_and_names:
~~~~~~~~~~~~~~~~~~~~~ <--- HERE
x = stage(x)
if name in self._out_features:
RuntimeError:
Module 'ResNet' has no attribute 'stages' (This attribute exists on the Python module, but we failed to convert Python type: 'list' to a TorchScript type. Could not infer type of list element: Cannot infer concrete type of torch.nn.Module. Its type was inferred; try adding a type annotation for the attribute.):
File "/usr/local/detectron2/detectron2/modeling/backbone/resnet.py", line 448
if "stem" in self._out_features:
outputs["stem"] = x
for name, stage in zip(self.stage_names, self.stages):
~~~~~~~~~~~ <--- HERE
x = stage(x)
if name in self._out_features:
Instructions To Reproduce the 🐛 Bug:
ref #2734 ,
https://detectron2.readthedocs.io/en/latest/tutorials/deployment.html#deployment-with-tracing-or-scripting not work !!!
Environment:
torch 1.10.2+cu113
detectron2 0.6
The text was updated successfully, but these errors were encountered: