From e39bfebc17ffe60274daae699c71a2daffc3114d Mon Sep 17 00:00:00 2001 From: adampolyak Date: Tue, 5 May 2015 11:01:36 +0300 Subject: [PATCH] Buffers for PReLU cuda implementation. --- PReLU.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PReLU.lua b/PReLU.lua index 5f45ce677..5d768f8a4 100644 --- a/PReLU.lua +++ b/PReLU.lua @@ -6,6 +6,8 @@ function PReLU:__init(nOutputPlane) self.nOutputPlane = nOutputPlane or 0 self.weight = torch.Tensor(nOutputPlane or 1):fill(0.25) self.gradWeight = torch.Tensor(nOutputPlane or 1) + self.gradWeightBuf = torch.Tensor() + self.gradWeightBuf2 = torch.Tensor() end function PReLU:updateOutput(input)