Co-DETR icon indicating copy to clipboard operation
Co-DETR copied to clipboard

Pytorch to onnx fail

Open jasper2326 opened this issue 2 years ago • 4 comments

image

RuntimeError: Only tuples, lists and Variables are supported as JIT inputs/outputs. Dictionaries and strings are also accepted, but their usage is not recommended. Here, received an input of unsupported type: numpy.ndarray

Can anyone help me with this issue? Thanks.

jasper2326 avatar Aug 07 '23 06:08 jasper2326

I got the same problem

chenzx2 avatar Aug 07 '23 08:08 chenzx2

here is my env: ubantu18 torch 2.0.0+cu117 torchaudio 2.0.1+cu117 mmcv 1.7.0 mmcv-full 1.7.0

chenzx2 avatar Aug 07 '23 09:08 chenzx2

image

RuntimeError: Only tuples, lists and Variables are supported as JIT inputs/outputs. Dictionaries and strings are also accepted, but their usage is not recommended. Here, received an input of unsupported type: numpy.ndarray

Can anyone help me with this issue? Thanks.

企业微信截图_16914857473833 here is my change

one_meta = {
    'img_shape': (H, W, C),
    'ori_shape': (H, W, C),
    'pad_shape': (H, W, C),
    'filename': '<demo>.png',
    'scale_factor': torch.from_numpy(np.ones(4, dtype=np.float32) ),
    'flip': False,
    'show_img': torch.from_numpy(show_img),
    'flip_direction': None
}

chenzx2 avatar Aug 08 '23 09:08 chenzx2

I got the same problem

shuyue-jl avatar Aug 28 '23 07:08 shuyue-jl