فهرست منبع

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

nagadomi 9 سال پیش
والد
کامیت
7708c7e75a
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      lib/srcnn.lua

+ 1 - 1
lib/srcnn.lua

@@ -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)