question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PyTorch Pruning with ProxylessNAS

See original GitHub issue

Hi,

I am interested in using pruning with ProxylessNAS. So I added a new class like “MBInvertedConvLayer_Sparse” in ProxlyessNAS example that applies pruning in forward pass.

example:

 def forward(self, x):
        x = self.inverted_bottleneck(x)
        x = self.depth_conv(x)
        x = self.point_linear(x)
        return prune.ln_structured(nn.Conv2d, 'weight', 0.2)

However, I get the below error:

  File "~nni/retiarii/oneshot/pytorch/proxylessnas.py", line 74, in forward
    return ArchGradientFunction.apply(
  File "~nni/retiarii/oneshot/pytorch/proxylessnas.py", line 31, in forward
    return output.data
AttributeError: 'NoneType' object has no attribute 'data'

Any idea how I could hack proxylessNAS for it? Thanks!

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Lijiaoacommented, Nov 25, 2022

@singagan Could you close this issue as completed?

0reactions
singagancommented, Nov 23, 2022

@matluster Thanks for the quick reply. I see. Yes, I modified the input/output format to match my space. Thanks for pointing out the new examples. I am looking for a hardware-aware NAS. Maybe I can inject some hardware metrics in ENAS as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pruning Tutorial - PyTorch
In this tutorial, you will learn how to use torch.nn.utils.prune to sparsify your neural networks, and how to extend it to implement your...
Read more >
Path-Level Pruning and Binarization - MIT HAN Lab
The cost of ProxylessNAS is at the same level as regular training. Hardware prefers specialized models. Our specialized model on GPU achieves 1.1%...
Read more >
Model Space Hub - Neural Network Intelligence
Model Space Hub¶. NNI model space hub contains a curated list of well-known NAS search spaces, along with a number of famous model...
Read more >
Neural Architecture Search (NAS): basic principles and ...
ProxylessNAS proposes a path-level pruning perspective. ... Auto-Pytorch, AutoGluon but nni is by far the most complete and well maintained.
Read more >
【资源】AutoML 与轻量模型大列表-极市开发者社区
D-X-Y/GDAS | [Pytorch]. ASAP: Architecture Search, Anneal and Prune | [2019/04] ... MIT-HAN-LAB/ProxylessNAS | [Pytorch, Tensorflow].
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found