Skip to content

Keys not found during inference #136

Open
@fronos

Description

@fronos

Describe the bug

I'm trained custom model Yolo v9-m from scratch. During inference I noticed that logger throwing messages:

WARNING  ⚠ Weight Not Found for key: 19.conv                                                                                                                                      yolo.py:152
WARNING  ⚠ Weight Not Found for key: 21.conv3.0.conv2                                                                                                                             yolo.py:152
WARNING  ⚠ Weight Not Found for key: 34.conv3.0.conv2                                                                                                                             yolo.py:152
WARNING  ⚠ Weight Not Found for key: 38.heads.1.anchor_conv.0                                                                                                                     yolo.py:152
WARNING  ⚠ Weight Not Found for key: 22.heads.2.anc2vec  

The main reasons of this warnings:

  1. Lightning save weights as a key of file with extension .ckpt.
  2. Keys of initialized model and trained model mismatched. Need add model.model into name of key

System Info (please complete the following ## information):

  • OS: [e.g. Ubuntu 20.04]
  • Python Version: 3.10.16
  • PyTorch Version: 2.5.1
  • Lightning: 2.4.0
  • CUDA/cuDNN/MPS Version: 12.4
  • YOLO Model Version: YOLOv9-m

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions