Skip to content

Instantly share code, notes, and snippets.

View freesouls's full-sized avatar

Binbin Xu(徐彬彬) freesouls

View GitHub Profile
@JonathanRaiman
JonathanRaiman / faux_cudnn.py
Last active March 22, 2019 11:49
Convert CUDNN LSTM to Dynamic RNN
"""
Little script demonstration how to run cudnn rnns
without cudnn using dynamic rnn with the same weights
(e.g. train on cudnn, use with dynamic rnn on cpu).
Note: this will run slower than cudnn on a gpu (see below).
Tested on Titan X Pascal:
With cudnn 3.5s vs. with dynamic_rnn 8s to run through 79 batches
with batch size 128.
Network: input size: 127, 2 layer bidirectional LSTM with num_units 200.