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
Traceback (most recent call last):
File "tools/pth2pt.py", line 125, in
main()
File "tools/pth2pt.py", line 121, in main
traced_script_module = torch.jit.trace(model, example)
File "D:\anaconda3\envs\torch\lib\site-packages\torch\jit_trace.py", line 742, in trace
_module_class,
File "D:\anaconda3\envs\torch\lib\site-packages\torch\jit_trace.py", line 940, in trace_module
_force_outplace,
File "D:\anaconda3\envs\torch\lib\site-packages\torch\nn\modules\module.py", line 725, in _call_impl
result = self._slow_forward(*input, **kwargs)
File "D:\anaconda3\envs\torch\lib\site-packages\torch\nn\modules\module.py", line 709, in _slow_forward
result = self.forward(*input, **kwargs)
File "E:\python\Awesome-Backbones\models\build.py", line 125, in forward
return self.forward_train(x,**kwargs)
TypeError: forward_train() missing 1 required positional argument: 'targets'
The text was updated successfully, but these errors were encountered:
yao-th
changed the title
Awesome backbones 训练的模型如何在移动端使用?
Awesome backbones 训练的模型如何部署到移动端?
Sep 18, 2024
我用torch.jit.trace() export 模型的时候报错, 之前也有人遇到同样的问题. 不知道如何解决? 或者有其他的方法让AB输出的模型在移动端上使用么?
(torch) E:\python\Awesome-Backbones>python tools/pth2pt.py models\repvgg\repvgg_A0.py
Loading Train_Epoch042-Loss0.012.pth
Traceback (most recent call last):
File "tools/pth2pt.py", line 125, in
main()
File "tools/pth2pt.py", line 121, in main
traced_script_module = torch.jit.trace(model, example)
File "D:\anaconda3\envs\torch\lib\site-packages\torch\jit_trace.py", line 742, in trace
_module_class,
File "D:\anaconda3\envs\torch\lib\site-packages\torch\jit_trace.py", line 940, in trace_module
_force_outplace,
File "D:\anaconda3\envs\torch\lib\site-packages\torch\nn\modules\module.py", line 725, in _call_impl
result = self._slow_forward(*input, **kwargs)
File "D:\anaconda3\envs\torch\lib\site-packages\torch\nn\modules\module.py", line 709, in _slow_forward
result = self.forward(*input, **kwargs)
File "E:\python\Awesome-Backbones\models\build.py", line 125, in forward
return self.forward_train(x,**kwargs)
TypeError: forward_train() missing 1 required positional argument: 'targets'
The text was updated successfully, but these errors were encountered: