TS-Interpretability-Benchmark
TS-Interpretability-Benchmark copied to clipboard
RuntimeError: cudnn RNN backward can only be called in training mode
Hi, thank you for sharing the code!
I meet a problem when running your code and really need your help: It seems like that Middle_Box LSTM model can not work. May i ask you how to address this issue?
Thanks a lot!
Middle_Box LSTM model BestAcc 99.0000
[0/10] LSTM Middle_Box model accuracy 99.00
Traceback (most recent call last):
File "/home/runsheng/XAI/Scripts/run_benchmark.py", line 166, in
File "/home/runsheng/miniconda3/envs/xai/lib/python3.10/site-packages/captum/log/init.py", line 35, in wrapper
return func(*args, **kwargs)
File "/home/runsheng/miniconda3/envs/xai/lib/python3.10/site-packages/captum/attr/_core/saliency.py", line 130, in attribute
gradients = self.gradient_func(
File "/home/runsheng/miniconda3/envs/xai/lib/python3.10/site-packages/captum/_utils/gradient.py", line 119, in compute_gradients
grads = torch.autograd.grad(torch.unbind(outputs), inputs)
File "/home/runsheng/miniconda3/envs/xai/lib/python3.10/site-packages/torch/autograd/init.py", line 276, in grad
return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass
RuntimeError: cudnn RNN backward can only be called in training mode