1
0
Fork 0
mirror of synced 2024-05-18 20:02:25 +12:00

Merge branch 'master' of github.com:nagadomi/waifu2x

This commit is contained in:
nagadomi 2015-12-11 16:35:00 +09:00
commit 7708c7e75a

View file

@ -9,7 +9,7 @@ function nn.SpatialConvolutionMM:reset(stdv)
self.weight:normal(0, stdv)
self.bias:zero()
end
if cudnn then
if cudnn and cudnn.SpatialConvolution then
function cudnn.SpatialConvolution:reset(stdv)
stdv = math.sqrt(2 / ((1.0 + 0.1 * 0.1) * self.kW * self.kH * self.nOutputPlane))
self.weight:normal(0, stdv)