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.05k stars 1.82k forks source link

RuntimeError: Has not supported replacing module with type: Conv1d #5144

Open Alex-Songs opened 2 years ago

Alex-Songs commented 2 years ago

RuntimeError: Has not supported replacing module with type: Conv1d, you could report an issue at https://github.com/microsoft/nni. If you know how to replace Conv1d, you could implement module replacement by passing incustomized_replace_func to ModelSpeedup. You are welcome to contribute back to nni as native support if you have implemented the replacement function, so that more users can benefit from your contributions.

J-shang commented 2 years ago

hello @Alex-Songs, you could customize the replace function and pass it in by customized_replace_func API

please refer Conv2d replacement and implement Conv1d: https://github.com/microsoft/nni/blob/7811307c240ff3e87166d48c8d012da426852838/nni/compression/pytorch/speedup/compress_modules.py#L443

It's welcome to contribute back to NNI after you implement it.😆