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
Add cudnn RNN backward error handling to FAQ (#576)
Summary:
Since raised in the issue, #564, adding a solution about it to FAQ.
Pull Request resolved: #576
Reviewed By: edward-io
Differential Revision: D25725280
Pulled By: NarineK
fbshipit-source-id: 376fc3c98f4cc742242842bb2a1e8df1828d7b4d
Copy file name to clipboardexpand all lines: docs/faq.md
+8-3
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,8 @@ title: FAQ
11
11
*[My model inputs or outputs token indices, and when using Captum I see errors relating to gradients, how do I resolve this?](#my-model-inputs-or-outputs-token-indices-and-when-using-captum-i-see-errors-relating-to-gradients-how-do-i-resolve-this)
12
12
*[Can my model using functional non-linearities (E.g. nn.functional.ReLU) or reused modules be used with Captum?](#can-my-model-using-functional-non-linearities-eg-nnfunctionalrelu-or-reused-modules-be-used-with-captum)
13
13
*[Do JIT models, DataParallel models, or DistributedDataParallel models work with Captum?](#do-jit-models-dataparallel-models-or-distributeddataparallel-models-work-with-captum)
14
-
*[I am working on a new interpretability / attribution method and would like to add it to Captum. How do I proceed?](#i-am-working-on-a-new-interpretability-attribution-method-and-would-like-to-add-it-to-captum-how-do-i-proceed)
14
+
*[I am working on a new interpretability or attribution method and would like to add it to Captum. How do I proceed?](#i-am-working-on-a-new-interpretability-or-attribution-method-and-would-like-to-add-it-to-captum-how-do-i-proceed)
15
+
*[I am using a gradient-based attribution algorithm such as integrated gradients for a RNN or LSTM network and I see 'cudnn RNN backward can only be called in training mode'. How can I resolve this issue ?](#how-can-I-resolve-cudnn-RNN-backward-error-for-RNN-or-LSTM-network)
15
16
16
17
### **How do I set the target parameter to an attribution method?**
17
18
@@ -60,12 +61,16 @@ Most methods will work fine with functional non-linearities and arbitrary operat
60
61
61
62
Yes, we have support for all these model types. Note that JIT models do not yet support hooks, so any methods using hooks including layer and neuron attribution methods, DeepLift, Guided Backprop, and Deconvolution are not supported. DataParallel and DistributedDataParallel are supported with all model types.
62
63
63
-
64
-
### **I am working on a new interpretability / attribution method and would like to add it to Captum. How do I proceed?**
64
+
### **I am working on a new interpretability or attribution method and would like to add it to Captum. How do I proceed?**
65
65
66
66
For interpretability methods created by the community, we have two methods of involvement:
67
67
68
68
1. Awesome List - We maintain a list of interesting external projects that focus on interpretability that may be useful for users looking for functionality beyond what’s available in Captum.
69
69
2. Inclusion in Captum - New attribution algorithms that fit the structure of Captum can be considered for contribution to the contrib package of algorithms in Captum. We review proposals for new additions to the contrib package on a case-by-case basis and consider factors such as publication history, quantitative and qualitative evaluation, citations, etc.
70
70
71
71
We are still working out the logistics of setting these up and will update this with more information once it’s available.
72
+
73
+
### **How can I resolve cudnn RNN backward error for RNN or LSTM network?**
74
+
If your model is set in eval mode you might run into errors, such as `cudnn RNN backward can only be called in training mode`, when you try to perform backward pass on a RNN / LSTM model in a GPU environment.
75
+
CuDNN with RNN / LSTM doesn't support gradient computation in eval mode that's why we need to disable cudnn for RNN in eval mode.
76
+
To resolve the issue you can set`torch.backends.cudnn.enabled` flag to False - `torch.backends.cudnn.enabled=False`
0 commit comments