第一次调试
This commit is contained in:
@ -64,7 +64,7 @@ def safe_download(file, url, url2=None, min_bytes=1E0, error_msg=''):
|
||||
|
||||
def attempt_download(file, repo='ultralytics/yolov5', release='v6.2'):
|
||||
# Attempt file download from GitHub release assets if not found locally. release = 'latest', 'v6.2', etc.
|
||||
from utils.general import LOGGER
|
||||
from app.yolov5.utils.general import LOGGER
|
||||
|
||||
def github_assets(repository, version='latest'):
|
||||
# Return GitHub repo tag (i.e. 'v6.2') and assets (i.e. ['yolov5s.pt', 'yolov5m.pt', ...])
|
||||
|
@ -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