Skip to content

ImportError: cannot import name '_type_utils' from 'torch.onnx' #281

@xiaoBIGfeng

Description

@xiaoBIGfeng

我使用的pytorch版本是1.8.1,在from mqbench.prepare_by_platform import prepare_by_platform时报错如下:
from .dsq import DSQFakeQuantize
File "/mnt/diskb/anaconda3/envs/tdquant/lib/python3.8/site-packages/MQBench-0.0.6-py3.8.egg/mqbench/fake_quantize/dsq.py", line 9, in
from torch.onnx import _type_utils
ImportError: cannot import name '_type_utils' from 'torch.onnx' (/mnt/diskb/anaconda3/envs/tdquant/lib/python3.8/site-packages/torch/onnx/init.py)
请问该怎么解决呢

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions