第一次调试
This commit is contained in:
@ -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:
|
||||
|
Reference in New Issue
Block a user