-
NNI 学生项目问题概述 / General Question of Student Program请简要概述您的问题 / 观点 :
但是, 运行报错如下:
我想这个应该是我添加的代码存在问题,不是环境的问题,请您看看,感谢,十分感谢 我也尝试过将apply_compression_results(model, mask_path)这句去除,程序能运行完成,但是产生的use_mask_small_model.pth模型大小为3.3M, 而./checkpoints/pretrain_naive_mnist_level.pth大小为1.7M,模型反而变大了? 这是我理解上存在偏差吗?剪枝后的模型应该变小才对. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
@damon-93 Hello, try this may work, but I think will also meet other error:
And seems your code is the old version, you could update nni version and nni example code. The model uses |
Beta Was this translation helpful? Give feedback.
-
Hi there, I'm getting a similar error using the
Don't you still have to use apply_compression_results to multiply the weights by the corresponding mask? |
Beta Was this translation helpful? Give feedback.
-
Seconded here. I ran basic_pruners_torch.py (https://github.com/microsoft/nni/blob/af929fdb848092a7b225a498e6d82d82cf6babfa/examples/model_compress/pruning/basic_pruners_torch.py) on the other pruners and added compatibility for the I've also changed Is there another hack to get through the shortcomings of |
Beta Was this translation helpful? Give feedback.
-
@damon-93 @sergiogcharles @FTdiscovery
Yes, you are right, |
Beta Was this translation helpful? Give feedback.
@damon-93 @sergiogcharles @FTdiscovery
Sorry for I lose
apply_compression_results()
in the above code. And I corrected the code.Yes, you are right,
apply_compression_results()
is required.