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
错误信息为:C:\Users\28455\AppData\Roaming\Python\Python310\site-packages\torchreid\reid\metrics\rank.py:11: UserWarning: Cython evaluation (very fast so highly recommended) is unavailable, now use python evaluation.
warnings.warn(
Traceback (most recent call last):
File "C:\Users\28455\gitclone\yolov5\pth2onnx.py", line 12, in
model.eval()
AttributeError: 'collections.OrderedDict' object has no attribute 'eval'`
请问这是为什么
The text was updated successfully, but these errors were encountered:
当我使用以下代码导出时报错:
`import torchreid
from torch.autograd import Variable
import torch
import onnx
input_name = ['input']
output_name = ['output']
model = torch.load('osnet_x1_0_msmt17_256x128_amsgrad_ep150_stp60_lr0.0015_b64_fb10_softmax_labelsmooth_flip.pth')
model.eval()
input = Variable(torch.randn(1, 3, 256, 128))
torch.onnx.export(model, input, 'osnet_ain_x1_0.onnx', input_names=input_name,output_names=output_name, verbose=True, export_params=True)
错误信息为:
C:\Users\28455\AppData\Roaming\Python\Python310\site-packages\torchreid\reid\metrics\rank.py:11: UserWarning: Cython evaluation (very fast so highly recommended) is unavailable, now use python evaluation.warnings.warn(
Traceback (most recent call last):
File "C:\Users\28455\gitclone\yolov5\pth2onnx.py", line 12, in
model.eval()
AttributeError: 'collections.OrderedDict' object has no attribute 'eval'`
请问这是为什么
The text was updated successfully, but these errors were encountered: