Skip to content

onnx #264

@ld-xy

Description

@ld-xy

import torch
from fastsam import FastSAM

加载模型

model = FastSAM('weights/FastSAM-x.pt')

model.export(format="onnx")

find a error:
PyTorch: starting from weights/FastSAM-x.pt with input shape (1, 3, 1280, 960) BCHW and output shape(s) ((1, 37, 25200), (1, 32, 320, 240)) (138.2 MB)
ONNX: export failure ❌ 0.0s: partially initialized module 'onnx' has no attribute 'version' (most likely due to a circular import)
ONNX: export failure ❌ 2.3s: module 'onnx' has no attribute 'version'

can you help me?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions