Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/soumith/cudnn.torch.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoan Puigcerver <joapuipe@gmail.com>2016-07-01 18:48:25 +0300
committerJoan Puigcerver <joapuipe@gmail.com>2016-07-01 18:48:25 +0300
commitcfdcc281a5bb9565c884e1c89f0840ffdb184001 (patch)
treedef3be1ae23206437c1d1347eff68ca0952bea07
parent977a25499624e055e76fca9ff255c2a1c2b0be19 (diff)
Added dropout to rnn constructor, and new BGRU layer
-rw-r--r--BGRU.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/BGRU.lua b/BGRU.lua
new file mode 100644
index 0000000..31d5d92
--- /dev/null
+++ b/BGRU.lua
@@ -0,0 +1,9 @@
+local BGRU, parent = torch.class('cudnn.BGRU', 'cudnn.RNN')
+
+function BGRU:__init(inputSize, hiddenSize, numLayers, batchFirst, dropout)
+ parent.__init(self, inputSize, hiddenSize, numLayers, batchFirst, dropout)
+ self.bidirectional = 'CUDNN_BIDIRECTIONAL'
+ self.mode = 'CUDNN_GRU'
+ self.numDirections = 2
+ self:reset()
+end