No errors expected (also no output on the console)
Actual output
The error:
Traceback (most recent call last):
File "LRP.py", line 64, in <module>
attr_dl = dl.attribute(image_tensor.cuda(), target = 0)
File "/home/anna/.local/lib/python3.8/site-packages/captum/log/__init__.py", line 35, in wrapper
return func(*args, **kwargs)
File "/home/anna/.local/lib/python3.8/site-packages/captum/attr/_core/deep_lift.py", line 362, in attribute
gradients = self.gradient_func(wrapped_forward_func, inputs)
File "/home/anna/.local/lib/python3.8/site-packages/captum/_utils/gradient.py", line 112, in compute_gradients
outputs = _run_forward(forward_fn, inputs, target_ind, additional_forward_args)
File "/home/anna/.local/lib/python3.8/site-packages/captum/_utils/common.py", line 448, in _run_forward
output = forward_func()
File "/home/anna/.local/lib/python3.8/site-packages/captum/attr/_core/deep_lift.py", line 405, in forward_fn
torch.cat((model_out[:, 0], model_out[:, 1])), target
IndexError: index 1 is out of bounds for dimension 1 with size 1
❓ Questions and Help
Hey all, I'm trying to apply DeepLift on a custom VGG16, but getting an IndexError. Does somebody have an Idea how to fix it?
Reproduce
Expected output
No errors expected (also no output on the console)
Actual output
The error: