aimet icon indicating copy to clipboard operation
aimet copied to clipboard

model should be converted to nn.module when using QAT

Open TingfengTang opened this issue 3 years ago • 1 comments

Hi, It's not convenient to convert the model obeying the specific rules described in the model guidelines, for example, the model should be without torch.nn.functional. Is there a future release considering using the torch.fx module to trace the model?

TingfengTang avatar Sep 22 '21 09:09 TingfengTang

Hi @TingfengTang Thank you for your message. Agree that applying model guidelines could get tedious. Yes, we are actively working on adding support for torch.fx in future releases (example : https://github.com/quic/aimet/issues/748).

quic-ssiddego avatar Sep 24 '21 22:09 quic-ssiddego

Hi @TingfengTang Please take a look at model preparer API which converts torch.nn.functional defined in model forward pass to torch.nn.Module. https://quic.github.io/aimet-pages/releases/latest/api_docs/torch_model_preparer.html#api-torch-model-preparer

Closing this as resolved. If there is another question please re-open or create a new issue. Thank you.

quic-hitameht avatar Jan 30 '23 12:01 quic-hitameht