You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A error just popped up which is required for torch models when I want to evaluate XAI methods:
AttributeError Traceback (most recent call last) in <cell line: 8>()
6
7 # Call the metric instance to produce scores.
----> 8 results = {method: selectivity(model=model,
9 x_batch=x_batch,
10 y_batch=y_batch,
/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?
The text was updated successfully, but these errors were encountered:
A error just popped up which is required for torch models when I want to evaluate XAI methods:
AttributeError Traceback (most recent call last)
in <cell line: 8>()
6
7 # Call the metric instance to produce scores.
----> 8 results = {method: selectivity(model=model,
9 x_batch=x_batch,
10 y_batch=y_batch,
/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?
The text was updated successfully, but these errors were encountered: