ResRep
ResRep copied to clipboard
ResRep: Lossless CNN Pruning via Decoupling Remembering and Forgetting (ICCV 2021)
for compactor_param, mask in compactor_mask_dict.items():####################单独设置compactor的梯度信息,加上lasso_grad梯度 compactor_param.grad.data = mask * compactor_param.grad.data lasso_grad = compactor_param.data * ((compactor_param.data ** 2).sum(dim=(1, 2, 3), keepdim=True) ** (-0.5))###########这个mask是乘以的loss第二项,和论文不同 compactor_param.grad.data.add_(resrep_config.lasso_strength, lasso_grad) if not if_accum_grad: if gradient_mask_tensor is...
Hi @DingXiaoH : thanks to your great masterpiece . and as i wanna check the finished_converted.hdf5 that if the acc has dropped after folding conv and fusing bn ? so...
could you offer your pruned resnet-50.hdf5 file and not pruned one. it saves a lot of time
Dear author, thank u for your excellent work and code. Recently when I read the convert code, I cannot completely understand the logic behand the beta compensate, can you explain...