admin管理员组文章数量:1332353
When I start fine-tuning yolo11n.pt (or any other version of yolo), the python.exe program will takes over 8GB, so I try everything to reduce the memory usage . But anyway,the following is my model configuration ,I'm wonder is this normal or not? And does it influence the accuracy or is there a way I can improve it without causing OOM eeror?(my dataset only contains 2000 image)
if torch.cuda.is_available():
torch.cuda.empty_cache()
mp.set_start_method('spawn', force=True) # Ensures proper process handling on Windows
mp.freeze_support() # Needed for Windows multiprocessing
model = YOLO('yolo11n.pt')
device=torch.device('cuda' if torch.cuda.is_available()
else 'cpu')
results = model.train(
data=data_yaml_path,
epochs=150, # Increased epochs
batch=2, # Reduced batch size
imgsz=512, # Reduced image size
amp=True,
# Stabilization parameters
lr0=0.001, # Lower learning rate
lrf=0.001,
cache='disk',
# Other parameters
project='fall_detection_optimized', # Save results in a new folder
name='branch_first_phase',
device=device,
optimizer='AdamW',
workers=1,
patience=25,
weight_decay=0.0005,
exist_ok=True,
plots=True,
save_period=50
)
# Save the best model
model.save('Fall_detection_optimized_best.pt')
So I lower everything and using cache to disk but it still takes 5GB, and I'm wonder does it impact the accuracy or how can I improve the accuracy
本文标签: YOLO finetuning RAM out of memory proble(pythonexe takes over 8GB)Stack Overflow
版权声明:本文标题:YOLO fine-tuning RAM out of memory proble(python.exe takes over 8GB) - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742322523a2453076.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论