Skip to content

pytorch 模型怎么dump成mge模型 #49

Open

Description

@zhangshitoday

请问用pytorch训的resnet18 二分类模型怎么得到mge模型呀

Activity

  1. cqchu commented on Nov 29, 2021

    @cqchu

    能了解一下这件事的最终目的或者更多的细节信息吗?
    如果只是单纯转换可以使用torch2mge的转换器,https://github.com/MegEngine/torch2mge

  2. cqchu commented on Nov 29, 2021

    @cqchu

    需要在转换器的第46行处增加两行代码,如下:
    if tk == "compute_mode" or tk == "param_dim": continue

    修改后效果如 https://github.com/cqchu/torch2mge/blob/master/convert.py#L46 所示

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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