1
0
Fork 0
mirror of synced 2024-06-01 10:39:30 +12:00
waifu2x/lib/Print.lua
2018-10-14 01:20:03 +09:00

18 lines
416 B
Lua

local Print, parent = torch.class('w2nn.Print','nn.Module')
function Print:__init(id)
parent.__init(self)
self.id = id
end
function Print:updateOutput(input)
print("----", self.id)
print(input:size())
self.output:resizeAs(input)
self.output:copy(input)
return self.output
end
function Print:updateGradInput(input, gradOutput)
self.gradInput:resizeAs(GradOutput)
return self.gradInput
end