Skip to content

Commit

Permalink
Document a cuDNN workaround for text example (NVIDIA#1422)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeyeager authored Feb 1, 2017
1 parent 42baca1 commit 8b45c75
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions examples/text-classification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,23 @@ After a few hours of training, your network loss and accuracy may look like:

![loss](dbpedia-loss.png)

**NOTE**: There is a minor bug in cuDNN v5.1.10 that you may run into with this example.
On Kepler GPUs (e.g. K80), you may have very bad performance (time estimates in the hundreds of days!).
If so, cuDNN is suggesting an inappropriate algorithm to use.
You can override this easily - simply replace this line:
```lua
-- [(1018-3)/3+1=339] x 256
net:add(backend.TemporalConvolution(256, 256, 7))
```
With these lines:
```lua
-- [(1018-3)/3+1=339] x 256
local conv2 = backend.TemporalConvolution(256, 256, 7)
conv2:setMode(nil, 0, nil)
net:add(conv2)
```
That will force cuDNN to use a different algorithm. If you're into applying git patches, [use this](https://gist.github.com/lukeyeager/48a852f90c1366c9a123ba183bc1eda2).

## Verification

At the bottom of the model page, select the model snapshot that achieved the best validation accuracy (this is not necessarily the last one).
Expand Down

0 comments on commit 8b45c75

Please sign in to comment.