microsoft / nni

An open source AutoML toolkit for automate machine learning lifecycle, including feature engineering, neural architecture search, model compression and hyper-parameter tuning.
https://nni.readthedocs.io
MIT License
14.03k stars 1.81k forks source link

ERROR: aten::norm is not Supported! #5018

Open jia0511 opened 2 years ago

jia0511 commented 2 years ago

When I use the NNI L1 method to prune the facenet model and perform speedup, I encounter an error indicating that aten::norm is not supported. How to solve this problem? My pytorch network structure is defined as follows:

2022-07-25 17-03-15

jia0511 commented 2 years ago

2022-07-25 17-08-51

jia0511 commented 2 years ago

2022-07-25 17-10-50

jia0511 commented 2 years ago

@Louis-J I think you can help me as soon as possible, thank you!

Louis-J commented 2 years ago

have you tried replacing the {envs_path}\Lib\site-packages\nni\compression\pytorch\speedup\jit_translate.py to the new_dev_version?

jia0511 commented 2 years ago

I ran into this problem using NNI version 2.8.

jia0511 commented 2 years ago

@Louis-J

have you tried replacing the {envs_path}\Lib\site-packages\nni\compression\pytorch\speedup\jit_translate.py to the new_dev_version?

I tried replacing the jit_translate.py ,but met new problem: 2022-07-27 13-53-31

jia0511 commented 2 years ago

2022-07-25 17-10-50

I would like to know if there is a good solution to this problem?

jia0511 commented 2 years ago

Hi @Louis-J

I would like to know whether the new version will solve this problem, and whether the reason for the speedup error is related to the model structure or NNI. When I do not do the speedup model, the model can be executed normally.

jia0511 commented 2 years ago

Hi @Louis-J

Is there an update on this issue, is the 2.9 version fixed to support norm?

Louis-J commented 2 years ago

Sorry for not replying these days. Now in 2.9 version we submitted the feature to automatically using the ops in aten:: namespace. the aten::norm is supported now.

But there is a bug still that we cannot use the 'expand_as' function correctly. And all the returned view may cause the problem. We will fix this bug in 2.9.1.

Louis-J commented 1 year ago

the expand_as is solved in #5141 included in version 2.10. you can try with the latest version 2.10 now.