Skip to content

when export model file,report an error #9366

@jobsjiang

Description

@jobsjiang

Search before asking

Question

custom model traing,Classes = 2,when export model file with --train report an error, if not with --train no error

Traceback (most recent call last):
  File "export.py", line 595, in <module>
    main(opt)
  File "export.py", line 590, in main
    run(**vars(opt))
  File "/root/anaconda3/envs/yolov5/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "export.py", line 499, in run
    shape = tuple((y[0] if isinstance(y, tuple) else y).shape)  # model output shape
AttributeError: 'list' object has no attribute 'shape'

Additional

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions