xplique icon indicating copy to clipboard operation
xplique copied to clipboard

Handle model with tensor that has channel first

Open AdrienGauffriau opened this issue 3 years ago • 1 comments

The explaination does not work for models that ask for the channel as the first dimension of the input tensor (channel, height, width. When such a model is provided, the output shape of the explanation is (channel x height) instead of (height x width)

AdrienGauffriau avatar Oct 22 '21 12:10 AdrienGauffriau

Hi Adrien!

Would a wrapper such as the one used in this example fix it ?

lucashervier avatar Jan 27 '22 10:01 lucashervier

With the PR #132,we introduce a wrapper in pytorch.py file. You can take inspiration of this wrapper to handle channel first models

lucashervier avatar Oct 04 '23 08:10 lucashervier