quic / aimet

AIMET is a library that provides advanced quantization and compression techniques for trained neural network models.
https://quic.github.io/aimet-pages/index.html
Other
2.08k stars 373 forks source link

Pytorch model with a 'sigmoid' op cannot do channel pruning. #964

Open hasuoshenyun opened 2 years ago

hasuoshenyun commented 2 years ago

I trained a model and it contains 'sigmoid' op, it cannot be compressed with chnnel_prunning.

quic-ssiddego commented 2 years ago

@hasuoshenyun is there a specific error you observe?

Dennis-Johnson commented 2 years ago

I observed a NotImplemented() exception raised from AIMET's Winnowing module while using sigmoid, max_pool2d, and relu from the torch.nn.functional API. I replaced these three with their torch.nn alternatives in my custom PyTorch model and was then able to use the channel_pruning function.