zju-lishuang / yolov5-v6 Goto Github PK
View Code? Open in Web Editor NEWyolov5 version6.0
License: GNU General Public License v3.0
yolov5 version6.0
License: GNU General Public License v3.0
作者你好,我在执行稀疏训练的时候,发现cfg文件的某些weight读出来是个空的sequential(),是cfg和pt不匹配的缘故吗:
command:
python train_sparsity.py --img 640 --batch 16 --epochs 10 --data yolo1104.yaml --cfg models/yolov5l.yaml --weights yolov5l.pt --name base_0225_sparsity --scale 0.001 --prune 1
log:
Model Summary: 468 layers, 46165219 parameters, 46165219 gradients, 108.0 GFLOPs
Transferred 606/613 items from yolov5l.pt
Scaled weight_decay = 0.0005
optimizer: SGD with parameter groups 101 weight, 104 weight (no decay), 104 bias
WARNING: smart bias initialization failure.
WARNING: smart bias initialization failure.
WARNING: smart bias initialization failure.
Traceback (most recent call last):
File "train_sparsity.py", line 672, in
main(opt)
File "train_sparsity.py", line 569, in main
train(opt.hyp, opt, device, callbacks)
File "train_sparsity.py", line 210, in train
copy_weight_v6(model, cfg_model)
File "/backup/yolov5_prune_0119/Normal_Dete/yolov5-v6/utils/model_transfer.py", line 85, in copy_weight_v6
idx=copy_c3(cspnet2,model.module_list,idx, round(3 * depth_multiple))
File "/backup/yolov5_prune_0119/Normal_Dete/yolov5-v6/utils/model_transfer.py", line 40, in copy_c3
idx=copy_conv_idx(c3_src.m[i].cv1, module_lists[idx],idx)
File "/backup/yolov5_prune_0119/Normal_Dete/yolov5-v6/utils/model_transfer.py", line 22, in copy_conv_idx
copy_conv(conv_src,conv_dst)
File "/backup/yolov5_prune_0119/Normal_Dete/yolov5-v6/utils/model_transfer.py", line 12, in copy_conv
conv_dst[0] = conv_src.conv
File "/root/miniconda3/envs/yolo/lib/python3.7/site-packages/torch/nn/modules/container.py", line 108, in setitem
key: str = self._get_item_by_idx(self._modules.keys(), idx)
File "/root/miniconda3/envs/yolo/lib/python3.7/site-packages/torch/nn/modules/container.py", line 96, in _get_item_by_idx
raise IndexError('index {} is out of range'.format(idx))
IndexError: index 0 is out of range
请问执行步骤是咋样的?
optimizer: SGD with parameter groups 57 weight, 60 weight (no decay), 60 bias
DP not recommended, instead use torch.distributed.run for best DDP Multi-GPU results.
See Multi-GPU Tutorial at ultralytics/yolov5#475 to get started.
Traceback (most recent call last):
File "prune_finetune.py", line 678, in
main(opt)
File "prune_finetune.py", line 575, in main
train(opt.hyp, opt, device, callbacks)
File "prune_finetune.py", line 237, in train
model.module_list = model.module.module_list
File "/usr/local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1178, in getattr
type(self).name, name))
AttributeError: 'Model' object has no attribute 'module_list'
您好,看了您的工程,大佬太厉害了!
有个问题想请教一下. 我训练好一个原始结构模型,然后用copy_weight_v6()生成一个新的模型,但是最后测试发现新生成的模型和原始的模型预测结果差很多,请问可能是什么问题导致的呢。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.