ultralytics 8.0.133 add torchvision compatibility check (#3703)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
0821ccb618
commit
c55a98ab8e
17 changed files with 140 additions and 68 deletions
|
|
@ -232,7 +232,7 @@ def get_flops(model, imgsz=640):
|
|||
|
||||
|
||||
def get_flops_with_torch_profiler(model, imgsz=640):
|
||||
# Compute model FLOPs (thop alternative)
|
||||
"""Compute model FLOPs (thop alternative)."""
|
||||
model = de_parallel(model)
|
||||
p = next(model.parameters())
|
||||
stride = (max(int(model.stride.max()), 32) if hasattr(model, 'stride') else 32) * 2 # max stride
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue