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

script error #4

Open
wyh163 opened this issue Feb 25, 2021 · 0 comments
Open

script error #4

wyh163 opened this issue Feb 25, 2021 · 0 comments

Comments

@wyh163
Copy link
Contributor

wyh163 commented Feb 25, 2021

Traceback (most recent call last):
File "train.py", line 151, in
train()
File "/opt/conda/lib/python3.8/site-packages/deepvac/syszux_deepvac.py", line 981, in call
self.process()
File "/opt/conda/lib/python3.8/site-packages/deepvac/syszux_deepvac.py", line 971, in process
self.processVal(smoke=True)
File "train.py", line 124, in processVal
self.saveState(self.getTime())
File "/opt/conda/lib/python3.8/site-packages/deepvac/syszux_deepvac.py", line 889, in saveState
self.exportTorchViaScript(output_script_file)
File "/opt/conda/lib/python3.8/site-packages/deepvac/syszux_deepvac.py", line 504, in exportTorchViaScript
save_model.saveByInputOrNot()
File "/opt/conda/lib/python3.8/site-packages/deepvac/syszux_deepvac.py", line 135, in saveByInputOrNot
self.export(input_sample)
File "/opt/conda/lib/python3.8/site-packages/deepvac/syszux_deepvac.py", line 131, in export
self._export(input_sample)
File "/opt/conda/lib/python3.8/site-packages/deepvac/syszux_deepvac.py", line 167, in _export
self.ts = torch.jit.script(self.input_net).eval()
File "/opt/conda/lib/python3.8/site-packages/torch/jit/_script.py", line 937, in script
return torch.jit._recursive.create_script_module(
File "/opt/conda/lib/python3.8/site-packages/torch/jit/_recursive.py", line 384, in create_script_module
return create_script_module_impl(nn_module, concrete_type, stubs_fn)
File "/opt/conda/lib/python3.8/site-packages/torch/jit/_recursive.py", line 445, in create_script_module_impl
create_methods_and_properties_from_stubs(concrete_type, method_stubs, property_stubs)
File "/opt/conda/lib/python3.8/site-packages/torch/jit/_recursive.py", line 328, in create_methods_and_properties_from_stubs
concrete_type._create_methods_and_properties(property_defs, property_rcbs, method_defs, method_rcbs, method_defaults)
RuntimeError:

forward(torch.deepvac.syszux_modules.FPN self, Tensor input) -> (Tensor[]):
Expected a value of type 'Tensor (inferred)' for argument 'input' but instead found type 'List[Tensor]'.
Inferred 'input' to be of type 'Tensor' because it was not annotated with an explicit type.
Empty lists default to List[Tensor]. Add a variable annotation to the assignment to create an empty list of another type (torch.jit.annotate(List[T, []]) where T is the type of elements in the list for Python 2)
:
File "/gemfield/hostpv/wangyuhang/github/RetinaFace/modules/model.py", line 101
out = self.body(inputs)
# FPN
fpn = self.fpn(out)
~~~~~~~~ <--- HERE

    # SSH
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

1 participant