Skip to content

Anomaly in exporting pre-training weights #522

Open
@Monitoryang

Description

@Monitoryang

When I export the weights dinov2_vitg14_ade20k_m2f.pth using the code below it appears that PyTorch's linear layer (which contains the weights and bias) is broken up into separate MatMul/Add operations, e.g. onnx__Add_15356, model.backbone. blocks.0.mlp.w2.bias, model.decode_head.transformer_decoder.layers.2.norms.1.weight, and similar files like these number over a thousand, resulting in an exported ONNX of only 2MB, which I queried and found seems to be similar to PyTorch's JIT Tracer is not able to fully capture the dynamic logic, resulting in the weights not being captured correctly, how should I proceed to solve the problem?

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