Quantus
Quantus copied to clipboard
Missing module in 'quantus.helpers.utils'
A error just popped up which is required for torch models when I want to evaluate XAI methods:
AttributeError Traceback (most recent call last)
/usr/local/lib/python3.9/dist-packages/quantus/helpers/model/pytorch_model.py in shape_input(self, x, shape, channel_first, batched) 125 # Set channel order according to expected input of model. 126 if self.channel_first: --> 127 return utils.make_channel_first(x, channel_first) 128 raise ValueError("Channel first order expected for a torch model.") 129
AttributeError: module 'quantus.helpers.utils' has no attribute 'make_channel_first'
I also checked utils module, but this module already has 'make_channel_first' function. IDK why this error happens?
Can anyone propose a solution?
Hi, thank you for letting us know about this!
Can you give some more context around this call? Is it from a notebook, in that case, which one?
The function make_channel_first
do exist in quantus.helpers.utils
.
Thanks!
I meet the same issue in https://github.com/understandable-machine-intelligence-lab/Quantus/blob/main/tutorials/Tutorial_ImageNet_Example_All_Metrics.ipynb when use ROAD