Browse Source

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

nagadomi 5 years ago
parent
commit
da44c59fb0
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lib/LBPCriterion.lua

+ 2 - 2
lib/LBPCriterion.lua

@@ -12,8 +12,8 @@ local function create_filters(ch, n, k, layers)
       if i == 1 then
       if i == 1 then
 	 -- channel identity
 	 -- channel identity
 	 for j = 1, ch do
 	 for j = 1, ch do
-	    filter.weight[i]:fill(0)
-	    filter.weight[i][i][math.floor(k/2)+1][math.floor(k/2)+1] = 1
+	    filter.weight[j]:fill(0)
+	    filter.weight[j][j][math.floor(k/2)+1][math.floor(k/2)+1] = 1
 	 end
 	 end
       end
       end
       model:add(filter)
       model:add(filter)