Skip to content

--freeze option doen't work as expected #6038

@bilzard

Description

@bilzard

Search before asking

  • I have searched the YOLOv5 issues and found no similar bug report.

YOLOv5 Component

Training

Bug

The change made in #6019 currently not working when I specified single integer.
When specified single integer value, the freeze value is created as a list of single integer: e.g. [10]. Therefore, the train.py code only freezes the 11th layer, remaining other former layers 0, .., 9 are ignored.

The expected behavior is:

python train.py --freeze 10 # freeze up to 10.

Environment

No response

Minimal Reproducible Example

python train.py --freeze 10

the output:

freezing model.10.conv.weight
freezing model.10.bn.weight
freezing model.10.bn.bias

Additional

No response

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    TODOHigh priority itemsbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions