第一次调试

This commit is contained in:
552068321@qq.com
2022-11-07 14:34:35 +08:00
parent 6f7de660aa
commit 41ba5d9f44
23 changed files with 2023 additions and 152 deletions

View File

@ -64,7 +64,7 @@ def smart_DDP(model):
def reshape_classifier_output(model, n=1000):
# Update a TorchVision classification model to class count 'n' if required
from models.common import Classify
from app.yolov5.models.common import Classify
name, m = list((model.model if hasattr(model, 'model') else model).named_children())[-1] # last module
if isinstance(m, Classify): # YOLOv5 Classify() head
if m.linear.out_features != n: