Comments (4)
@TSlYY 作者还没整理好prune_util.py. 着急可以看我的仓库。。
from yolov3-model-pruning.
@violet17 已经下载过prune_util.py了啊,还是报错
from yolov3-model-pruning.
Get dataloader
dataset = ListDataset(train_path, augment=True, multiscale=opt.multiscale_training)
dataloader = torch.utils.data.DataLoader(
dataset,
batch_size=opt.batch_size,
shuffle=True,
num_workers=opt.n_cpu,
pin_memory=True,
collate_fn=dataset.collate_fn
)
optimizer = torch.optim.SGD(model.parameters(), lr=opt.lr, momentum=0.9)
for batch_i, (_, imgs, targets) in enumerate(dataloader):
batches_done = len(dataloader) * epoch + batch_i
imgs = imgs.to(device)
targets = targets.to(device)
loss, outputs = model(imgs, targets)
optimizer.zero_grad()
loss.backward()
updateBN(sr_flag, model.module_list, opt.s, prune_idx)
#BNOptimizer.updateBN(sr_flag, model.module_list, opt.s, prune_idx)
optimizer.step()
from yolov3-model-pruning.
from yolov3-model-pruning.
Related Issues (20)
- 精度过低
- 能用于别的模型么?比如bisenet
- 推理速度 自测是22ms左右,不是7ms
- 请问如果训练多个类别,该如何配置?看标签文件没有写类别,是只能训练一类吗?
- 剪枝后FPS速度问题 HOT 2
- train.py训练完为啥没有选出一个最优的yolov3_ckpt.pth额,只是生成了一系列不同epoch的pth
- 请问这里用于稀疏化训练的预训练权重可以是之前训练好的模型吗? HOT 1
- "Channels would be all pruned!"
- 求FLOPS代码位置 HOT 1
- 减枝完,检测不到结果
- prune_model_keep_size 只是将model中冗余的通道通过mask置零,并没有真正的剪掉这些通道? HOT 1
- Cooperation Proposal: Lam1360/YOLOv3-model-pruning & PaddlePaddle
- 模型裁剪以后重新训练可以生成新的pth, 但是同时生成.weights文件报错。
- 这个模型适用于其他crnn结构嘛?
- 训练时候cls_acc一直是100% HOT 1
- 为什么上一层丢掉的权重,下一层的BN层runing_meaning要减去offset
- 为什么跑的这个数据集的结果只有map0.68,作者写的0.75 HOT 1
- 为什么会出现No such file or directory: 'data\\images\\train\\Buffy_1.jpg'
- 为什么剪枝后的 sample_metrics 为空 HOT 2
- 请问大家检测速度的代码在哪里啊?没有看到
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yolov3-model-pruning.