9 lines
310 B
Python
9 lines
310 B
Python
|
|
from ultralytics import YOLO
|
||
|
|
import torch
|
||
|
|
model = YOLO("/home/hx/开发/ailai_image_obb/ailai_pc/detect.pt")
|
||
|
|
|
||
|
|
for name, module in model.model.named_modules():
|
||
|
|
if isinstance(module, torch.nn.Conv2d):
|
||
|
|
w = module.weight
|
||
|
|
print(f"{name} -> min: {w.min().item():.3f}, max: {w.max().item():.3f}")
|